Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
FairXYZDeployer
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
// @ Fair.xyz dev
pragma solidity 0.8.7;
import "ERC721xyz.sol";
import "Pausable.sol";
import "ECDSA.sol";
contract FairXYZDeployer is ERC721xyz, Pausable{
string private _name;
string private _symbol;
using ECDSA for bytes32;
uint256 public maxTokens;
uint256 internal nftPrice;
string private baseURI;
string private pathURI;
string public preRevealURI;
string private _overrideURI;
bool public lockURI;
bool public mintReleased;
address public interfaceAddress;
bool public isBase;
address public owner;
bool public burnable;
uint256 public maxMintsPerWallet;
mapping(bytes32 => bool) private usedHashes;
mapping(address => uint256) public mintsPerWallet;
event OwnershipTransferred(address indexed prevOwner, address indexed newOwner);
event NewPriceSet(uint256 newSetPrice);
event NewMaxMintsPerWalletSet(uint256 newMaxMints);
event NewTokenRoyaltySet(uint256 newRoyalty);
event NewTokenURI(string newTokenURI);
event NewPathURI(string newPathURI);
modifier onlyOwner() {
require(msg.sender == owner, "ERROR");
_;
}
constructor() payable ERC721xyz(_name, _symbol){
isBase = true;
_name = "FairXYZ";
_symbol = "FairXYZ";
_pause();
}
// Collection Name
function name() override public view returns (string memory) {
return _name;
}
// Collection ticker
function symbol() override public view returns (string memory) {
return _symbol;
}
// View all variables
function viewAllVariables() public view returns(uint256, uint256, string memory){
return(nftPrice, maxMintsPerWallet, pathURI);
}
// Signer address for minting
function viewSigner() public view returns(address){
address returnSigner = IFairXYZWallets(interfaceAddress).viewSigner();
return(returnSigner);
}
// Fair.xyz wallet address
function viewWithdraw() public view returns(address){
address returnWithdraw = IFairXYZWallets(interfaceAddress).viewWithdraw();
return(returnWithdraw);
}
// Initialize Creator contract
function initialize(uint256 maxTokens_, uint256 nftPrice_, string memory name_, string memory symbol_,
bool burnable_, uint256 maxMintsPerWallet_, address interfaceAddress_,
string[] memory URIs_, uint96 royaltyPercentage_) external {
require( !isBase , "This contract is not a base contract!");
require( interfaceAddress_ != address(0), "Cannot set to 0 address!");
owner = tx.origin;
maxTokens = maxTokens_;
nftPrice = nftPrice_;
_name = name_;
_symbol = symbol_;
burnable = burnable_;
maxMintsPerWallet = maxMintsPerWallet_;
interfaceAddress = interfaceAddress_;
preRevealURI = URIs_[0];
baseURI = URIs_[1];
pathURI = URIs_[2];
isBase = true;
_setDefaultRoyalty(tx.origin, royaltyPercentage_);
}
// Limit on NFT sale
modifier saleIsOpen{
require(_mintedTokens < maxTokens, "Sale end");
_;
}
// Lock metadata forever
function lockURIforever() external onlyOwner {
lockURI = true;
}
// View price
function price() external view returns (uint256) {
return nftPrice;
}
function hashVariableChanges(address sender, string memory newURI, string memory newPathURI,
uint256 newPrice, uint256 newMaxMintsPerWallet, uint256 newRoyaltyPercentage) private pure returns(bytes32)
{
bytes32 hash = keccak256(abi.encodePacked(
"\x19Ethereum Signed Message:\n32",
keccak256(abi.encodePacked(sender, newURI, newPathURI, newPrice, newMaxMintsPerWallet, newRoyaltyPercentage)))
);
return hash;
}
// change variables in contract
function overrideVariables(bytes memory signature, string memory newURI, string memory newPathURI,
uint256 newPrice, uint256 newMaxMintsPerWallet, uint96 newRoyaltyPercentage)
onlyOwner
external
{
bytes32 messageHash = hashVariableChanges(msg.sender, newURI, newPathURI,
newPrice, newMaxMintsPerWallet, newRoyaltyPercentage);
address signAdd = viewSigner();
require(messageHash.recover(signature) == signAdd, "Unrecognizable Hash");
if(!lockURI)
{
if (bytes(newPathURI).length != 0)
pathURI = newPathURI;
emit NewPathURI(pathURI);
if(bytes(newURI).length != 0)
{
_overrideURI = newURI;
baseURI = "";
emit NewTokenURI(_overrideURI);
}
}
if(newPrice!=nftPrice)
{
nftPrice = newPrice;
emit NewPriceSet(nftPrice);
}
if(newMaxMintsPerWallet!=maxMintsPerWallet)
{
maxMintsPerWallet = newMaxMintsPerWallet;
emit NewMaxMintsPerWalletSet(maxMintsPerWallet);
}
_setDefaultRoyalty(owner, newRoyaltyPercentage);
emit NewTokenRoyaltySet(newRoyaltyPercentage);
}
// return Base URI
function _baseURI() public view override returns (string memory) {
return baseURI;
}
// return Path URI
function _pathURI() public view override returns (string memory) {
if(bytes(_overrideURI).length == 0)
{
return IFairXYZWallets(interfaceAddress).viewPathURI(pathURI);
}
else
{
return _overrideURI;
}
}
// return pre-Reveal URI
function _preRevealURI() public view override returns (string memory) {
return preRevealURI;
}
// See remaining mints
function remainingMints(address minterAddress) public view returns(uint256) {
if (maxMintsPerWallet == 0 ) {
revert("Collection with no mint limit");
}
uint256 mintsLeft = maxMintsPerWallet - mintsPerWallet[minterAddress];
return mintsLeft;
}
// pause minting
function pause() external onlyOwner {
_pause();
}
// unpause minting
function unpause() external onlyOwner {
_unpause();
}
// Burn token
function burn(uint256 tokenId) external returns(uint256)
{
require(burnable, "This contract does not allow burning");
require(msg.sender == ownerOf(tokenId), "Burner is not the owner of token");
_burn(tokenId);
return tokenId;
}
// Airdrop a token
function airdrop(address[] memory address_, uint256 tokenCount) onlyOwner external returns(uint256)
{
require(_mintedTokens + address_.length * tokenCount <= maxTokens, "This exceeds the maximum number of NFTs on sale!");
for(uint256 i = 0; i < address_.length; ) {
_safeMint(address_[i], tokenCount);
++i;
}
return _mintedTokens;
}
// override isApprovedForAll to allow for pre-approved operators (OpenSea and LooksRare)
function isApprovedForAll(address _owner, address operator) public view override(ERC721xyz) returns(bool)
{
return( IFairXYZWallets(interfaceAddress).viewPreapproved(operator) || super.isApprovedForAll(_owner, operator) );
}
function hashTransaction(address sender, uint256 qty, uint256 nonce, uint256 phaseLimit, address address_) private pure returns(bytes32)
{
bytes32 hash = keccak256(abi.encodePacked(
"\x19Ethereum Signed Message:\n32",
keccak256(abi.encodePacked(sender, qty, nonce, phaseLimit, address_)))
);
return hash;
}
// Mint a token
function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens, uint256 phaseLimit)
payable
external
whenNotPaused
saleIsOpen
returns (uint256)
{
bytes32 messageHash = hashTransaction(msg.sender, numberOfTokens, nonce, phaseLimit, address(this));
address signAdd = viewSigner();
require(_mintedTokens < phaseLimit, "End of phase limit!");
require(phaseLimit <= maxTokens, "Phase limit cannot be larger than max tokens");
require(messageHash.recover(signature) == signAdd, "Unrecognizable Hash");
require(!usedHashes[messageHash], "Reused Hash");
require(msg.value >= nftPrice * numberOfTokens, "You have not sent the required amount of ETH");
require(numberOfTokens <= 20, "Token minting limit per transaction exceeded");
require(block.number <= nonce + 20, "Time limit has passed");
require(msg.sender == tx.origin, "Cannot mint from contract");
usedHashes[messageHash] = true;
uint256 origMintCount = numberOfTokens;
// If trying to mint more tokens than available -> reimburse for excess mints and allow for lower mint count
// to avoid a failed tx
if(maxMintsPerWallet > 0)
{
require(mintsPerWallet[msg.sender] < maxMintsPerWallet, "Exceeds number of mints per wallet");
if(mintsPerWallet[msg.sender] + numberOfTokens > maxMintsPerWallet)
{
numberOfTokens = maxMintsPerWallet - mintsPerWallet[msg.sender];
}
}
if( (_mintedTokens + numberOfTokens > phaseLimit) )
{
numberOfTokens = phaseLimit - _mintedTokens;
}
uint256 reimbursement = origMintCount - numberOfTokens;
uint256 reimbursementPrice = reimbursement * nftPrice;
mintsPerWallet[msg.sender] += numberOfTokens;
_mint(msg.sender, numberOfTokens);
// cap reimbursement at msg.value in case something goes wrong
if( 0 < reimbursementPrice && reimbursementPrice < msg.value)
{
(bool sent, ) = msg.sender.call{value: reimbursementPrice}("");
require(sent, "Failed to send Ether");
}
return _mintedTokens;
}
// Release the mint, so no signature is required
function releaseMint() onlyOwner external
{
require(!mintReleased);
mintReleased = true;
}
// Mint a token without a signature, requires mintRelease
function mintNoSignature(uint256 numberOfTokens)
payable
external
whenNotPaused
saleIsOpen
returns (uint256)
{
require(mintReleased, "Please use the mint function to buy your token");
require(msg.value >= nftPrice * numberOfTokens, "You have not sent the required amount of ETH");
require(numberOfTokens <= 20, "Token minting limit per transaction exceeded");
require(msg.sender == tx.origin, "Cannot mint from contract");
uint256 origMintCount = numberOfTokens;
// If trying to mint more tokens than available -> reimburse for excess mints and allow for lower mint count
// to avoid a failed tx
if(maxMintsPerWallet > 0)
{
require(mintsPerWallet[msg.sender] < maxMintsPerWallet, "Exceeds number of mints per wallet");
if(mintsPerWallet[msg.sender] + numberOfTokens > maxMintsPerWallet)
{
numberOfTokens = maxMintsPerWallet - mintsPerWallet[msg.sender];
}
}
if( (_mintedTokens + numberOfTokens > maxTokens) )
{
numberOfTokens = maxTokens - _mintedTokens;
}
uint256 reimbursement = origMintCount - numberOfTokens;
uint256 reimbursementPrice = reimbursement * nftPrice;
mintsPerWallet[msg.sender] += numberOfTokens;
_mint(msg.sender, numberOfTokens);
// cap reimbursement at msg.value in case something goes wrong
if( 0 < reimbursementPrice && reimbursementPrice < msg.value)
{
(bool sent, ) = msg.sender.call{value: reimbursementPrice}("");
require(sent, "Failed to send Ether");
}
return _mintedTokens;
}
// transfer ownership of the smart contract
function transferOwnership(address newOwner) onlyOwner external returns(address)
{
require(newOwner != address(0), "Cannot set zero address as owner!");
owner = newOwner;
emit OwnershipTransferred(msg.sender, newOwner);
return(owner);
}
// only owner or Fair.xyz - withdraw contract balance to owner wallet. 6% primary sale fee to Fair.xyz
function withdraw()
public
payable
{
require(msg.sender == owner || msg.sender == viewWithdraw(), "Not owner or Fair.XYZ!");
require(msg.sender == tx.origin, "Cannot withdraw from a contract");
uint256 contractBalance = address(this).balance;
(bool sent, ) = viewWithdraw().call{value: contractBalance*3/50}("");
require(sent, "Failed to send Ether");
uint256 remainingContractBalance = address(this).balance;
payable(owner).transfer(remainingContractBalance);
}
}// SPDX-License-Identifier: MIT
// @ Fair.xyz dev
pragma solidity 0.8.7;
import "IERC721.sol";
import "IERC721Receiver.sol";
import "IERC721Metadata.sol";
import "Address.sol";
import "Context.sol";
import "Strings.sol";
import "ERC165.sol";
import "ERC2981.sol";
interface IFairXYZWallets {
function viewSigner() view external returns(address);
function viewWithdraw() view external returns(address);
function viewPreapproved(address address_) view external returns(bool);
function viewPathURI(string memory pathURI_) view external returns(string memory);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, with modifications by the Fair.xyz team, thus setting the ERC721xyz standard
*/
contract ERC721xyz is Context, ERC165, IERC721, ERC2981, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Token mint count
uint256 public _mintedTokens;
// Token burnt count
uint256 internal _burntTokens;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping from token ID to original owner address
mapping(uint256 => address) private _origOwners;
// Burnt tokens
mapping(uint256 => bool) private _burnedTokens;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC2981).interfaceId ||
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev Returns number of minted Tokens
*/
function viewMinted() public view virtual returns(uint256) {
return _mintedTokens;
}
// return all tokens
function totalSupply() public view virtual returns(uint256) {
return _mintedTokens - _burntTokens;
}
/**
* @dev Mints a batch of `tokenIds` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `to` cannot be the zero address.
*
* Emits {Transfer} events.
*/
function _mint(address to, uint256 numberOfTokens) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
uint256 orig_count = _mintedTokens;
_mintedTokens += numberOfTokens;
_beforeTokenTransfer(address(0), to, _mintedTokens);
_balances[to] += numberOfTokens;
_origOwners[_mintedTokens] = to;
uint256 loop_ = orig_count + numberOfTokens + 1;
for (uint i = orig_count + 1; i < loop_ ; ) {
emit Transfer(address(0), to, i);
++i;
}
_afterTokenTransfer(address(0), to, _mintedTokens);
}
/**
* @dev Returns owner of token ID.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721xyz: Query for non existent token!");
uint256 counter = tokenId;
if(_owners[tokenId] == address(0))
{
while (true) {
address firstOwner = _origOwners[counter];
if (firstOwner != address(0)) {
return firstOwner;
}
++counter;
}
} else {
return _owners[tokenId];
}
}
/**
* @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 Combines path URI, base URI and pre-reveal URI for the full metadata journey on Fair.xyz
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory pathURI = _pathURI();
string memory baseURI = _baseURI();
string memory preRevealURI = _preRevealURI();
if (bytes(pathURI).length == 0)
{
return preRevealURI;
}
else
{
return string(abi.encodePacked(pathURI, baseURI, tokenId.toString()));
}
}
/**
* @dev Base URI for computing {tokenURI}. If the pathURI is set, the resulting URI for each
* token will be the concatenation of the `baseURI`, the `pathURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() public view virtual returns (string memory) {
return "";
}
/**
* @dev FairXYZ - URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI`, the `pathURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _pathURI() public view virtual returns (string memory) {
return "";
}
/**
* @dev FairXYZ - URI to be shown during pre-reveal of a collection
*/
function _preRevealURI() public view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721xyz.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: 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), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: 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), "ERC721: 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, _data), "ERC721: 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`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
if(_burnedTokens[tokenId]) return false;
return (0 < tokenId && tokenId <= _mintedTokens);
}
/**
* @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), "ERC721: operator query for nonexistent token");
address owner = ERC721xyz.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenCount) internal virtual {
_safeMint(to, tokenCount, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenCount,
bytes memory _data
) internal virtual {
_mint(to, tokenCount);
require(
_checkOnERC721Received(address(0), to, _mintedTokens, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
require(_exists(tokenId), "ERC721xyz: Query for nonexistent token!");
address owner = ERC721xyz.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
_burnedTokens[tokenId] = true;
_burntTokens += 1;
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), 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 {
require(ERC721xyz.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721xyz.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) 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) (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
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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.6.0) (token/common/ERC2981.sol)
pragma solidity ^0.8.0;
import "IERC2981.sol";
import "ERC165.sol";
/**
* @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
*
* Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
* specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
*
* Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
* fee is specified in basis points by default.
*
* IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
* https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
* voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
*
* _Available since v4.5._
*/
abstract contract ERC2981 is IERC2981, ERC165 {
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
RoyaltyInfo private _defaultRoyaltyInfo;
mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];
if (royalty.receiver == address(0)) {
royalty = _defaultRoyaltyInfo;
}
uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();
return (royalty.receiver, royaltyAmount);
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
return 10000;
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: invalid receiver");
_defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Removes default royalty information.
*/
function _deleteDefaultRoyalty() internal virtual {
delete _defaultRoyaltyInfo;
}
/**
* @dev Sets the royalty information for a specific token id, overriding the global default.
*
* Requirements:
*
* - `tokenId` must be already minted.
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setTokenRoyalty(
uint256 tokenId,
address receiver,
uint96 feeNumerator
) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: Invalid parameters");
_tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Resets royalty information for the token id back to the global default.
*/
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
delete _tokenRoyaltyInfo[tokenId];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)
pragma solidity ^0.8.0;
import "IERC165.sol";
/**
* @dev Interface for the NFT Royalty Standard.
*
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
* support for royalty payments across all NFT marketplaces and ecosystem participants.
*
* _Available since v4.5._
*/
interface IERC2981 is IERC165 {
/**
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
returns (address receiver, uint256 royaltyAmount);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
import "Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else if (signature.length == 64) {
bytes32 r;
bytes32 vs;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}{
"evmVersion": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"libraries": {
"FairXYZDeployer.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":[],"stateMutability":"payable","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":false,"internalType":"uint256","name":"newMaxMints","type":"uint256"}],"name":"NewMaxMintsPerWalletSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newPathURI","type":"string"}],"name":"NewPathURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newSetPrice","type":"uint256"}],"name":"NewPriceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRoyalty","type":"uint256"}],"name":"NewTokenRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newTokenURI","type":"string"}],"name":"NewTokenURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"_baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_mintedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_pathURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_preRevealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"address_","type":"address[]"},{"internalType":"uint256","name":"tokenCount","type":"uint256"}],"name":"airdrop","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"maxTokens_","type":"uint256"},{"internalType":"uint256","name":"nftPrice_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"bool","name":"burnable_","type":"bool"},{"internalType":"uint256","name":"maxMintsPerWallet_","type":"uint256"},{"internalType":"address","name":"interfaceAddress_","type":"address"},{"internalType":"string[]","name":"URIs_","type":"string[]"},{"internalType":"uint96","name":"royaltyPercentage_","type":"uint96"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"interfaceAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBase","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockURIforever","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxMintsPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"phaseLimit","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintNoSignature","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintReleased","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintsPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"newURI","type":"string"},{"internalType":"string","name":"newPathURI","type":"string"},{"internalType":"uint256","name":"newPrice","type":"uint256"},{"internalType":"uint256","name":"newMaxMintsPerWallet","type":"uint256"},{"internalType":"uint96","name":"newRoyaltyPercentage","type":"uint96"}],"name":"overrideVariables","outputs":[],"stateMutability":"nonpayable","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preRevealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minterAddress","type":"address"}],"name":"remainingMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"viewAllVariables","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewWithdraw","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
6080604052600d805462000013906200032b565b80601f016020809104026020016040519081016040528092919081815260200182805462000041906200032b565b8015620000925780601f10620000665761010080835404028352916020019162000092565b820191906000526020600020905b8154815290600101906020018083116200007457829003601f168201915b5050505050600e8054620000a6906200032b565b80601f0160208091040260200160405190810160405280929190818152602001828054620000d4906200032b565b8015620001255780601f10620000f95761010080835404028352916020019162000125565b820191906000526020600020905b8154815290600101906020018083116200010757829003601f168201915b505084516200013f93506002925060208601915062000285565b5080516200015590600390602084019062000285565b5050600c805460ff19169055506015805460ff60b01b1916600160b01b179055604080518082019091526007808252662330b4b92c2cad60c91b6020909201918252620001a591600d9162000285565b50604080518082019091526007808252662330b4b92c2cad60c91b6020909201918252620001d691600e9162000285565b50620001e1620001e7565b62000368565b600c5460ff1615620002325760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620002683390565b6040516001600160a01b03909116815260200160405180910390a1565b82805462000293906200032b565b90600052602060002090601f016020900481019282620002b7576000855562000302565b82601f10620002d257805160ff191683800117855562000302565b8280016001018555821562000302579182015b8281111562000302578251825591602001919060010190620002e5565b506200031092915062000314565b5090565b5b8082111562000310576000815560010162000315565b600181811c908216806200034057607f821691505b602082108114156200036257634e487b7160e01b600052602260045260246000fd5b50919050565b613f8b80620003786000396000f3fe6080604052600436106102935760003560e01c8063789fe3551161015a578063a22cb465116100c1578063d6d12c401161007a578063d6d12c4014610782578063e831574214610795578063e985e9c5146107ab578063effcf2b7146107cb578063f2fde38b146107e0578063f516a2e61461080057600080fd5b8063a22cb465146106c7578063aa8a6754146106e7578063b1ff4adf1461070d578063b88d4fde14610722578063c204642c14610742578063c87b56dd1461076257600080fd5b806390411aca1161011357806390411aca1461063257806395d89b4114610647578063966b87561461065c57806397f5cdcf1461067b578063a035b1fe14610691578063a07c7ce4146106a657600080fd5b8063789fe3551461059857806379b6ed36146105ad5780637f80069a146105c25780638456cb59146105e35780638da5cb5b146105f85780638e021c061461061857600080fd5b80633f4ba83a116101fe5780635c975abb116101b75780635c975abb146104eb5780636352211e1461050357806364d0764e146105235780636724f4b71461054357806370a0823114610563578063743976a01461058357600080fd5b80633f4ba83a1461043457806340eea5331461044957806342842e0e1461046957806342966c68146104895780634d0df5fc146104a957806351e85af6146104d657600080fd5b806318160ddd1161025057806318160ddd1461037357806318bf93d41461039657806323b872dd146103a95780632a55205a146103c957806334d5f3b0146104085780633ccfd60b1461042c57600080fd5b806301ffc9a7146102985780630293741b146102cd57806304b8adb4146102ef57806306fdde031461031c578063081812fc14610331578063095ea7b314610351575b600080fd5b3480156102a457600080fd5b506102b86102b33660046136a4565b610816565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102e2610877565b6040516102c49190613a71565b3480156102fb57600080fd5b50610304610909565b6040516001600160a01b0390911681526020016102c4565b34801561032857600080fd5b506102e2610992565b34801561033d57600080fd5b5061030461034c366004613854565b6109a1565b34801561035d57600080fd5b5061037161036c3660046135b4565b610a2e565b005b34801561037f57600080fd5b50610388610b44565b6040519081526020016102c4565b6103886103a4366004613854565b610b5b565b3480156103b557600080fd5b506103716103c43660046134d9565b610e51565b3480156103d557600080fd5b506103e96103e436600461386d565b610e82565b604080516001600160a01b0390931683526020830191909152016102c4565b34801561041457600080fd5b5061041d610f30565b6040516102c493929190613d20565b610371610fd4565b34801561044057600080fd5b50610371611166565b34801561045557600080fd5b5061037161046436600461388f565b61119a565b34801561047557600080fd5b506103716104843660046134d9565b611395565b34801561049557600080fd5b506103886104a4366004613854565b6113b0565b3480156104b557600080fd5b506103886104c4366004613466565b60196020526000908152604090205481565b3480156104e257600080fd5b5061037161148e565b3480156104f757600080fd5b50600c5460ff166102b8565b34801561050f57600080fd5b5061030461051e366004613854565b6114c7565b34801561052f57600080fd5b5061038861053e366004613466565b6115a7565b34801561054f57600080fd5b5061037161055e3660046136de565b611629565b34801561056f57600080fd5b5061038861057e366004613466565b61188b565b34801561058f57600080fd5b506102e2611912565b3480156105a457600080fd5b50610371611921565b3480156105b957600080fd5b506102e2611971565b3480156105ce57600080fd5b506015546102b890600160b01b900460ff1681565b3480156105ef57600080fd5b506103716119ff565b34801561060457600080fd5b50601654610304906001600160a01b031681565b34801561062457600080fd5b506015546102b89060ff1681565b34801561063e57600080fd5b50600454610388565b34801561065357600080fd5b506102e2611a31565b34801561066857600080fd5b506015546102b890610100900460ff1681565b34801561068757600080fd5b5061038860045481565b34801561069d57600080fd5b50601054610388565b3480156106b257600080fd5b506016546102b890600160a01b900460ff1681565b3480156106d357600080fd5b506103716106e2366004613586565b611a40565b3480156106f357600080fd5b50601554610304906201000090046001600160a01b031681565b34801561071957600080fd5b50610304611a4f565b34801561072e57600080fd5b5061037161073d36600461351a565b611aa0565b34801561074e57600080fd5b5061038861075d3660046135e0565b611ad2565b34801561076e57600080fd5b506102e261077d366004613854565b611bcd565b610388610790366004613789565b611ca8565b3480156107a157600080fd5b50610388600f5481565b3480156107b757600080fd5b506102b86107c63660046134a0565b6121a2565b3480156107d757600080fd5b506102e261225a565b3480156107ec57600080fd5b506103046107fb366004613466565b612308565b34801561080c57600080fd5b5061038860175481565b60006001600160e01b0319821663152a902d60e11b148061084757506001600160e01b031982166380ac58cd60e01b145b8061086257506001600160e01b03198216635b5e139f60e01b145b806108715750610871826123ef565b92915050565b60606013805461088690613e4a565b80601f01602080910402602001604051908101604052809291908181526020018280546108b290613e4a565b80156108ff5780601f106108d4576101008083540402835291602001916108ff565b820191906000526020600020905b8154815290600101906020018083116108e257829003601f168201915b5050505050905090565b600080601560029054906101000a90046001600160a01b03166001600160a01b03166304b8adb46040518163ffffffff1660e01b815260040160206040518083038186803b15801561095a57600080fd5b505afa15801561096e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108719190613483565b6060600d805461088690613e4a565b60006109ac82612424565b610a125760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b6000610a39826114c7565b9050806001600160a01b0316836001600160a01b03161415610aa75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a09565b336001600160a01b0382161480610ac35750610ac381336121a2565b610b355760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a09565b610b3f8383612457565b505050565b6000600554600454610b569190613e07565b905090565b6000610b69600c5460ff1690565b15610b865760405162461bcd60e51b8152600401610a0990613bcb565b600f5460045410610bc45760405162461bcd60e51b815260206004820152600860248201526714d85b1948195b9960c21b6044820152606401610a09565b601554610100900460ff16610c325760405162461bcd60e51b815260206004820152602e60248201527f506c656173652075736520746865206d696e742066756e6374696f6e20746f2060448201526d313abc903cb7bab9103a37b5b2b760911b6064820152608401610a09565b81601054610c409190613de8565b341015610c5f5760405162461bcd60e51b8152600401610a0990613c41565b6014821115610c805760405162461bcd60e51b8152600401610a0990613bf5565b333214610ccb5760405162461bcd60e51b815260206004820152601960248201527810d85b9b9bdd081b5a5b9d08199c9bdb4818dbdb9d1c9858dd603a1b6044820152606401610a09565b601754829015610d49576017543360009081526019602052604090205410610d055760405162461bcd60e51b8152600401610a0990613cde565b60175433600090815260196020526040902054610d23908590613dbc565b1115610d495733600090815260196020526040902054601754610d469190613e07565b92505b600f5483600454610d5a9190613dbc565b1115610d7357600454600f54610d709190613e07565b92505b6000610d7f8483613e07565b9050600060105482610d919190613de8565b33600090815260196020526040812080549293508792909190610db5908490613dbc565b90915550610dc5905033866124c5565b806000108015610dd457503481105b15610e4357604051600090339083908381818185875af1925050503d8060008114610e1b576040519150601f19603f3d011682016040523d82523d6000602084013e610e20565b606091505b5050905080610e415760405162461bcd60e51b8152600401610a0990613b7e565b505b60045493505050505b919050565b610e5b3382612607565b610e775760405162461bcd60e51b8152600401610a0990613c8d565b610b3f8383836126c9565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610ef75750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610f16906001600160601b031687613de8565b610f209190613dd4565b91519350909150505b9250929050565b60008060606010546017546012808054610f4990613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7590613e4a565b8015610fc25780601f10610f9757610100808354040283529160200191610fc2565b820191906000526020600020905b815481529060010190602001808311610fa557829003601f168201915b50505050509050925092509250909192565b6016546001600160a01b03163314806110055750610ff0610909565b6001600160a01b0316336001600160a01b0316145b61104a5760405162461bcd60e51b81526020600482015260166024820152754e6f74206f776e6572206f7220466169722e58595a2160501b6044820152606401610a09565b3332146110995760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f742077697468647261772066726f6d206120636f6e7472616374006044820152606401610a09565b4760006110a4610909565b6001600160a01b031660326110ba846003613de8565b6110c49190613dd4565b604051600081818185875af1925050503d8060008114611100576040519150601f19603f3d011682016040523d82523d6000602084013e611105565b606091505b50509050806111265760405162461bcd60e51b8152600401610a0990613b7e565b60165460405147916001600160a01b03169082156108fc029083906000818181858888f19350505050158015611160573d6000803e3d6000fd5b50505050565b6016546001600160a01b031633146111905760405162461bcd60e51b8152600401610a0990613bac565b611198612865565b565b601554600160b01b900460ff16156112025760405162461bcd60e51b815260206004820152602560248201527f5468697320636f6e7472616374206973206e6f742061206261736520636f6e74604482015264726163742160d81b6064820152608401610a09565b6001600160a01b0383166112585760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f742073657420746f203020616464726573732100000000000000006044820152606401610a09565b601680546001600160a01b03191632179055600f8990556010889055865161128790600d9060208a01906132c1565b50855161129b90600e9060208901906132c1565b506016805460ff60a01b1916600160a01b8715150217905560178490556015805462010000600160b01b031916620100006001600160a01b03861602179055815182906000906112ed576112ed613ef0565b60200260200101516013908051906020019061130a9291906132c1565b508160018151811061131e5761131e613ef0565b60200260200101516011908051906020019061133b9291906132c1565b508160028151811061134f5761134f613ef0565b60200260200101516012908051906020019061136c9291906132c1565b506015805460ff60b01b1916600160b01b17905561138a32826128f8565b505050505050505050565b610b3f83838360405180602001604052806000815250611aa0565b601654600090600160a01b900460ff166114185760405162461bcd60e51b8152602060048201526024808201527f5468697320636f6e747261637420646f6573206e6f7420616c6c6f77206275726044820152636e696e6760e01b6064820152608401610a09565b611421826114c7565b6001600160a01b0316336001600160a01b0316146114815760405162461bcd60e51b815260206004820181905260248201527f4275726e6572206973206e6f7420746865206f776e6572206f6620746f6b656e6044820152606401610a09565b61148a826129f5565b5090565b6016546001600160a01b031633146114b85760405162461bcd60e51b8152600401610a0990613bac565b6015805460ff19166001179055565b60006114d282612424565b61152f5760405162461bcd60e51b815260206004820152602860248201527f45524337323178797a3a20517565727920666f72206e6f6e206578697374656e6044820152677420746f6b656e2160c01b6064820152608401610a09565b60008281526006602052604090205482906001600160a01b0316611584575b6000818152600760205260409020546001600160a01b03168015611573579392505050565b61157c82613e7f565b91505061154e565b50506000908152600660205260409020546001600160a01b031690565b50919050565b6000601754600014156115fc5760405162461bcd60e51b815260206004820152601d60248201527f436f6c6c656374696f6e2077697468206e6f206d696e74206c696d69740000006044820152606401610a09565b6001600160a01b0382166000908152601960205260408120546017546116229190613e07565b9392505050565b6016546001600160a01b031633146116535760405162461bcd60e51b8152600401610a0990613bac565b600061166c3387878787876001600160601b0316612b10565b90506000611678611a4f565b90506001600160a01b03811661168e838a612b9b565b6001600160a01b0316146116da5760405162461bcd60e51b81526020600482015260136024820152720aadce4cac6decedcd2f4c2c4d8ca4090c2e6d606b1b6044820152606401610a09565b60155460ff166117ab578551156117005785516116fe9060129060208901906132c1565b505b7ff5e721c51327df71720f204c71b46bc26bcafb44db5012739c85814c7862f6c060126040516117309190613a84565b60405180910390a18651156117ab5786516117529060149060208a01906132c1565b50604080516020810191829052600090819052611771916011916132c1565b507f8eca6ea708f9bc34439b72366aa672afc86bb8b1294f1ba9637945c5dab8ea7460146040516117a29190613a84565b60405180910390a15b60105485146117ed5760108590556040518581527f4e8ad04c3fba0cbea0ab1df84b92a72a289ddf64da15f4c1c396891d37c39b019060200160405180910390a15b601754841461182f5760178490556040518481527f197d886c40774caf128e7e2e1aa923f098e68a7ae1e9a68912876c9c39cb35e29060200160405180910390a15b601654611845906001600160a01b0316846128f8565b6040516001600160601b03841681527f678508bbe10280c43a37edb4dc4ab608de80fb9be32078fcd26a5284fce504fb9060200160405180910390a15050505050505050565b60006001600160a01b0382166118f65760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a09565b506001600160a01b031660009081526009602052604090205490565b60606011805461088690613e4a565b6016546001600160a01b0316331461194b5760405162461bcd60e51b8152600401610a0990613bac565b601554610100900460ff161561196057600080fd5b6015805461ff001916610100179055565b6013805461197e90613e4a565b80601f01602080910402602001604051908101604052809291908181526020018280546119aa90613e4a565b80156119f75780601f106119cc576101008083540402835291602001916119f7565b820191906000526020600020905b8154815290600101906020018083116119da57829003601f168201915b505050505081565b6016546001600160a01b03163314611a295760405162461bcd60e51b8152600401610a0990613bac565b611198612bbf565b6060600e805461088690613e4a565b611a4b338383612c17565b5050565b600080601560029054906101000a90046001600160a01b03166001600160a01b031663b1ff4adf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561095a57600080fd5b611aaa3383612607565b611ac65760405162461bcd60e51b8152600401610a0990613c8d565b61116084848484612ce6565b6016546000906001600160a01b03163314611aff5760405162461bcd60e51b8152600401610a0990613bac565b600f54828451611b0f9190613de8565b600454611b1c9190613dbc565b1115611b835760405162461bcd60e51b815260206004820152603060248201527f54686973206578636565647320746865206d6178696d756d206e756d6265722060448201526f6f66204e465473206f6e2073616c652160801b6064820152608401610a09565b60005b8351811015611bc257611bb2848281518110611ba457611ba4613ef0565b602002602001015184612d19565b611bbb81613e7f565b9050611b86565b505060045492915050565b6060611bd882612424565b611c3c5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a09565b6000611c4661225a565b90506000611c52611912565b90506000611c5e610877565b9050825160001415611c7257949350505050565b8282611c7d87612d33565b604051602001611c8f939291906139f1565b6040516020818303038152906040529350505050919050565b6000611cb6600c5460ff1690565b15611cd35760405162461bcd60e51b8152600401610a0990613bcb565b600f5460045410611d115760405162461bcd60e51b815260206004820152600860248201526714d85b1948195b9960c21b6044820152606401610a09565b6040805133606090811b6bffffffffffffffffffffffff199081166020808501919091526034840188905260548401899052607484018790523090921b1660948301528251608881840301815260a8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c884015260e4808401919091528351808403909101815261010490920190925280519101206000611dbb611a4f565b90508360045410611e045760405162461bcd60e51b8152602060048201526013602482015272456e64206f66207068617365206c696d69742160681b6044820152606401610a09565b600f54841115611e6b5760405162461bcd60e51b815260206004820152602c60248201527f5068617365206c696d69742063616e6e6f74206265206c61726765722074686160448201526b6e206d617820746f6b656e7360a01b6064820152608401610a09565b6001600160a01b038116611e7f8389612b9b565b6001600160a01b031614611ecb5760405162461bcd60e51b81526020600482015260136024820152720aadce4cac6decedcd2f4c2c4d8ca4090c2e6d606b1b6044820152606401610a09565b60008281526018602052604090205460ff1615611f185760405162461bcd60e51b815260206004820152600b60248201526a0a4caeae6cac84090c2e6d60ab1b6044820152606401610a09565b84601054611f269190613de8565b341015611f455760405162461bcd60e51b8152600401610a0990613c41565b6014851115611f665760405162461bcd60e51b8152600401610a0990613bf5565b611f71866014613dbc565b431115611fb85760405162461bcd60e51b8152602060048201526015602482015274151a5b59481b1a5b5a5d081a185cc81c185cdcd959605a1b6044820152606401610a09565b3332146120035760405162461bcd60e51b815260206004820152601960248201527810d85b9b9bdd081b5a5b9d08199c9bdb4818dbdb9d1c9858dd603a1b6044820152606401610a09565b6000828152601860205260409020805460ff1916600117905560175485901561209a5760175433600090815260196020526040902054106120565760405162461bcd60e51b8152600401610a0990613cde565b60175433600090815260196020526040902054612074908890613dbc565b111561209a57336000908152601960205260409020546017546120979190613e07565b95505b84866004546120a99190613dbc565b11156120bf576004546120bc9086613e07565b95505b60006120cb8783613e07565b90506000601054826120dd9190613de8565b33600090815260196020526040812080549293508a92909190612101908490613dbc565b90915550612111905033896124c5565b80600010801561212057503481105b1561218f57604051600090339083908381818185875af1925050503d8060008114612167576040519150601f19603f3d011682016040523d82523d6000602084013e61216c565b606091505b505090508061218d5760405162461bcd60e51b8152600401610a0990613b7e565b505b600454955050505050505b949350505050565b60155460405163e6df3d4760e01b81526001600160a01b038381166004830152600092620100009004169063e6df3d479060240160206040518083038186803b1580156121ee57600080fd5b505afa158015612202573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122269190613687565b8061162257506001600160a01b038084166000908152600b602090815260408083209386168352929052205460ff16611622565b60606014805461226990613e4a565b151590506122fb5760155460405163511113e560e01b8152620100009091046001600160a01b03169063511113e5906122a790601290600401613a84565b60006040518083038186803b1580156122bf57600080fd5b505afa1580156122d3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b5691908101906137dd565b6014805461088690613e4a565b6016546000906001600160a01b031633146123355760405162461bcd60e51b8152600401610a0990613bac565b6001600160a01b0382166123955760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420736574207a65726f2061646472657373206173206f776e65726044820152602160f81b6064820152608401610a09565b601680546001600160a01b0319166001600160a01b03841690811790915560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350506016546001600160a01b031690565b60006001600160e01b0319821663152a902d60e11b148061087157506301ffc9a760e01b6001600160e01b0319831614610871565b60008181526008602052604081205460ff161561244357506000919050565b816000108015610871575050600454101590565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061248c826114c7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b03821661251b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a09565b60048054908290600061252e8385613dbc565b90915550506001600160a01b0383166000908152600960205260408120805484929061255b908490613dbc565b9091555050600454600090815260076020526040812080546001600160a01b0319166001600160a01b0386161790556125948383613dbc565b61259f906001613dbc565b905060006125ae836001613dbc565b90505b818110156126015760405181906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46125fa81613e7f565b90506125b1565b50611160565b600061261282612424565b6126735760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a09565b600061267e836114c7565b9050806001600160a01b0316846001600160a01b031614806126b95750836001600160a01b03166126ae846109a1565b6001600160a01b0316145b8061219a575061219a81856121a2565b826001600160a01b03166126dc826114c7565b6001600160a01b0316146127405760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a09565b6001600160a01b0382166127a25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a09565b6127ad600082612457565b6001600160a01b03831660009081526009602052604081208054600192906127d6908490613e07565b90915550506001600160a01b0382166000908152600960205260408120805460019290612804908490613dbc565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600c5460ff166128ae5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a09565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6127106001600160601b03821611156129665760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610a09565b6001600160a01b0382166129bc5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610a09565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b6129fe81612424565b612a5a5760405162461bcd60e51b815260206004820152602760248201527f45524337323178797a3a20517565727920666f72206e6f6e6578697374656e7460448201526620746f6b656e2160c81b6064820152608401610a09565b6000612a65826114c7565b9050612a72600083612457565b6001600160a01b0381166000908152600960205260408120805460019290612a9b908490613e07565b90915550506000828152600860205260408120805460ff191660019081179091556005805491929091612acf908490613dbc565b909155505060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600080878787878787604051602001612b2e96959493929190613993565b60408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c0160408051808303601f19018152919052805160209091012098975050505050505050565b6000806000612baa8585612e31565b91509150612bb781612e9e565b509392505050565b600c5460ff1615612be25760405162461bcd60e51b8152600401610a0990613bcb565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128db3390565b816001600160a01b0316836001600160a01b03161415612c795760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a09565b6001600160a01b038381166000818152600b6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612cf18484846126c9565b612cfd8484848461305c565b6111605760405162461bcd60e51b8152600401610a0990613b2c565b611a4b828260405180602001604052806000815250613166565b606081612d575750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d815780612d6b81613e7f565b9150612d7a9050600a83613dd4565b9150612d5b565b60008167ffffffffffffffff811115612d9c57612d9c613f06565b6040519080825280601f01601f191660200182016040528015612dc6576020820181803683370190505b5090505b841561219a57612ddb600183613e07565b9150612de8600a86613e9a565b612df3906030613dbc565b60f81b818381518110612e0857612e08613ef0565b60200101906001600160f81b031916908160001a905350612e2a600a86613dd4565b9450612dca565b600080825160411415612e685760208301516040840151606085015160001a612e5c8782858561319b565b94509450505050610f29565b825160401415612e925760208301516040840151612e87868383613288565b935093505050610f29565b50600090506002610f29565b6000816004811115612eb257612eb2613eda565b1415612ebb5750565b6001816004811115612ecf57612ecf613eda565b1415612f1d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a09565b6002816004811115612f3157612f31613eda565b1415612f7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a09565b6003816004811115612f9357612f93613eda565b1415612fec5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a09565b600481600481111561300057613000613eda565b14156130595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a09565b50565b60006001600160a01b0384163b1561315e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906130a0903390899088908890600401613a34565b602060405180830381600087803b1580156130ba57600080fd5b505af19250505080156130ea575060408051601f3d908101601f191682019092526130e7918101906136c1565b60015b613144573d808015613118576040519150601f19603f3d011682016040523d82523d6000602084013e61311d565b606091505b50805161313c5760405162461bcd60e51b8152600401610a0990613b2c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061219a565b50600161219a565b61317083836124c5565b61317f6000846004548461305c565b610b3f5760405162461bcd60e51b8152600401610a0990613b2c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156131d2575060009050600361327f565b8460ff16601b141580156131ea57508460ff16601c14155b156131fb575060009050600461327f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561324f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166132785760006001925092505061327f565b9150600090505b94509492505050565b6000806001600160ff1b038316816132a560ff86901c601b613dbc565b90506132b38782888561319b565b935093505050935093915050565b8280546132cd90613e4a565b90600052602060002090601f0160209004810192826132ef5760008555613335565b82601f1061330857805160ff1916838001178555613335565b82800160010185558215613335579182015b8281111561333557825182559160200191906001019061331a565b5061148a9291505b8082111561148a576000815560010161333d565b8035610e4c81613f1c565b600082601f83011261336d57600080fd5b8135602061338261337d83613d70565b613d3f565b80838252828201915082860187848660051b89010111156133a257600080fd5b6000805b868110156133e557823567ffffffffffffffff8111156133c4578283fd5b6133d28b88838d01016133fe565b86525093850193918501916001016133a6565b509198975050505050505050565b8035610e4c81613f31565b600082601f83011261340f57600080fd5b813561341d61337d82613d94565b81815284602083860101111561343257600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160601b0381168114610e4c57600080fd5b60006020828403121561347857600080fd5b813561162281613f1c565b60006020828403121561349557600080fd5b815161162281613f1c565b600080604083850312156134b357600080fd5b82356134be81613f1c565b915060208301356134ce81613f1c565b809150509250929050565b6000806000606084860312156134ee57600080fd5b83356134f981613f1c565b9250602084013561350981613f1c565b929592945050506040919091013590565b6000806000806080858703121561353057600080fd5b843561353b81613f1c565b9350602085013561354b81613f1c565b925060408501359150606085013567ffffffffffffffff81111561356e57600080fd5b61357a878288016133fe565b91505092959194509250565b6000806040838503121561359957600080fd5b82356135a481613f1c565b915060208301356134ce81613f31565b600080604083850312156135c757600080fd5b82356135d281613f1c565b946020939093013593505050565b600080604083850312156135f357600080fd5b823567ffffffffffffffff81111561360a57600080fd5b8301601f8101851361361b57600080fd5b8035602061362b61337d83613d70565b80838252828201915082850189848660051b880101111561364b57600080fd5b600095505b8486101561367757803561366381613f1c565b835260019590950194918301918301613650565b5098969091013596505050505050565b60006020828403121561369957600080fd5b815161162281613f31565b6000602082840312156136b657600080fd5b813561162281613f3f565b6000602082840312156136d357600080fd5b815161162281613f3f565b60008060008060008060c087890312156136f757600080fd5b863567ffffffffffffffff8082111561370f57600080fd5b61371b8a838b016133fe565b9750602089013591508082111561373157600080fd5b61373d8a838b016133fe565b9650604089013591508082111561375357600080fd5b5061376089828a016133fe565b945050606087013592506080870135915061377d60a0880161344f565b90509295509295509295565b6000806000806080858703121561379f57600080fd5b843567ffffffffffffffff8111156137b657600080fd5b6137c2878288016133fe565b97602087013597506040870135966060013595509350505050565b6000602082840312156137ef57600080fd5b815167ffffffffffffffff81111561380657600080fd5b8201601f8101841361381757600080fd5b805161382561337d82613d94565b81815285602083850101111561383a57600080fd5b61384b826020830160208601613e1e565b95945050505050565b60006020828403121561386657600080fd5b5035919050565b6000806040838503121561388057600080fd5b50508035926020909101359150565b60008060008060008060008060006101208a8c0312156138ae57600080fd5b8935985060208a0135975060408a013567ffffffffffffffff808211156138d457600080fd5b6138e08d838e016133fe565b985060608c01359150808211156138f657600080fd5b6139028d838e016133fe565b975061391060808d016133f3565b965060a08c0135955061392560c08d01613351565b945060e08c013591508082111561393b57600080fd5b506139488c828d0161335c565b9250506139586101008b0161344f565b90509295985092959850929598565b6000815180845261397f816020860160208601613e1e565b601f01601f19169290920160200192915050565b6001600160601b03198760601b168152600086516139b8816014850160208b01613e1e565b8651908301906139cf816014840160208b01613e1e565b0160148101959095525050603483019190915260548201526074019392505050565b60008451613a03818460208901613e1e565b845190830190613a17818360208901613e1e565b8451910190613a2a818360208801613e1e565b0195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613a6790830184613967565b9695505050505050565b6020815260006116226020830184613967565b600060208083526000845481600182811c915080831680613aa657607f831692505b858310811415613ac457634e487b7160e01b85526022600452602485fd5b878601838152602001818015613ae15760018114613af257613b1d565b60ff19861682528782019650613b1d565b60008b81526020902060005b86811015613b1757815484820152908501908901613afe565b83019750505b50949998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601490820152732330b4b632b2103a379039b2b7321022ba3432b960611b604082015260600190565b60208082526005908201526422a92927a960d91b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252602c908201527f546f6b656e206d696e74696e67206c696d697420706572207472616e7361637460408201526b1a5bdb88195e18d95959195960a21b606082015260800190565b6020808252602c908201527f596f752068617665206e6f742073656e7420746865207265717569726564206160408201526b0dadeeadce840decc408aa8960a31b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526022908201527f45786365656473206e756d626572206f66206d696e7473207065722077616c6c604082015261195d60f21b606082015260800190565b83815282602082015260606040820152600061384b6060830184613967565b604051601f8201601f1916810167ffffffffffffffff81118282101715613d6857613d68613f06565b604052919050565b600067ffffffffffffffff821115613d8a57613d8a613f06565b5060051b60200190565b600067ffffffffffffffff821115613dae57613dae613f06565b50601f01601f191660200190565b60008219821115613dcf57613dcf613eae565b500190565b600082613de357613de3613ec4565b500490565b6000816000190483118215151615613e0257613e02613eae565b500290565b600082821015613e1957613e19613eae565b500390565b60005b83811015613e39578181015183820152602001613e21565b838111156111605750506000910152565b600181811c90821680613e5e57607f821691505b602082108114156115a157634e487b7160e01b600052602260045260246000fd5b6000600019821415613e9357613e93613eae565b5060010190565b600082613ea957613ea9613ec4565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461305957600080fd5b801515811461305957600080fd5b6001600160e01b03198116811461305957600080fdfea2646970667358221220df5574d12e1353d7d5d92aafe1998858ee740c89eefcffeb0d95578ad0ceb85264736f6c63430008070033
Deployed Bytecode
0x6080604052600436106102935760003560e01c8063789fe3551161015a578063a22cb465116100c1578063d6d12c401161007a578063d6d12c4014610782578063e831574214610795578063e985e9c5146107ab578063effcf2b7146107cb578063f2fde38b146107e0578063f516a2e61461080057600080fd5b8063a22cb465146106c7578063aa8a6754146106e7578063b1ff4adf1461070d578063b88d4fde14610722578063c204642c14610742578063c87b56dd1461076257600080fd5b806390411aca1161011357806390411aca1461063257806395d89b4114610647578063966b87561461065c57806397f5cdcf1461067b578063a035b1fe14610691578063a07c7ce4146106a657600080fd5b8063789fe3551461059857806379b6ed36146105ad5780637f80069a146105c25780638456cb59146105e35780638da5cb5b146105f85780638e021c061461061857600080fd5b80633f4ba83a116101fe5780635c975abb116101b75780635c975abb146104eb5780636352211e1461050357806364d0764e146105235780636724f4b71461054357806370a0823114610563578063743976a01461058357600080fd5b80633f4ba83a1461043457806340eea5331461044957806342842e0e1461046957806342966c68146104895780634d0df5fc146104a957806351e85af6146104d657600080fd5b806318160ddd1161025057806318160ddd1461037357806318bf93d41461039657806323b872dd146103a95780632a55205a146103c957806334d5f3b0146104085780633ccfd60b1461042c57600080fd5b806301ffc9a7146102985780630293741b146102cd57806304b8adb4146102ef57806306fdde031461031c578063081812fc14610331578063095ea7b314610351575b600080fd5b3480156102a457600080fd5b506102b86102b33660046136a4565b610816565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102e2610877565b6040516102c49190613a71565b3480156102fb57600080fd5b50610304610909565b6040516001600160a01b0390911681526020016102c4565b34801561032857600080fd5b506102e2610992565b34801561033d57600080fd5b5061030461034c366004613854565b6109a1565b34801561035d57600080fd5b5061037161036c3660046135b4565b610a2e565b005b34801561037f57600080fd5b50610388610b44565b6040519081526020016102c4565b6103886103a4366004613854565b610b5b565b3480156103b557600080fd5b506103716103c43660046134d9565b610e51565b3480156103d557600080fd5b506103e96103e436600461386d565b610e82565b604080516001600160a01b0390931683526020830191909152016102c4565b34801561041457600080fd5b5061041d610f30565b6040516102c493929190613d20565b610371610fd4565b34801561044057600080fd5b50610371611166565b34801561045557600080fd5b5061037161046436600461388f565b61119a565b34801561047557600080fd5b506103716104843660046134d9565b611395565b34801561049557600080fd5b506103886104a4366004613854565b6113b0565b3480156104b557600080fd5b506103886104c4366004613466565b60196020526000908152604090205481565b3480156104e257600080fd5b5061037161148e565b3480156104f757600080fd5b50600c5460ff166102b8565b34801561050f57600080fd5b5061030461051e366004613854565b6114c7565b34801561052f57600080fd5b5061038861053e366004613466565b6115a7565b34801561054f57600080fd5b5061037161055e3660046136de565b611629565b34801561056f57600080fd5b5061038861057e366004613466565b61188b565b34801561058f57600080fd5b506102e2611912565b3480156105a457600080fd5b50610371611921565b3480156105b957600080fd5b506102e2611971565b3480156105ce57600080fd5b506015546102b890600160b01b900460ff1681565b3480156105ef57600080fd5b506103716119ff565b34801561060457600080fd5b50601654610304906001600160a01b031681565b34801561062457600080fd5b506015546102b89060ff1681565b34801561063e57600080fd5b50600454610388565b34801561065357600080fd5b506102e2611a31565b34801561066857600080fd5b506015546102b890610100900460ff1681565b34801561068757600080fd5b5061038860045481565b34801561069d57600080fd5b50601054610388565b3480156106b257600080fd5b506016546102b890600160a01b900460ff1681565b3480156106d357600080fd5b506103716106e2366004613586565b611a40565b3480156106f357600080fd5b50601554610304906201000090046001600160a01b031681565b34801561071957600080fd5b50610304611a4f565b34801561072e57600080fd5b5061037161073d36600461351a565b611aa0565b34801561074e57600080fd5b5061038861075d3660046135e0565b611ad2565b34801561076e57600080fd5b506102e261077d366004613854565b611bcd565b610388610790366004613789565b611ca8565b3480156107a157600080fd5b50610388600f5481565b3480156107b757600080fd5b506102b86107c63660046134a0565b6121a2565b3480156107d757600080fd5b506102e261225a565b3480156107ec57600080fd5b506103046107fb366004613466565b612308565b34801561080c57600080fd5b5061038860175481565b60006001600160e01b0319821663152a902d60e11b148061084757506001600160e01b031982166380ac58cd60e01b145b8061086257506001600160e01b03198216635b5e139f60e01b145b806108715750610871826123ef565b92915050565b60606013805461088690613e4a565b80601f01602080910402602001604051908101604052809291908181526020018280546108b290613e4a565b80156108ff5780601f106108d4576101008083540402835291602001916108ff565b820191906000526020600020905b8154815290600101906020018083116108e257829003601f168201915b5050505050905090565b600080601560029054906101000a90046001600160a01b03166001600160a01b03166304b8adb46040518163ffffffff1660e01b815260040160206040518083038186803b15801561095a57600080fd5b505afa15801561096e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108719190613483565b6060600d805461088690613e4a565b60006109ac82612424565b610a125760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b6000610a39826114c7565b9050806001600160a01b0316836001600160a01b03161415610aa75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a09565b336001600160a01b0382161480610ac35750610ac381336121a2565b610b355760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a09565b610b3f8383612457565b505050565b6000600554600454610b569190613e07565b905090565b6000610b69600c5460ff1690565b15610b865760405162461bcd60e51b8152600401610a0990613bcb565b600f5460045410610bc45760405162461bcd60e51b815260206004820152600860248201526714d85b1948195b9960c21b6044820152606401610a09565b601554610100900460ff16610c325760405162461bcd60e51b815260206004820152602e60248201527f506c656173652075736520746865206d696e742066756e6374696f6e20746f2060448201526d313abc903cb7bab9103a37b5b2b760911b6064820152608401610a09565b81601054610c409190613de8565b341015610c5f5760405162461bcd60e51b8152600401610a0990613c41565b6014821115610c805760405162461bcd60e51b8152600401610a0990613bf5565b333214610ccb5760405162461bcd60e51b815260206004820152601960248201527810d85b9b9bdd081b5a5b9d08199c9bdb4818dbdb9d1c9858dd603a1b6044820152606401610a09565b601754829015610d49576017543360009081526019602052604090205410610d055760405162461bcd60e51b8152600401610a0990613cde565b60175433600090815260196020526040902054610d23908590613dbc565b1115610d495733600090815260196020526040902054601754610d469190613e07565b92505b600f5483600454610d5a9190613dbc565b1115610d7357600454600f54610d709190613e07565b92505b6000610d7f8483613e07565b9050600060105482610d919190613de8565b33600090815260196020526040812080549293508792909190610db5908490613dbc565b90915550610dc5905033866124c5565b806000108015610dd457503481105b15610e4357604051600090339083908381818185875af1925050503d8060008114610e1b576040519150601f19603f3d011682016040523d82523d6000602084013e610e20565b606091505b5050905080610e415760405162461bcd60e51b8152600401610a0990613b7e565b505b60045493505050505b919050565b610e5b3382612607565b610e775760405162461bcd60e51b8152600401610a0990613c8d565b610b3f8383836126c9565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610ef75750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610f16906001600160601b031687613de8565b610f209190613dd4565b91519350909150505b9250929050565b60008060606010546017546012808054610f4990613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7590613e4a565b8015610fc25780601f10610f9757610100808354040283529160200191610fc2565b820191906000526020600020905b815481529060010190602001808311610fa557829003601f168201915b50505050509050925092509250909192565b6016546001600160a01b03163314806110055750610ff0610909565b6001600160a01b0316336001600160a01b0316145b61104a5760405162461bcd60e51b81526020600482015260166024820152754e6f74206f776e6572206f7220466169722e58595a2160501b6044820152606401610a09565b3332146110995760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f742077697468647261772066726f6d206120636f6e7472616374006044820152606401610a09565b4760006110a4610909565b6001600160a01b031660326110ba846003613de8565b6110c49190613dd4565b604051600081818185875af1925050503d8060008114611100576040519150601f19603f3d011682016040523d82523d6000602084013e611105565b606091505b50509050806111265760405162461bcd60e51b8152600401610a0990613b7e565b60165460405147916001600160a01b03169082156108fc029083906000818181858888f19350505050158015611160573d6000803e3d6000fd5b50505050565b6016546001600160a01b031633146111905760405162461bcd60e51b8152600401610a0990613bac565b611198612865565b565b601554600160b01b900460ff16156112025760405162461bcd60e51b815260206004820152602560248201527f5468697320636f6e7472616374206973206e6f742061206261736520636f6e74604482015264726163742160d81b6064820152608401610a09565b6001600160a01b0383166112585760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f742073657420746f203020616464726573732100000000000000006044820152606401610a09565b601680546001600160a01b03191632179055600f8990556010889055865161128790600d9060208a01906132c1565b50855161129b90600e9060208901906132c1565b506016805460ff60a01b1916600160a01b8715150217905560178490556015805462010000600160b01b031916620100006001600160a01b03861602179055815182906000906112ed576112ed613ef0565b60200260200101516013908051906020019061130a9291906132c1565b508160018151811061131e5761131e613ef0565b60200260200101516011908051906020019061133b9291906132c1565b508160028151811061134f5761134f613ef0565b60200260200101516012908051906020019061136c9291906132c1565b506015805460ff60b01b1916600160b01b17905561138a32826128f8565b505050505050505050565b610b3f83838360405180602001604052806000815250611aa0565b601654600090600160a01b900460ff166114185760405162461bcd60e51b8152602060048201526024808201527f5468697320636f6e747261637420646f6573206e6f7420616c6c6f77206275726044820152636e696e6760e01b6064820152608401610a09565b611421826114c7565b6001600160a01b0316336001600160a01b0316146114815760405162461bcd60e51b815260206004820181905260248201527f4275726e6572206973206e6f7420746865206f776e6572206f6620746f6b656e6044820152606401610a09565b61148a826129f5565b5090565b6016546001600160a01b031633146114b85760405162461bcd60e51b8152600401610a0990613bac565b6015805460ff19166001179055565b60006114d282612424565b61152f5760405162461bcd60e51b815260206004820152602860248201527f45524337323178797a3a20517565727920666f72206e6f6e206578697374656e6044820152677420746f6b656e2160c01b6064820152608401610a09565b60008281526006602052604090205482906001600160a01b0316611584575b6000818152600760205260409020546001600160a01b03168015611573579392505050565b61157c82613e7f565b91505061154e565b50506000908152600660205260409020546001600160a01b031690565b50919050565b6000601754600014156115fc5760405162461bcd60e51b815260206004820152601d60248201527f436f6c6c656374696f6e2077697468206e6f206d696e74206c696d69740000006044820152606401610a09565b6001600160a01b0382166000908152601960205260408120546017546116229190613e07565b9392505050565b6016546001600160a01b031633146116535760405162461bcd60e51b8152600401610a0990613bac565b600061166c3387878787876001600160601b0316612b10565b90506000611678611a4f565b90506001600160a01b03811661168e838a612b9b565b6001600160a01b0316146116da5760405162461bcd60e51b81526020600482015260136024820152720aadce4cac6decedcd2f4c2c4d8ca4090c2e6d606b1b6044820152606401610a09565b60155460ff166117ab578551156117005785516116fe9060129060208901906132c1565b505b7ff5e721c51327df71720f204c71b46bc26bcafb44db5012739c85814c7862f6c060126040516117309190613a84565b60405180910390a18651156117ab5786516117529060149060208a01906132c1565b50604080516020810191829052600090819052611771916011916132c1565b507f8eca6ea708f9bc34439b72366aa672afc86bb8b1294f1ba9637945c5dab8ea7460146040516117a29190613a84565b60405180910390a15b60105485146117ed5760108590556040518581527f4e8ad04c3fba0cbea0ab1df84b92a72a289ddf64da15f4c1c396891d37c39b019060200160405180910390a15b601754841461182f5760178490556040518481527f197d886c40774caf128e7e2e1aa923f098e68a7ae1e9a68912876c9c39cb35e29060200160405180910390a15b601654611845906001600160a01b0316846128f8565b6040516001600160601b03841681527f678508bbe10280c43a37edb4dc4ab608de80fb9be32078fcd26a5284fce504fb9060200160405180910390a15050505050505050565b60006001600160a01b0382166118f65760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a09565b506001600160a01b031660009081526009602052604090205490565b60606011805461088690613e4a565b6016546001600160a01b0316331461194b5760405162461bcd60e51b8152600401610a0990613bac565b601554610100900460ff161561196057600080fd5b6015805461ff001916610100179055565b6013805461197e90613e4a565b80601f01602080910402602001604051908101604052809291908181526020018280546119aa90613e4a565b80156119f75780601f106119cc576101008083540402835291602001916119f7565b820191906000526020600020905b8154815290600101906020018083116119da57829003601f168201915b505050505081565b6016546001600160a01b03163314611a295760405162461bcd60e51b8152600401610a0990613bac565b611198612bbf565b6060600e805461088690613e4a565b611a4b338383612c17565b5050565b600080601560029054906101000a90046001600160a01b03166001600160a01b031663b1ff4adf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561095a57600080fd5b611aaa3383612607565b611ac65760405162461bcd60e51b8152600401610a0990613c8d565b61116084848484612ce6565b6016546000906001600160a01b03163314611aff5760405162461bcd60e51b8152600401610a0990613bac565b600f54828451611b0f9190613de8565b600454611b1c9190613dbc565b1115611b835760405162461bcd60e51b815260206004820152603060248201527f54686973206578636565647320746865206d6178696d756d206e756d6265722060448201526f6f66204e465473206f6e2073616c652160801b6064820152608401610a09565b60005b8351811015611bc257611bb2848281518110611ba457611ba4613ef0565b602002602001015184612d19565b611bbb81613e7f565b9050611b86565b505060045492915050565b6060611bd882612424565b611c3c5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a09565b6000611c4661225a565b90506000611c52611912565b90506000611c5e610877565b9050825160001415611c7257949350505050565b8282611c7d87612d33565b604051602001611c8f939291906139f1565b6040516020818303038152906040529350505050919050565b6000611cb6600c5460ff1690565b15611cd35760405162461bcd60e51b8152600401610a0990613bcb565b600f5460045410611d115760405162461bcd60e51b815260206004820152600860248201526714d85b1948195b9960c21b6044820152606401610a09565b6040805133606090811b6bffffffffffffffffffffffff199081166020808501919091526034840188905260548401899052607484018790523090921b1660948301528251608881840301815260a8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c884015260e4808401919091528351808403909101815261010490920190925280519101206000611dbb611a4f565b90508360045410611e045760405162461bcd60e51b8152602060048201526013602482015272456e64206f66207068617365206c696d69742160681b6044820152606401610a09565b600f54841115611e6b5760405162461bcd60e51b815260206004820152602c60248201527f5068617365206c696d69742063616e6e6f74206265206c61726765722074686160448201526b6e206d617820746f6b656e7360a01b6064820152608401610a09565b6001600160a01b038116611e7f8389612b9b565b6001600160a01b031614611ecb5760405162461bcd60e51b81526020600482015260136024820152720aadce4cac6decedcd2f4c2c4d8ca4090c2e6d606b1b6044820152606401610a09565b60008281526018602052604090205460ff1615611f185760405162461bcd60e51b815260206004820152600b60248201526a0a4caeae6cac84090c2e6d60ab1b6044820152606401610a09565b84601054611f269190613de8565b341015611f455760405162461bcd60e51b8152600401610a0990613c41565b6014851115611f665760405162461bcd60e51b8152600401610a0990613bf5565b611f71866014613dbc565b431115611fb85760405162461bcd60e51b8152602060048201526015602482015274151a5b59481b1a5b5a5d081a185cc81c185cdcd959605a1b6044820152606401610a09565b3332146120035760405162461bcd60e51b815260206004820152601960248201527810d85b9b9bdd081b5a5b9d08199c9bdb4818dbdb9d1c9858dd603a1b6044820152606401610a09565b6000828152601860205260409020805460ff1916600117905560175485901561209a5760175433600090815260196020526040902054106120565760405162461bcd60e51b8152600401610a0990613cde565b60175433600090815260196020526040902054612074908890613dbc565b111561209a57336000908152601960205260409020546017546120979190613e07565b95505b84866004546120a99190613dbc565b11156120bf576004546120bc9086613e07565b95505b60006120cb8783613e07565b90506000601054826120dd9190613de8565b33600090815260196020526040812080549293508a92909190612101908490613dbc565b90915550612111905033896124c5565b80600010801561212057503481105b1561218f57604051600090339083908381818185875af1925050503d8060008114612167576040519150601f19603f3d011682016040523d82523d6000602084013e61216c565b606091505b505090508061218d5760405162461bcd60e51b8152600401610a0990613b7e565b505b600454955050505050505b949350505050565b60155460405163e6df3d4760e01b81526001600160a01b038381166004830152600092620100009004169063e6df3d479060240160206040518083038186803b1580156121ee57600080fd5b505afa158015612202573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122269190613687565b8061162257506001600160a01b038084166000908152600b602090815260408083209386168352929052205460ff16611622565b60606014805461226990613e4a565b151590506122fb5760155460405163511113e560e01b8152620100009091046001600160a01b03169063511113e5906122a790601290600401613a84565b60006040518083038186803b1580156122bf57600080fd5b505afa1580156122d3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b5691908101906137dd565b6014805461088690613e4a565b6016546000906001600160a01b031633146123355760405162461bcd60e51b8152600401610a0990613bac565b6001600160a01b0382166123955760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420736574207a65726f2061646472657373206173206f776e65726044820152602160f81b6064820152608401610a09565b601680546001600160a01b0319166001600160a01b03841690811790915560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350506016546001600160a01b031690565b60006001600160e01b0319821663152a902d60e11b148061087157506301ffc9a760e01b6001600160e01b0319831614610871565b60008181526008602052604081205460ff161561244357506000919050565b816000108015610871575050600454101590565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061248c826114c7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b03821661251b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a09565b60048054908290600061252e8385613dbc565b90915550506001600160a01b0383166000908152600960205260408120805484929061255b908490613dbc565b9091555050600454600090815260076020526040812080546001600160a01b0319166001600160a01b0386161790556125948383613dbc565b61259f906001613dbc565b905060006125ae836001613dbc565b90505b818110156126015760405181906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46125fa81613e7f565b90506125b1565b50611160565b600061261282612424565b6126735760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a09565b600061267e836114c7565b9050806001600160a01b0316846001600160a01b031614806126b95750836001600160a01b03166126ae846109a1565b6001600160a01b0316145b8061219a575061219a81856121a2565b826001600160a01b03166126dc826114c7565b6001600160a01b0316146127405760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a09565b6001600160a01b0382166127a25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a09565b6127ad600082612457565b6001600160a01b03831660009081526009602052604081208054600192906127d6908490613e07565b90915550506001600160a01b0382166000908152600960205260408120805460019290612804908490613dbc565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600c5460ff166128ae5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a09565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6127106001600160601b03821611156129665760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610a09565b6001600160a01b0382166129bc5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610a09565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b6129fe81612424565b612a5a5760405162461bcd60e51b815260206004820152602760248201527f45524337323178797a3a20517565727920666f72206e6f6e6578697374656e7460448201526620746f6b656e2160c81b6064820152608401610a09565b6000612a65826114c7565b9050612a72600083612457565b6001600160a01b0381166000908152600960205260408120805460019290612a9b908490613e07565b90915550506000828152600860205260408120805460ff191660019081179091556005805491929091612acf908490613dbc565b909155505060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600080878787878787604051602001612b2e96959493929190613993565b60408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c0160408051808303601f19018152919052805160209091012098975050505050505050565b6000806000612baa8585612e31565b91509150612bb781612e9e565b509392505050565b600c5460ff1615612be25760405162461bcd60e51b8152600401610a0990613bcb565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128db3390565b816001600160a01b0316836001600160a01b03161415612c795760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a09565b6001600160a01b038381166000818152600b6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612cf18484846126c9565b612cfd8484848461305c565b6111605760405162461bcd60e51b8152600401610a0990613b2c565b611a4b828260405180602001604052806000815250613166565b606081612d575750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d815780612d6b81613e7f565b9150612d7a9050600a83613dd4565b9150612d5b565b60008167ffffffffffffffff811115612d9c57612d9c613f06565b6040519080825280601f01601f191660200182016040528015612dc6576020820181803683370190505b5090505b841561219a57612ddb600183613e07565b9150612de8600a86613e9a565b612df3906030613dbc565b60f81b818381518110612e0857612e08613ef0565b60200101906001600160f81b031916908160001a905350612e2a600a86613dd4565b9450612dca565b600080825160411415612e685760208301516040840151606085015160001a612e5c8782858561319b565b94509450505050610f29565b825160401415612e925760208301516040840151612e87868383613288565b935093505050610f29565b50600090506002610f29565b6000816004811115612eb257612eb2613eda565b1415612ebb5750565b6001816004811115612ecf57612ecf613eda565b1415612f1d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a09565b6002816004811115612f3157612f31613eda565b1415612f7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a09565b6003816004811115612f9357612f93613eda565b1415612fec5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a09565b600481600481111561300057613000613eda565b14156130595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a09565b50565b60006001600160a01b0384163b1561315e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906130a0903390899088908890600401613a34565b602060405180830381600087803b1580156130ba57600080fd5b505af19250505080156130ea575060408051601f3d908101601f191682019092526130e7918101906136c1565b60015b613144573d808015613118576040519150601f19603f3d011682016040523d82523d6000602084013e61311d565b606091505b50805161313c5760405162461bcd60e51b8152600401610a0990613b2c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061219a565b50600161219a565b61317083836124c5565b61317f6000846004548461305c565b610b3f5760405162461bcd60e51b8152600401610a0990613b2c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156131d2575060009050600361327f565b8460ff16601b141580156131ea57508460ff16601c14155b156131fb575060009050600461327f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561324f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166132785760006001925092505061327f565b9150600090505b94509492505050565b6000806001600160ff1b038316816132a560ff86901c601b613dbc565b90506132b38782888561319b565b935093505050935093915050565b8280546132cd90613e4a565b90600052602060002090601f0160209004810192826132ef5760008555613335565b82601f1061330857805160ff1916838001178555613335565b82800160010185558215613335579182015b8281111561333557825182559160200191906001019061331a565b5061148a9291505b8082111561148a576000815560010161333d565b8035610e4c81613f1c565b600082601f83011261336d57600080fd5b8135602061338261337d83613d70565b613d3f565b80838252828201915082860187848660051b89010111156133a257600080fd5b6000805b868110156133e557823567ffffffffffffffff8111156133c4578283fd5b6133d28b88838d01016133fe565b86525093850193918501916001016133a6565b509198975050505050505050565b8035610e4c81613f31565b600082601f83011261340f57600080fd5b813561341d61337d82613d94565b81815284602083860101111561343257600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160601b0381168114610e4c57600080fd5b60006020828403121561347857600080fd5b813561162281613f1c565b60006020828403121561349557600080fd5b815161162281613f1c565b600080604083850312156134b357600080fd5b82356134be81613f1c565b915060208301356134ce81613f1c565b809150509250929050565b6000806000606084860312156134ee57600080fd5b83356134f981613f1c565b9250602084013561350981613f1c565b929592945050506040919091013590565b6000806000806080858703121561353057600080fd5b843561353b81613f1c565b9350602085013561354b81613f1c565b925060408501359150606085013567ffffffffffffffff81111561356e57600080fd5b61357a878288016133fe565b91505092959194509250565b6000806040838503121561359957600080fd5b82356135a481613f1c565b915060208301356134ce81613f31565b600080604083850312156135c757600080fd5b82356135d281613f1c565b946020939093013593505050565b600080604083850312156135f357600080fd5b823567ffffffffffffffff81111561360a57600080fd5b8301601f8101851361361b57600080fd5b8035602061362b61337d83613d70565b80838252828201915082850189848660051b880101111561364b57600080fd5b600095505b8486101561367757803561366381613f1c565b835260019590950194918301918301613650565b5098969091013596505050505050565b60006020828403121561369957600080fd5b815161162281613f31565b6000602082840312156136b657600080fd5b813561162281613f3f565b6000602082840312156136d357600080fd5b815161162281613f3f565b60008060008060008060c087890312156136f757600080fd5b863567ffffffffffffffff8082111561370f57600080fd5b61371b8a838b016133fe565b9750602089013591508082111561373157600080fd5b61373d8a838b016133fe565b9650604089013591508082111561375357600080fd5b5061376089828a016133fe565b945050606087013592506080870135915061377d60a0880161344f565b90509295509295509295565b6000806000806080858703121561379f57600080fd5b843567ffffffffffffffff8111156137b657600080fd5b6137c2878288016133fe565b97602087013597506040870135966060013595509350505050565b6000602082840312156137ef57600080fd5b815167ffffffffffffffff81111561380657600080fd5b8201601f8101841361381757600080fd5b805161382561337d82613d94565b81815285602083850101111561383a57600080fd5b61384b826020830160208601613e1e565b95945050505050565b60006020828403121561386657600080fd5b5035919050565b6000806040838503121561388057600080fd5b50508035926020909101359150565b60008060008060008060008060006101208a8c0312156138ae57600080fd5b8935985060208a0135975060408a013567ffffffffffffffff808211156138d457600080fd5b6138e08d838e016133fe565b985060608c01359150808211156138f657600080fd5b6139028d838e016133fe565b975061391060808d016133f3565b965060a08c0135955061392560c08d01613351565b945060e08c013591508082111561393b57600080fd5b506139488c828d0161335c565b9250506139586101008b0161344f565b90509295985092959850929598565b6000815180845261397f816020860160208601613e1e565b601f01601f19169290920160200192915050565b6001600160601b03198760601b168152600086516139b8816014850160208b01613e1e565b8651908301906139cf816014840160208b01613e1e565b0160148101959095525050603483019190915260548201526074019392505050565b60008451613a03818460208901613e1e565b845190830190613a17818360208901613e1e565b8451910190613a2a818360208801613e1e565b0195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613a6790830184613967565b9695505050505050565b6020815260006116226020830184613967565b600060208083526000845481600182811c915080831680613aa657607f831692505b858310811415613ac457634e487b7160e01b85526022600452602485fd5b878601838152602001818015613ae15760018114613af257613b1d565b60ff19861682528782019650613b1d565b60008b81526020902060005b86811015613b1757815484820152908501908901613afe565b83019750505b50949998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601490820152732330b4b632b2103a379039b2b7321022ba3432b960611b604082015260600190565b60208082526005908201526422a92927a960d91b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252602c908201527f546f6b656e206d696e74696e67206c696d697420706572207472616e7361637460408201526b1a5bdb88195e18d95959195960a21b606082015260800190565b6020808252602c908201527f596f752068617665206e6f742073656e7420746865207265717569726564206160408201526b0dadeeadce840decc408aa8960a31b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526022908201527f45786365656473206e756d626572206f66206d696e7473207065722077616c6c604082015261195d60f21b606082015260800190565b83815282602082015260606040820152600061384b6060830184613967565b604051601f8201601f1916810167ffffffffffffffff81118282101715613d6857613d68613f06565b604052919050565b600067ffffffffffffffff821115613d8a57613d8a613f06565b5060051b60200190565b600067ffffffffffffffff821115613dae57613dae613f06565b50601f01601f191660200190565b60008219821115613dcf57613dcf613eae565b500190565b600082613de357613de3613ec4565b500490565b6000816000190483118215151615613e0257613e02613eae565b500290565b600082821015613e1957613e19613eae565b500390565b60005b83811015613e39578181015183820152602001613e21565b838111156111605750506000910152565b600181811c90821680613e5e57607f821691505b602082108114156115a157634e487b7160e01b600052602260045260246000fd5b6000600019821415613e9357613e93613eae565b5060010190565b600082613ea957613ea9613ec4565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461305957600080fd5b801515811461305957600080fd5b6001600160e01b03198116811461305957600080fdfea2646970667358221220df5574d12e1353d7d5d92aafe1998858ee740c89eefcffeb0d95578ad0ceb85264736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.