Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
4,444 NFERS
Holders
2,130
Transfers
-
0
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
NinjaMfers
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @creator: Ninja Mfers by Ninja Squad
/// @author: peker.eth - twitter.com/peker_eth
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./EIP712Nonce.sol";
interface IERC20WithPermit is IERC20, IERC20Permit {}
contract NinjaMfers is ERC721, Ownable, EIP712Nonce {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
using SafeERC20 for IERC20WithPermit;
address _signer;
string BASE_URI = "https://api.ninjasquadnft.io/metadata/";
bool public IS_SALE_ACTIVE = false;
uint constant TOTAL_SUPPLY = 4444;
uint constant INCREASED_MAX_TOKEN_ID = TOTAL_SUPPLY + 2;
uint constant MINT_PRICE = 100 ether; // 100 NST
uint constant NUMBER_OF_TOKENS_ALLOWED_PER_ADDRESS = 4;
mapping (address => uint) addressToMintCount;
IERC20WithPermit NST;
address WITHDRAW_ADDRESS = 0xaB910585A6dACEeA4EAbB587e6aAefC888dd9716;
bytes32 private immutable _SALE_MINT_OFF_TYPEHASH =
keccak256("SaleMintOff(address to_,uint256 numberOfTokens_,uint256 nonce_,uint256 deadline_)");
constructor(string memory name, string memory symbol, string memory baseURI, address nstAddress_, address signer_)
ERC721(name, symbol)
EIP712Nonce(name)
{
BASE_URI = baseURI;
NST = IERC20WithPermit(nstAddress_);
_tokenIdCounter.increment();
_signer = signer_;
}
function _baseURI() internal view override returns (string memory) {
return BASE_URI;
}
function setBaseURI(string memory newUri)
public
onlyOwner {
BASE_URI = newUri;
}
function toggleSale() public
onlyOwner
{
IS_SALE_ACTIVE = !IS_SALE_ACTIVE;
}
function getSigner() public view returns (address) {
return _signer;
}
function setSigner(address signer_) public onlyOwner () {
_signer = signer_;
}
modifier onlyAccounts () {
require(msg.sender == tx.origin, "Not allowed origin");
_;
}
function ownerMint(uint numberOfTokens)
public
onlyOwner {
uint current = _tokenIdCounter.current();
require(current + numberOfTokens < INCREASED_MAX_TOKEN_ID, "Exceeds total supply");
for (uint i = 0; i < numberOfTokens; i++) {
mintInternal();
}
}
function saleMint(uint numberOfTokens, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
public
onlyAccounts
{
require(IS_SALE_ACTIVE, "Sale haven't started");
uint256 value = numberOfTokens * MINT_PRICE;
NST.permit(msg.sender, address(this), value, deadline, v, r, s);
NST.safeTransferFrom(msg.sender, address(this), value);
uint current = _tokenIdCounter.current();
require(current + numberOfTokens < INCREASED_MAX_TOKEN_ID, "Exceeds total supply");
require(addressToMintCount[msg.sender] + numberOfTokens <= NUMBER_OF_TOKENS_ALLOWED_PER_ADDRESS, "Exceeds allowance");
addressToMintCount[msg.sender] += numberOfTokens;
for (uint i = 0; i < numberOfTokens; i++) {
mintInternal();
}
}
function saleMintOff(address to_, uint256 numberOfTokens_, uint256 nonce_, uint256 deadline_, uint8 v, bytes32 r, bytes32 s)
public
onlyAccounts
{
require(msg.sender == to_, "Not allowed");
require(IS_SALE_ACTIVE, "Sale haven't started");
require(block.timestamp <= deadline_, "expired deadline");
uint current = _tokenIdCounter.current();
require(current + numberOfTokens_ < INCREASED_MAX_TOKEN_ID, "Exceeds total supply");
require(addressToMintCount[msg.sender] + numberOfTokens_ <= NUMBER_OF_TOKENS_ALLOWED_PER_ADDRESS, "Exceeds allowance");
addressToMintCount[msg.sender] += numberOfTokens_;
bytes32 structHash = keccak256(abi.encode(_SALE_MINT_OFF_TYPEHASH, msg.sender, numberOfTokens_, _useNonce(msg.sender), deadline_));
bytes32 hash = _hashTypedDataV4(structHash);
address signer_ = ECDSA.recover(hash, v, r, s);
require(signer_ == _signer, "invalid signature");
for (uint i = 0; i < numberOfTokens_; i++) {
mintInternal();
}
}
function getCurrentMintCount(address _account) public view returns (uint) {
return addressToMintCount[_account];
}
function mintInternal() internal {
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_mint(msg.sender, tokenId);
}
function withdraw() public onlyOwner {
uint256 nstBalance = NST.balanceOf(address(this));
require(nstBalance > 0);
NST.safeTransfer(WITHDRAW_ADDRESS, nstBalance);
}
function totalSupply() public view returns (uint) {
return _tokenIdCounter.current() - 1;
}
function tokensOfOwner(address _owner, uint startId, uint endId) external view returns(uint256[] memory ) {
uint256 tokenCount = balanceOf(_owner);
if (tokenCount == 0) {
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](tokenCount);
uint256 index = 0;
for (uint256 tokenId = startId; tokenId < endId; tokenId++) {
if (index == tokenCount) break;
if (ownerOf(tokenId) == _owner) {
result[index] = tokenId;
index++;
}
}
return result;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
abstract contract EIP712Nonce is EIP712 {
using Counters for Counters.Counter;
mapping (address => Counters.Counter) private _nonces;
/**
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
*
* It's a good idea to use the same `name` that is defined as the ERC20 token name.
*/
constructor(string memory name) EIP712(name, "1") {
}
/**
* @dev See {IERC20Permit-nonces}.
*/
function nonces(address owner) public view virtual returns (uint256) {
return _nonces[owner].current();
}
/**
* @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32) {
return _domainSeparatorV4();
}
/**
* @dev "Consume a nonce": return the current value and increment.
*
* _Available since v4.1._
*/
function _useNonce(address owner) internal virtual returns (uint256 current) {
Counters.Counter storage nonce = _nonces[owner];
current = nonce.current();
nonce.increment();
}
}// 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));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// 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/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-ERC20Permit.sol)
pragma solidity ^0.8.0;
import "./draft-IERC20Permit.sol";
import "../ERC20.sol";
import "../../../utils/cryptography/draft-EIP712.sol";
import "../../../utils/cryptography/ECDSA.sol";
import "../../../utils/Counters.sol";
/**
* @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* _Available since v3.4._
*/
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
using Counters for Counters.Counter;
mapping(address => Counters.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private immutable _PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/**
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
*
* It's a good idea to use the same `name` that is defined as the ERC20 token name.
*/
constructor(string memory name) EIP712(name, "1") {}
/**
* @dev See {IERC20Permit-permit}.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
require(block.timestamp <= deadline, "ERC20Permit: expired deadline");
bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSA.recover(hash, v, r, s);
require(signer == owner, "ERC20Permit: invalid signature");
_approve(owner, spender, value);
}
/**
* @dev See {IERC20Permit-nonces}.
*/
function nonces(address owner) public view virtual override returns (uint256) {
return _nonces[owner].current();
}
/**
* @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view override returns (bytes32) {
return _domainSeparatorV4();
}
/**
* @dev "Consume a nonce": return the current value and increment.
*
* _Available since v4.1._
*/
function _useNonce(address owner) internal virtual returns (uint256 current) {
Counters.Counter storage nonce = _nonces[owner];
current = nonce.current();
nonce.increment();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.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) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.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 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
/**
* @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 {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
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(ERC721.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(ERC721.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 v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.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 (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 v4.4.1 (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 `IERC721.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/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, 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 Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @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 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);
/**
* @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;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)
pragma solidity ^0.8.0;
import "./ECDSA.sol";
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
* thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
* they need in their contracts using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* _Available since v3.4._
*/
abstract contract EIP712 {
/* solhint-disable var-name-mixedcase */
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
uint256 private immutable _CACHED_CHAIN_ID;
address private immutable _CACHED_THIS;
bytes32 private immutable _HASHED_NAME;
bytes32 private immutable _HASHED_VERSION;
bytes32 private immutable _TYPE_HASH;
/* solhint-enable var-name-mixedcase */
/**
* @dev Initializes the domain separator and parameter caches.
*
* The meaning of `name` and `version` is specified in
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
*
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
* - `version`: the current major version of the signing domain.
*
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
* contract upgrade].
*/
constructor(string memory name, string memory version) {
bytes32 hashedName = keccak256(bytes(name));
bytes32 hashedVersion = keccak256(bytes(version));
bytes32 typeHash = keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
);
_HASHED_NAME = hashedName;
_HASHED_VERSION = hashedVersion;
_CACHED_CHAIN_ID = block.chainid;
_CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
_CACHED_THIS = address(this);
_TYPE_HASH = typeHash;
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
return _CACHED_DOMAIN_SEPARATOR;
} else {
return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
}
}
function _buildDomainSeparator(
bytes32 typeHash,
bytes32 nameHash,
bytes32 versionHash
) private view returns (bytes32) {
return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
}
/**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```solidity
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
* keccak256("Mail(address to,string contents)"),
* mailTo,
* keccak256(bytes(mailContents))
* )));
* address signer = ECDSA.recover(digest, signature);
* ```
*/
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, _allowances[owner][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = _allowances[owner][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Spend `amount` form the allowance of `owner` toward `spender`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens 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 amount
) 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, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// 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 v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"address","name":"nstAddress_","type":"address"},{"internalType":"address","name":"signer_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IS_SALE_ACTIVE","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getCurrentMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSigner","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":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"saleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"numberOfTokens_","type":"uint256"},{"internalType":"uint256","name":"nonce_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"saleMintOff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"}],"name":"setSigner","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":[],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6101c060405260266101608181529062002f176101803980516200002c91600a9160209091019062000283565b50600b805460ff19169055600e80546001600160a01b03191673ab910585a6daceea4eabb587e6aaefc888dd97161790557f2d25476c1aa0ede71c0b8fa10c92946574b20a21b737fb38761e434b8d26d00f610140523480156200008f57600080fd5b5060405162002f3d38038062002f3d833981016040819052620000b291620003fd565b8480604051806040016040528060018152602001603160f81b81525087878160009080519060200190620000e892919062000283565b508051620000fe90600190602084019062000283565b5050506200011b620001156200022460201b60201c565b62000228565b815160208084019190912082518383012060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81880181905281830187905260608201869052608082019490945230818401528151808203909301835260c00190528051940193909320919290916080523060601b60c0526101205250508551620001c59350600a925060208701915062000283565b50600d80546001600160a01b0319166001600160a01b038416179055620001f960086200027a602090811b620012cb17901c565b600980546001600160a01b0319166001600160a01b0392909216919091179055506200050792505050565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b8280546200029190620004b4565b90600052602060002090601f016020900481019282620002b5576000855562000300565b82601f10620002d057805160ff191683800117855562000300565b8280016001018555821562000300579182015b8281111562000300578251825591602001919060010190620002e3565b506200030e92915062000312565b5090565b5b808211156200030e576000815560010162000313565b80516001600160a01b03811681146200034157600080fd5b919050565b600082601f8301126200035857600080fd5b81516001600160401b0380821115620003755762000375620004f1565b604051601f8301601f19908116603f01168101908282118183101715620003a057620003a0620004f1565b81604052838152602092508683858801011115620003bd57600080fd5b600091505b83821015620003e15785820183015181830184015290820190620003c2565b83821115620003f35760008385830101525b9695505050505050565b600080600080600060a086880312156200041657600080fd5b85516001600160401b03808211156200042e57600080fd5b6200043c89838a0162000346565b965060208801519150808211156200045357600080fd5b6200046189838a0162000346565b955060408801519150808211156200047857600080fd5b50620004878882890162000346565b935050620004986060870162000329565b9150620004a86080870162000329565b90509295509295909350565b600181811c90821680620004c957607f821691505b60208210811415620004eb57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160601c60e0516101005161012051610140516129b2620005656000396000610e0d015260006116ef0152600061173e01526000611719015260006116720152600061169c015260006116c601526129b26000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063715018a61161010457806395d89b41116100a2578063c87b56dd11610071578063c87b56dd146103e3578063e985e9c5146103f6578063f19e75d414610432578063f2fde38b1461044557600080fd5b806395d89b4114610395578063a22cb4651461039d578063b88d4fde146103b0578063c839fe94146103c357600080fd5b80637ac3c02f116100de5780637ac3c02f146103585780637d8966e4146103695780637ecebe00146103715780638da5cb5b1461038457600080fd5b8063715018a61461033057806373edfc661461033857806376d02b711461034b57600080fd5b80632fbc389b1161017c57806355f804b31161014b57806355f804b3146102e45780636352211e146102f75780636c19e7831461030a57806370a082311461031d57600080fd5b80632fbc389b146102ae5780633644e515146102c15780633ccfd60b146102c957806342842e0e146102d157600080fd5b8063095ea7b3116101b8578063095ea7b31461024757806318160ddd1461025c5780631d0d12571461027257806323b872dd1461029b57600080fd5b806301ffc9a7146101df57806306fdde0314610207578063081812fc1461021c575b600080fd5b6101f26101ed3660046124eb565b610458565b60405190151581526020015b60405180910390f35b61020f6104aa565b6040516101fe91906126df565b61022f61022a36600461256e565b61053c565b6040516001600160a01b0390911681526020016101fe565b61025a61025536600461240e565b6105d6565b005b6102646106ec565b6040519081526020016101fe565b6102646102803660046122d1565b6001600160a01b03166000908152600c602052604090205490565b61025a6102a936600461231f565b610708565b61025a6102bc3660046125a0565b610739565b610264610972565b61025a61097c565b61025a6102df36600461231f565b610a51565b61025a6102f2366004612525565b610a6c565b61022f61030536600461256e565b610aad565b61025a6103183660046122d1565b610b24565b61026461032b3660046122d1565b610b70565b61025a610bf7565b61025a61034636600461246b565b610c2d565b600b546101f29060ff1681565b6009546001600160a01b031661022f565b61025a610f23565b61026461037f3660046122d1565b610f61565b6006546001600160a01b031661022f565b61020f610f7f565b61025a6103ab3660046123d7565b610f8e565b61025a6103be36600461235b565b610f99565b6103d66103d1366004612438565b610fd1565b6040516101fe919061269b565b61020f6103f136600461256e565b6110c9565b6101f26104043660046122ec565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61025a61044036600461256e565b6111a3565b61025a6104533660046122d1565b611233565b60006001600160e01b031982166380ac58cd60e01b148061048957506001600160e01b03198216635b5e139f60e01b145b806104a457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600080546104b990612886565b80601f01602080910402602001604051908101604052809291908181526020018280546104e590612886565b80156105325780601f1061050757610100808354040283529160200191610532565b820191906000526020600020905b81548152906001019060200180831161051557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166105ba5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006105e182610aad565b9050806001600160a01b0316836001600160a01b0316141561064f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105b1565b336001600160a01b038216148061066b575061066b8133610404565b6106dd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105b1565b6106e783836112d4565b505050565b600060016106f960085490565b6107039190612843565b905090565b6107123382611342565b61072e5760405162461bcd60e51b81526004016105b1906127a7565b6106e7838383611439565b33321461077d5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b63637bbb2b21037b934b3b4b760711b60448201526064016105b1565b600b5460ff166107c65760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185d995b89dd081cdd185c9d195960621b60448201526064016105b1565b60006107db68056bc75e2d6310000087612824565b600d5460405163d505accf60e01b8152336004820152306024820152604481018390526064810188905260ff8716608482015260a4810186905260c481018590529192506001600160a01b03169063d505accf9060e401600060405180830381600087803b15801561084c57600080fd5b505af1158015610860573d6000803e3d6000fd5b5050600d5461087d92506001600160a01b031690503330846115d5565b600061088860085490565b905061089761115c60026127f8565b6108a188836127f8565b106108be5760405162461bcd60e51b81526004016105b190612744565b336000908152600c60205260409020546004906108dc9089906127f8565b111561091e5760405162461bcd60e51b81526020600482015260116024820152704578636565647320616c6c6f77616e636560781b60448201526064016105b1565b336000908152600c60205260408120805489929061093d9084906127f8565b90915550600090505b8781101561096857610956611640565b80610960816128bb565b915050610946565b5050505050505050565b6000610703611665565b6006546001600160a01b031633146109a65760405162461bcd60e51b81526004016105b190612772565b600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156109ea57600080fd5b505afa1580156109fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a229190612587565b905060008111610a3157600080fd5b600e54600d54610a4e916001600160a01b0391821691168361178c565b50565b6106e783838360405180602001604052806000815250610f99565b6006546001600160a01b03163314610a965760405162461bcd60e51b81526004016105b190612772565b8051610aa990600a906020840190612195565b5050565b6000818152600260205260408120546001600160a01b0316806104a45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105b1565b6006546001600160a01b03163314610b4e5760405162461bcd60e51b81526004016105b190612772565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216610bdb5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105b1565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610c215760405162461bcd60e51b81526004016105b190612772565b610c2b60006117bc565b565b333214610c715760405162461bcd60e51b81526020600482015260126024820152712737ba1030b63637bbb2b21037b934b3b4b760711b60448201526064016105b1565b336001600160a01b03881614610cb75760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b60448201526064016105b1565b600b5460ff16610d005760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185d995b89dd081cdd185c9d195960621b60448201526064016105b1565b83421115610d435760405162461bcd60e51b815260206004820152601060248201526f6578706972656420646561646c696e6560801b60448201526064016105b1565b6000610d4e60085490565b9050610d5d61115c60026127f8565b610d6788836127f8565b10610d845760405162461bcd60e51b81526004016105b190612744565b336000908152600c6020526040902054600490610da29089906127f8565b1115610de45760405162461bcd60e51b81526020600482015260116024820152704578636565647320616c6c6f77616e636560781b60448201526064016105b1565b336000908152600c602052604081208054899290610e039084906127f8565b90915550600090507f00000000000000000000000000000000000000000000000000000000000000003389610e378261180e565b6040805160208101959095526001600160a01b03909316928401929092526060830152608082015260a0810187905260c0016040516020818303038152906040528051906020012090506000610e8c82611836565b90506000610e9c82888888611884565b6009549091506001600160a01b03808316911614610ef05760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016105b1565b60005b8a811015610f1557610f03611640565b80610f0d816128bb565b915050610ef3565b505050505050505050505050565b6006546001600160a01b03163314610f4d5760405162461bcd60e51b81526004016105b190612772565b600b805460ff19811660ff90911615179055565b6001600160a01b0381166000908152600760205260408120546104a4565b6060600180546104b990612886565b610aa93383836118ac565b610fa33383611342565b610fbf5760405162461bcd60e51b81526004016105b1906127a7565b610fcb8484848461197b565b50505050565b60606000610fde85610b70565b905080610ffb5750506040805160008152602081019091526110c2565b60008167ffffffffffffffff81111561101657611016612942565b60405190808252806020026020018201604052801561103f578160200160208202803683370190505b5090506000855b858110156110bb578382141561105b576110bb565b876001600160a01b031661106e82610aad565b6001600160a01b031614156110a957808383815181106110905761109061292c565b6020908102919091010152816110a5816128bb565b9250505b806110b3816128bb565b915050611046565b5090925050505b9392505050565b6000818152600260205260409020546060906001600160a01b03166111485760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105b1565b60006111526119ae565b9050600081511161117257604051806020016040528060008152506110c2565b8061117c846119bd565b60405160200161118d92919061262f565b6040516020818303038152906040529392505050565b6006546001600160a01b031633146111cd5760405162461bcd60e51b81526004016105b190612772565b60006111d860085490565b90506111e761115c60026127f8565b6111f183836127f8565b1061120e5760405162461bcd60e51b81526004016105b190612744565b60005b828110156106e757611221611640565b8061122b816128bb565b915050611211565b6006546001600160a01b0316331461125d5760405162461bcd60e51b81526004016105b190612772565b6001600160a01b0381166112c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b1565b610a4e816117bc565b80546001019055565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061130982610aad565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166113bb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105b1565b60006113c683610aad565b9050806001600160a01b0316846001600160a01b031614806114015750836001600160a01b03166113f68461053c565b6001600160a01b0316145b8061143157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661144c82610aad565b6001600160a01b0316146114b05760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105b1565b6001600160a01b0382166115125760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105b1565b61151d6000826112d4565b6001600160a01b0383166000908152600360205260408120805460019290611546908490612843565b90915550506001600160a01b03821660009081526003602052604081208054600192906115749084906127f8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610fcb9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611abb565b600061164b60085490565b905061165b600880546001019055565b610a4e3382611b8d565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156116be57507f000000000000000000000000000000000000000000000000000000000000000046145b156116e857507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6040516001600160a01b0383166024820152604481018290526106e790849063a9059cbb60e01b90606401611609565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b60006104a4611843611665565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061189587878787611ccf565b915091506118a281611dbc565b5095945050505050565b816001600160a01b0316836001600160a01b0316141561190e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105b1565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611986848484611439565b61199284848484611f77565b610fcb5760405162461bcd60e51b81526004016105b1906126f2565b6060600a80546104b990612886565b6060816119e15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a0b57806119f5816128bb565b9150611a049050600a83612810565b91506119e5565b60008167ffffffffffffffff811115611a2657611a26612942565b6040519080825280601f01601f191660200182016040528015611a50576020820181803683370190505b5090505b841561143157611a65600183612843565b9150611a72600a866128d6565b611a7d9060306127f8565b60f81b818381518110611a9257611a9261292c565b60200101906001600160f81b031916908160001a905350611ab4600a86612810565b9450611a54565b6000611b10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120819092919063ffffffff16565b8051909150156106e75780806020019051810190611b2e91906124ce565b6106e75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b1565b6001600160a01b038216611be35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105b1565b6000818152600260205260409020546001600160a01b031615611c485760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105b1565b6001600160a01b0382166000908152600360205260408120805460019290611c719084906127f8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611d065750600090506003611db3565b8460ff16601b14158015611d1e57508460ff16601c14155b15611d2f5750600090506004611db3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611d83573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611dac57600060019250925050611db3565b9150600090505b94509492505050565b6000816004811115611dd057611dd0612916565b1415611dd95750565b6001816004811115611ded57611ded612916565b1415611e3b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016105b1565b6002816004811115611e4f57611e4f612916565b1415611e9d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016105b1565b6003816004811115611eb157611eb1612916565b1415611f0a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016105b1565b6004816004811115611f1e57611f1e612916565b1415610a4e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016105b1565b60006001600160a01b0384163b1561207957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611fbb90339089908890889060040161265e565b602060405180830381600087803b158015611fd557600080fd5b505af1925050508015612005575060408051601f3d908101601f1916820190925261200291810190612508565b60015b61205f573d808015612033576040519150601f19603f3d011682016040523d82523d6000602084013e612038565b606091505b5080516120575760405162461bcd60e51b81526004016105b1906126f2565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611431565b506001611431565b60606114318484600085856001600160a01b0385163b6120e35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b1565b600080866001600160a01b031685876040516120ff9190612613565b60006040518083038185875af1925050503d806000811461213c576040519150601f19603f3d011682016040523d82523d6000602084013e612141565b606091505b509150915061215182828661215c565b979650505050505050565b6060831561216b5750816110c2565b82511561217b5782518084602001fd5b8160405162461bcd60e51b81526004016105b191906126df565b8280546121a190612886565b90600052602060002090601f0160209004810192826121c35760008555612209565b82601f106121dc57805160ff1916838001178555612209565b82800160010185558215612209579182015b828111156122095782518255916020019190600101906121ee565b50612215929150612219565b5090565b5b80821115612215576000815560010161221a565b600067ffffffffffffffff8084111561224957612249612942565b604051601f8501601f19908116603f0116810190828211818310171561227157612271612942565b8160405280935085815286868601111561228a57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146122bb57600080fd5b919050565b803560ff811681146122bb57600080fd5b6000602082840312156122e357600080fd5b6110c2826122a4565b600080604083850312156122ff57600080fd5b612308836122a4565b9150612316602084016122a4565b90509250929050565b60008060006060848603121561233457600080fd5b61233d846122a4565b925061234b602085016122a4565b9150604084013590509250925092565b6000806000806080858703121561237157600080fd5b61237a856122a4565b9350612388602086016122a4565b925060408501359150606085013567ffffffffffffffff8111156123ab57600080fd5b8501601f810187136123bc57600080fd5b6123cb8782356020840161222e565b91505092959194509250565b600080604083850312156123ea57600080fd5b6123f3836122a4565b9150602083013561240381612958565b809150509250929050565b6000806040838503121561242157600080fd5b61242a836122a4565b946020939093013593505050565b60008060006060848603121561244d57600080fd5b612456846122a4565b95602085013595506040909401359392505050565b600080600080600080600060e0888a03121561248657600080fd5b61248f886122a4565b96506020880135955060408801359450606088013593506124b2608089016122c0565b925060a0880135915060c0880135905092959891949750929550565b6000602082840312156124e057600080fd5b81516110c281612958565b6000602082840312156124fd57600080fd5b81356110c281612966565b60006020828403121561251a57600080fd5b81516110c281612966565b60006020828403121561253757600080fd5b813567ffffffffffffffff81111561254e57600080fd5b8201601f8101841361255f57600080fd5b6114318482356020840161222e565b60006020828403121561258057600080fd5b5035919050565b60006020828403121561259957600080fd5b5051919050565b600080600080600060a086880312156125b857600080fd5b85359450602086013593506125cf604087016122c0565b94979396509394606081013594506080013592915050565b600081518084526125ff81602086016020860161285a565b601f01601f19169290920160200192915050565b6000825161262581846020870161285a565b9190910192915050565b6000835161264181846020880161285a565b83519083019061265581836020880161285a565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612691908301846125e7565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156126d3578351835292840192918401916001016126b7565b50909695505050505050565b6020815260006110c260208301846125e7565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601490820152734578636565647320746f74616c20737570706c7960601b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561280b5761280b6128ea565b500190565b60008261281f5761281f612900565b500490565b600081600019048311821515161561283e5761283e6128ea565b500290565b600082821015612855576128556128ea565b500390565b60005b8381101561287557818101518382015260200161285d565b83811115610fcb5750506000910152565b600181811c9082168061289a57607f821691505b6020821081141561183057634e487b7160e01b600052602260045260246000fd5b60006000198214156128cf576128cf6128ea565b5060010190565b6000826128e5576128e5612900565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610a4e57600080fd5b6001600160e01b031981168114610a4e57600080fdfea2646970667358221220f72b59e9e9be73afb98b77121c21d84b1841c7fc1963936f501214bbbca3562364736f6c6343000807003368747470733a2f2f6170692e6e696e6a6173717561646e66742e696f2f6d657461646174612f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000070bef3bb2f001da2fddb207dae696cd9faff3f5d0000000000000000000000004ddfa00751c599f7996625a5effbd1044ab054c6000000000000000000000000000000000000000000000000000000000000000b4e696e6a61204d6665727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054e46455253000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004b68747470733a2f2f6c633272746a677a69672e657865637574652d6170692e65752d776573742d312e616d617a6f6e6177732e636f6d2f70726f642f6e666572732f6d657461646174612f000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063715018a61161010457806395d89b41116100a2578063c87b56dd11610071578063c87b56dd146103e3578063e985e9c5146103f6578063f19e75d414610432578063f2fde38b1461044557600080fd5b806395d89b4114610395578063a22cb4651461039d578063b88d4fde146103b0578063c839fe94146103c357600080fd5b80637ac3c02f116100de5780637ac3c02f146103585780637d8966e4146103695780637ecebe00146103715780638da5cb5b1461038457600080fd5b8063715018a61461033057806373edfc661461033857806376d02b711461034b57600080fd5b80632fbc389b1161017c57806355f804b31161014b57806355f804b3146102e45780636352211e146102f75780636c19e7831461030a57806370a082311461031d57600080fd5b80632fbc389b146102ae5780633644e515146102c15780633ccfd60b146102c957806342842e0e146102d157600080fd5b8063095ea7b3116101b8578063095ea7b31461024757806318160ddd1461025c5780631d0d12571461027257806323b872dd1461029b57600080fd5b806301ffc9a7146101df57806306fdde0314610207578063081812fc1461021c575b600080fd5b6101f26101ed3660046124eb565b610458565b60405190151581526020015b60405180910390f35b61020f6104aa565b6040516101fe91906126df565b61022f61022a36600461256e565b61053c565b6040516001600160a01b0390911681526020016101fe565b61025a61025536600461240e565b6105d6565b005b6102646106ec565b6040519081526020016101fe565b6102646102803660046122d1565b6001600160a01b03166000908152600c602052604090205490565b61025a6102a936600461231f565b610708565b61025a6102bc3660046125a0565b610739565b610264610972565b61025a61097c565b61025a6102df36600461231f565b610a51565b61025a6102f2366004612525565b610a6c565b61022f61030536600461256e565b610aad565b61025a6103183660046122d1565b610b24565b61026461032b3660046122d1565b610b70565b61025a610bf7565b61025a61034636600461246b565b610c2d565b600b546101f29060ff1681565b6009546001600160a01b031661022f565b61025a610f23565b61026461037f3660046122d1565b610f61565b6006546001600160a01b031661022f565b61020f610f7f565b61025a6103ab3660046123d7565b610f8e565b61025a6103be36600461235b565b610f99565b6103d66103d1366004612438565b610fd1565b6040516101fe919061269b565b61020f6103f136600461256e565b6110c9565b6101f26104043660046122ec565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61025a61044036600461256e565b6111a3565b61025a6104533660046122d1565b611233565b60006001600160e01b031982166380ac58cd60e01b148061048957506001600160e01b03198216635b5e139f60e01b145b806104a457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600080546104b990612886565b80601f01602080910402602001604051908101604052809291908181526020018280546104e590612886565b80156105325780601f1061050757610100808354040283529160200191610532565b820191906000526020600020905b81548152906001019060200180831161051557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166105ba5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006105e182610aad565b9050806001600160a01b0316836001600160a01b0316141561064f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105b1565b336001600160a01b038216148061066b575061066b8133610404565b6106dd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105b1565b6106e783836112d4565b505050565b600060016106f960085490565b6107039190612843565b905090565b6107123382611342565b61072e5760405162461bcd60e51b81526004016105b1906127a7565b6106e7838383611439565b33321461077d5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b63637bbb2b21037b934b3b4b760711b60448201526064016105b1565b600b5460ff166107c65760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185d995b89dd081cdd185c9d195960621b60448201526064016105b1565b60006107db68056bc75e2d6310000087612824565b600d5460405163d505accf60e01b8152336004820152306024820152604481018390526064810188905260ff8716608482015260a4810186905260c481018590529192506001600160a01b03169063d505accf9060e401600060405180830381600087803b15801561084c57600080fd5b505af1158015610860573d6000803e3d6000fd5b5050600d5461087d92506001600160a01b031690503330846115d5565b600061088860085490565b905061089761115c60026127f8565b6108a188836127f8565b106108be5760405162461bcd60e51b81526004016105b190612744565b336000908152600c60205260409020546004906108dc9089906127f8565b111561091e5760405162461bcd60e51b81526020600482015260116024820152704578636565647320616c6c6f77616e636560781b60448201526064016105b1565b336000908152600c60205260408120805489929061093d9084906127f8565b90915550600090505b8781101561096857610956611640565b80610960816128bb565b915050610946565b5050505050505050565b6000610703611665565b6006546001600160a01b031633146109a65760405162461bcd60e51b81526004016105b190612772565b600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156109ea57600080fd5b505afa1580156109fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a229190612587565b905060008111610a3157600080fd5b600e54600d54610a4e916001600160a01b0391821691168361178c565b50565b6106e783838360405180602001604052806000815250610f99565b6006546001600160a01b03163314610a965760405162461bcd60e51b81526004016105b190612772565b8051610aa990600a906020840190612195565b5050565b6000818152600260205260408120546001600160a01b0316806104a45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105b1565b6006546001600160a01b03163314610b4e5760405162461bcd60e51b81526004016105b190612772565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216610bdb5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105b1565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610c215760405162461bcd60e51b81526004016105b190612772565b610c2b60006117bc565b565b333214610c715760405162461bcd60e51b81526020600482015260126024820152712737ba1030b63637bbb2b21037b934b3b4b760711b60448201526064016105b1565b336001600160a01b03881614610cb75760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b60448201526064016105b1565b600b5460ff16610d005760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185d995b89dd081cdd185c9d195960621b60448201526064016105b1565b83421115610d435760405162461bcd60e51b815260206004820152601060248201526f6578706972656420646561646c696e6560801b60448201526064016105b1565b6000610d4e60085490565b9050610d5d61115c60026127f8565b610d6788836127f8565b10610d845760405162461bcd60e51b81526004016105b190612744565b336000908152600c6020526040902054600490610da29089906127f8565b1115610de45760405162461bcd60e51b81526020600482015260116024820152704578636565647320616c6c6f77616e636560781b60448201526064016105b1565b336000908152600c602052604081208054899290610e039084906127f8565b90915550600090507f2d25476c1aa0ede71c0b8fa10c92946574b20a21b737fb38761e434b8d26d00f3389610e378261180e565b6040805160208101959095526001600160a01b03909316928401929092526060830152608082015260a0810187905260c0016040516020818303038152906040528051906020012090506000610e8c82611836565b90506000610e9c82888888611884565b6009549091506001600160a01b03808316911614610ef05760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016105b1565b60005b8a811015610f1557610f03611640565b80610f0d816128bb565b915050610ef3565b505050505050505050505050565b6006546001600160a01b03163314610f4d5760405162461bcd60e51b81526004016105b190612772565b600b805460ff19811660ff90911615179055565b6001600160a01b0381166000908152600760205260408120546104a4565b6060600180546104b990612886565b610aa93383836118ac565b610fa33383611342565b610fbf5760405162461bcd60e51b81526004016105b1906127a7565b610fcb8484848461197b565b50505050565b60606000610fde85610b70565b905080610ffb5750506040805160008152602081019091526110c2565b60008167ffffffffffffffff81111561101657611016612942565b60405190808252806020026020018201604052801561103f578160200160208202803683370190505b5090506000855b858110156110bb578382141561105b576110bb565b876001600160a01b031661106e82610aad565b6001600160a01b031614156110a957808383815181106110905761109061292c565b6020908102919091010152816110a5816128bb565b9250505b806110b3816128bb565b915050611046565b5090925050505b9392505050565b6000818152600260205260409020546060906001600160a01b03166111485760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105b1565b60006111526119ae565b9050600081511161117257604051806020016040528060008152506110c2565b8061117c846119bd565b60405160200161118d92919061262f565b6040516020818303038152906040529392505050565b6006546001600160a01b031633146111cd5760405162461bcd60e51b81526004016105b190612772565b60006111d860085490565b90506111e761115c60026127f8565b6111f183836127f8565b1061120e5760405162461bcd60e51b81526004016105b190612744565b60005b828110156106e757611221611640565b8061122b816128bb565b915050611211565b6006546001600160a01b0316331461125d5760405162461bcd60e51b81526004016105b190612772565b6001600160a01b0381166112c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b1565b610a4e816117bc565b80546001019055565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061130982610aad565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166113bb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105b1565b60006113c683610aad565b9050806001600160a01b0316846001600160a01b031614806114015750836001600160a01b03166113f68461053c565b6001600160a01b0316145b8061143157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661144c82610aad565b6001600160a01b0316146114b05760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105b1565b6001600160a01b0382166115125760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105b1565b61151d6000826112d4565b6001600160a01b0383166000908152600360205260408120805460019290611546908490612843565b90915550506001600160a01b03821660009081526003602052604081208054600192906115749084906127f8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610fcb9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611abb565b600061164b60085490565b905061165b600880546001019055565b610a4e3382611b8d565b6000306001600160a01b037f000000000000000000000000fb3cf61a46a565fb1622ec5f9d42d98ff7f762aa161480156116be57507f000000000000000000000000000000000000000000000000000000000000000146145b156116e857507f8f09f34b797aebbfa373baf8969bd8f632967eae3bfdf482f9fb2b208612492b90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fdbcaee49de10898a848a338af4ea0253d648ed7a68d06e2adedcde587e1da569828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6040516001600160a01b0383166024820152604481018290526106e790849063a9059cbb60e01b90606401611609565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b60006104a4611843611665565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061189587878787611ccf565b915091506118a281611dbc565b5095945050505050565b816001600160a01b0316836001600160a01b0316141561190e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105b1565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611986848484611439565b61199284848484611f77565b610fcb5760405162461bcd60e51b81526004016105b1906126f2565b6060600a80546104b990612886565b6060816119e15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a0b57806119f5816128bb565b9150611a049050600a83612810565b91506119e5565b60008167ffffffffffffffff811115611a2657611a26612942565b6040519080825280601f01601f191660200182016040528015611a50576020820181803683370190505b5090505b841561143157611a65600183612843565b9150611a72600a866128d6565b611a7d9060306127f8565b60f81b818381518110611a9257611a9261292c565b60200101906001600160f81b031916908160001a905350611ab4600a86612810565b9450611a54565b6000611b10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120819092919063ffffffff16565b8051909150156106e75780806020019051810190611b2e91906124ce565b6106e75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b1565b6001600160a01b038216611be35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105b1565b6000818152600260205260409020546001600160a01b031615611c485760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105b1565b6001600160a01b0382166000908152600360205260408120805460019290611c719084906127f8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611d065750600090506003611db3565b8460ff16601b14158015611d1e57508460ff16601c14155b15611d2f5750600090506004611db3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611d83573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611dac57600060019250925050611db3565b9150600090505b94509492505050565b6000816004811115611dd057611dd0612916565b1415611dd95750565b6001816004811115611ded57611ded612916565b1415611e3b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016105b1565b6002816004811115611e4f57611e4f612916565b1415611e9d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016105b1565b6003816004811115611eb157611eb1612916565b1415611f0a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016105b1565b6004816004811115611f1e57611f1e612916565b1415610a4e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016105b1565b60006001600160a01b0384163b1561207957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611fbb90339089908890889060040161265e565b602060405180830381600087803b158015611fd557600080fd5b505af1925050508015612005575060408051601f3d908101601f1916820190925261200291810190612508565b60015b61205f573d808015612033576040519150601f19603f3d011682016040523d82523d6000602084013e612038565b606091505b5080516120575760405162461bcd60e51b81526004016105b1906126f2565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611431565b506001611431565b60606114318484600085856001600160a01b0385163b6120e35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b1565b600080866001600160a01b031685876040516120ff9190612613565b60006040518083038185875af1925050503d806000811461213c576040519150601f19603f3d011682016040523d82523d6000602084013e612141565b606091505b509150915061215182828661215c565b979650505050505050565b6060831561216b5750816110c2565b82511561217b5782518084602001fd5b8160405162461bcd60e51b81526004016105b191906126df565b8280546121a190612886565b90600052602060002090601f0160209004810192826121c35760008555612209565b82601f106121dc57805160ff1916838001178555612209565b82800160010185558215612209579182015b828111156122095782518255916020019190600101906121ee565b50612215929150612219565b5090565b5b80821115612215576000815560010161221a565b600067ffffffffffffffff8084111561224957612249612942565b604051601f8501601f19908116603f0116810190828211818310171561227157612271612942565b8160405280935085815286868601111561228a57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146122bb57600080fd5b919050565b803560ff811681146122bb57600080fd5b6000602082840312156122e357600080fd5b6110c2826122a4565b600080604083850312156122ff57600080fd5b612308836122a4565b9150612316602084016122a4565b90509250929050565b60008060006060848603121561233457600080fd5b61233d846122a4565b925061234b602085016122a4565b9150604084013590509250925092565b6000806000806080858703121561237157600080fd5b61237a856122a4565b9350612388602086016122a4565b925060408501359150606085013567ffffffffffffffff8111156123ab57600080fd5b8501601f810187136123bc57600080fd5b6123cb8782356020840161222e565b91505092959194509250565b600080604083850312156123ea57600080fd5b6123f3836122a4565b9150602083013561240381612958565b809150509250929050565b6000806040838503121561242157600080fd5b61242a836122a4565b946020939093013593505050565b60008060006060848603121561244d57600080fd5b612456846122a4565b95602085013595506040909401359392505050565b600080600080600080600060e0888a03121561248657600080fd5b61248f886122a4565b96506020880135955060408801359450606088013593506124b2608089016122c0565b925060a0880135915060c0880135905092959891949750929550565b6000602082840312156124e057600080fd5b81516110c281612958565b6000602082840312156124fd57600080fd5b81356110c281612966565b60006020828403121561251a57600080fd5b81516110c281612966565b60006020828403121561253757600080fd5b813567ffffffffffffffff81111561254e57600080fd5b8201601f8101841361255f57600080fd5b6114318482356020840161222e565b60006020828403121561258057600080fd5b5035919050565b60006020828403121561259957600080fd5b5051919050565b600080600080600060a086880312156125b857600080fd5b85359450602086013593506125cf604087016122c0565b94979396509394606081013594506080013592915050565b600081518084526125ff81602086016020860161285a565b601f01601f19169290920160200192915050565b6000825161262581846020870161285a565b9190910192915050565b6000835161264181846020880161285a565b83519083019061265581836020880161285a565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612691908301846125e7565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156126d3578351835292840192918401916001016126b7565b50909695505050505050565b6020815260006110c260208301846125e7565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601490820152734578636565647320746f74616c20737570706c7960601b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561280b5761280b6128ea565b500190565b60008261281f5761281f612900565b500490565b600081600019048311821515161561283e5761283e6128ea565b500290565b600082821015612855576128556128ea565b500390565b60005b8381101561287557818101518382015260200161285d565b83811115610fcb5750506000910152565b600181811c9082168061289a57607f821691505b6020821081141561183057634e487b7160e01b600052602260045260246000fd5b60006000198214156128cf576128cf6128ea565b5060010190565b6000826128e5576128e5612900565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610a4e57600080fd5b6001600160e01b031981168114610a4e57600080fdfea2646970667358221220f72b59e9e9be73afb98b77121c21d84b1841c7fc1963936f501214bbbca3562364736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000070bef3bb2f001da2fddb207dae696cd9faff3f5d0000000000000000000000004ddfa00751c599f7996625a5effbd1044ab054c6000000000000000000000000000000000000000000000000000000000000000b4e696e6a61204d6665727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054e46455253000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004b68747470733a2f2f6c633272746a677a69672e657865637574652d6170692e65752d776573742d312e616d617a6f6e6177732e636f6d2f70726f642f6e666572732f6d657461646174612f000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): Ninja Mfers
Arg [1] : symbol (string): NFERS
Arg [2] : baseURI (string): https://lc2rtjgzig.execute-api.eu-west-1.amazonaws.com/prod/nfers/metadata/
Arg [3] : nstAddress_ (address): 0x70Bef3bB2f001dA2fDDb207dAe696cD9FAFf3f5d
Arg [4] : signer_ (address): 0x4DDFA00751c599F7996625A5EFfbD1044ab054c6
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 00000000000000000000000070bef3bb2f001da2fddb207dae696cd9faff3f5d
Arg [4] : 0000000000000000000000004ddfa00751c599f7996625a5effbd1044ab054c6
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [6] : 4e696e6a61204d66657273000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 4e46455253000000000000000000000000000000000000000000000000000000
Arg [9] : 000000000000000000000000000000000000000000000000000000000000004b
Arg [10] : 68747470733a2f2f6c633272746a677a69672e657865637574652d6170692e65
Arg [11] : 752d776573742d312e616d617a6f6e6177732e636f6d2f70726f642f6e666572
Arg [12] : 732f6d657461646174612f000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.