contract_name stringlengths 1 61 | file_path stringlengths 5 50.4k | contract_address stringlengths 42 42 | language stringclasses 1
value | class_name stringlengths 1 61 | class_code stringlengths 4 330k | class_documentation stringlengths 0 29.1k | class_documentation_type stringclasses 6
values | func_name stringlengths 0 62 | func_code stringlengths 1 303k | func_documentation stringlengths 2 14.9k | func_documentation_type stringclasses 4
values | compiler_version stringlengths 15 42 | license_type stringclasses 14
values | swarm_source stringlengths 0 71 | meta dict | __index_level_0__ int64 0 60.4k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | mint | function mint(address to, uint32 count) internal {
if (count > 1) {
uint256[] memory ids = new uint256[](uint256(count));
uint256[] memory amounts = new uint256[](uint256(count));
for (uint32 i = 0; i < count; i++) {
ids[i] = totalSupply + i;
amounts[i] = 1;
... | /*
* Function to mint NFTs
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1580,
2087
]
} | 14,300 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | setCanReveal | function setCanReveal(
bool _isActive
)
external
onlyOwner
{
canReveal = _isActive;
}
| /*
* Function setCanReveal to activate/desactivate reveal option
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2170,
2303
]
} | 14,301 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | setIsActive | function setIsActive(
bool _isActive
)
external
onlyOwner
{
isActive = _isActive;
}
| /*
* Function setIsActive to activate/desactivate the smart contract
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2390,
2521
]
} | 14,302 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | setPrivateSaleActive | function setPrivateSaleActive(
bool _isActive
)
external
onlyOwner
{
isPrivateSaleActive = _isActive;
}
| /*
* Function setPrivateSaleActive to activate/desactivate the presale
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2610,
2761
]
} | 14,303 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | setPresaleActive | function setPresaleActive(
bool _isActive
)
external
onlyOwner
{
isPresaleActive = _isActive;
}
| /*
* Function setPresaleActive to activate/desactivate the presale
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2846,
2989
]
} | 14,304 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | setURI | function setURI(
string memory _URI
)
external
onlyOwner
{
baseURI = _URI;
}
| /*
* Function to set Base URI
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
3037,
3161
]
} | 14,305 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | withdraw | function withdraw(
address _to
)
public
onlyOwner
{
uint balance = address(this).balance;
require(balance > 0, "Balance should be more then zero");
if(balance <= devSup) {
payable(devAddress).transfer(balance);
devSup = devSup.sub(balance);
return;
} else {
i... | /*
* Function to withdraw collected amount during minting by the owner
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
3250,
3845
]
} | 14,306 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | mintNFT | function mintNFT(
uint32 _numOfTokens
)
public
payable
{
require(isActive, 'Contract is not active');
require(!isPrivateSaleActive, 'Private sale still active');
require(!isPresaleActive, 'Presale still active');
require(totalSupply.add(_numOfTokens).sub(giveawayCount) <= MAX_NFT_PUBLIC, "Pu... | /*
* Function to mint new NFTs during the public sale
* It is payable. Amount is calculated as per (NFTPrice.mul(_numOfTokens))
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
3996,
4542
]
} | 14,307 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | mintNFTDuringPresale | function mintNFTDuringPresale(
uint32 _numOfTokens,
bytes32[] memory _proof
)
public
payable
{
require(isActive, 'Contract is not active');
require(verify(_proof, bytes32(uint256(uint160(msg.sender)))), "Not whitelisted");
if (!isPresaleActive) {
require(isPrivateSaleActive, 'Privat... | /*
* Function to mint new NFTs during the private sale & presale
* It is payable.
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
4647,
5762
]
} | 14,308 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | mintByOwner | function mintByOwner(
address _to
)
public
onlyOwner
{
require(giveawayCount.add(1)<=maxGiveaway,"Cannot do more giveaway");
require(totalSupply.add(1) < MAX_NFT, "Tokens number to mint cannot exceed number of MAX tokens");
mint(_to,1);
giveawayCount=giveawayCount.add(1);
}
| /*
* Function to mint all NFTs for giveaway and partnerships
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
5841,
6187
]
} | 14,309 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | mintMultipleByOwner | function mintMultipleByOwner(
address[] memory _to
)
public
onlyOwner
{
require(totalSupply.add(_to.length) < MAX_NFT, "Tokens number to mint cannot exceed number of MAX tokens");
require(giveawayCount.add(_to.length)<=maxGiveaway,"Cannot do that much giveaway");
for(uint256 i = 0; i < _to.lengt... | /*
* Function to mint all NFTs for giveaway and partnerships
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
6266,
6728
]
} | 14,310 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | uri | function uri(
uint256 _tokenId
)
public
view
virtual
override
returns (string memory)
{
require(_tokenId<totalSupply, "ERC1155Metadata: URI query for nonexistent token");
return string(abi.encodePacked(baseURI, _tokenId.toString()));
}
| /*
* Function to get token URI of given token ID
* URI will be blank untill totalSupply reaches MAX_NFT_PUBLIC
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
6862,
7178
]
} | 14,311 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | setRoot | function setRoot(uint256 _root) onlyOwner() public {
root = bytes32(_root);
}
| /*
* Function to set the merkle root
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
7233,
7326
]
} | 14,312 | ||||
MoodyApeClub | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0xe534bd009274f9b891f80e3e42475f92e439f20c | Solidity | MoodyApeClub | contract MoodyApeClub is ERC1155, Ownable {
string public constant name = "Moody Ape Club";
string public constant symbol = "MAC";
using SafeMath for uint256;
using Strings for uint256;
string private baseURI;
uint256 public totalSupply = 0;
uint256 public constant MAX_NFT_PUBLIC = 6969;
... | verify | function verify(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the p... | /*
* Function to verify the proof
*/ | Comment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
7378,
8139
]
} | 14,313 | ||||
CROWDToken | contracts/ICROWDToken.sol | 0x374fb05c96c36348b92e38fb088b26b8511e3b3d | Solidity | ICROWDToken | abstract contract ICROWDToken is ERC20, Pausable, Ownable, HasMinters {
uint256 private _maxSupply;
function setMaxSupply(uint256 amount) internal onlyOwner {
_maxSupply = amount;
}
function maxSupply() public view returns (uint256) {
return _maxSupply;
}
/**
* @dev Destr... | burn | function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
| /**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
398,
491
]
} | 14,314 | ||||
CROWDToken | contracts/ICROWDToken.sol | 0x374fb05c96c36348b92e38fb088b26b8511e3b3d | Solidity | ICROWDToken | abstract contract ICROWDToken is ERC20, Pausable, Ownable, HasMinters {
uint256 private _maxSupply;
function setMaxSupply(uint256 amount) internal onlyOwner {
_maxSupply = amount;
}
function maxSupply() public view returns (uint256) {
return _maxSupply;
}
/**
* @dev Destr... | burnFrom | function burnFrom(address account, uint256 amount) public virtual {
uint256 currentAllowance = allowance(account, _msgSender());
require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
unchecked {
_approve(account, _msgSender(), currentAllowance - amount);
}
_burn(accoun... | /**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
974,
1339
]
} | 14,315 | ||||
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
287,
380
]
} | 14,316 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
434,
546
]
} | 14,317 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
745,
904
]
} | 14,318 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
958,
1094
]
} | 14,319 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
1228,
1381
]
} | 14,320 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
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};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
1835,
2139
]
} | 14,321 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
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 t... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
2530,
2741
]
} | 14,322 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
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 t... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
3224,
3486
]
} | 14,323 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is 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:
*
* - `sender` cannot be the zero address.
* - `recipie... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
3958,
4426
]
} | 14,324 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, 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
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
4692,
4998
]
} | 14,325 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), 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.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
5313,
5659
]
} | 14,326 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal {
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 Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is 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.
... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
6082,
6418
]
} | 14,327 |
PROT | ERC20.sol | 0xf375bb92e24102babfd7a42f06d6e9ea8069b28c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https:/... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
}
| /**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://5fe9411aa10aecd7e81fb26702f3875225aa092b09ec735186159023368b252c | {
"func_code_index": [
6592,
6825
]
} | 14,328 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC165 | 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 f... | /**
* @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}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @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.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
374,
455
]
} | 14,329 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
719,
798
]
} | 14,330 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
944,
1021
]
} | 14,331 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1733,
1850
]
} | 14,332 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
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 th... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
2376,
2489
]
} | 14,333 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | approve | function approve(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... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
2962,
3022
]
} | 14,334 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) external view returns (address operator);
| /**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3176,
3260
]
} | 14,335 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool _approved) external;
| /**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3587,
3662
]
} | 14,336 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) external view returns (bool);
| /**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3813,
3906
]
} | 14,337 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721 | 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.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
| /**
* @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 {appro... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4483,
4630
]
} | 14,338 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Strings | 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 ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | 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 ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
184,
912
]
} | 14,339 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Strings | 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 ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | 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.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1017,
1362
]
} | 14,340 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Strings | 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 ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | 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;
}
... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1485,
1941
]
} | 14,341 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Ownable | 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() {
_setOwner(_msgSender());
... | /**
* @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}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
399,
491
]
} | 14,342 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Ownable | 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() {
_setOwner(_msgSender());
... | /**
* @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}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyDeployer {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyDeployer` 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.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1056,
1158
]
} | 14,343 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Ownable | 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() {
_setOwner(_msgSender());
... | /**
* @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}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyDeployer {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1308,
1508
]
} | 14,344 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721Receiver | 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 valu... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
| /**
* @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 ... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
528,
698
]
} | 14,345 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721Metadata | 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... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the token collection name.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
106,
165
]
} | 14,346 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721Metadata | 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... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the token collection symbol.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
236,
297
]
} | 14,347 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721Metadata | 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... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) external view returns (string memory);
| /**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
398,
476
]
} | 14,348 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
... | /**
* @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:
... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
606,
998
]
} | 14,349 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | 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 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 `tr... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1928,
2250
]
} | 14,350 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @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... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3007,
3187
]
} | 14,351 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | 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 with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3412,
3646
]
} | 14,352 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | 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-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._
*... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4016,
4281
]
} | 14,353 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | 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");... | /**
* @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._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4532,
5048
]
} | 14,354 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | 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-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
5228,
5432
]
} | 14,355 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | 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 _verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
5619,
6020
]
} | 14,356 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionDelegateCall | 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-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
6202,
6407
]
} | 14,357 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Address | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionDelegateCall | 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 _verifyCall... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
6596,
6998
]
} | 14,358 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC165 | abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
} | /**
* @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 interface... | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
103,
265
]
} | 14,359 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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 {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
971,
1242
]
} | 14,360 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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-balanceOf}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1301,
1514
]
} | 14,361 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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 {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1571,
1815
]
} | 14,362 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1877,
1982
]
} | 14,363 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
2046,
2155
]
} | 14,364 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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 See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
2221,
2560
]
} | 14,365 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _baseURI | function _baseURI() internal view virtual returns (string memory) {
return "";
}
| /**
* @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.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
2803,
2902
]
} | 14,366 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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")... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
2959,
3338
]
} | 14,367 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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-getApproved}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3399,
3625
]
} | 14,368 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3692,
3992
]
} | 14,369 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4058,
4227
]
} | 14,370 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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-transferFrom}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4289,
4633
]
} | 14,371 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4699,
4889
]
} | 14,372 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | 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 See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4955,
5288
]
} | 14,373 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _safeTransfer | 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 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 eq... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
6165,
6485
]
} | 14,374 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _exists | function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
| /**
* @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`).
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
6793,
6925
]
} | 14,375 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _isApprovedOrOwner | 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, s... | /**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
7087,
7440
]
} | 14,376 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @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.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
7777,
7892
]
} | 14,377 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _safeMint | 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 Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
8114,
8403
]
} | 14,378 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _mint | 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 Tra... | /**
* @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.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
8734,
9121
]
} | 14,379 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _burn | 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), toke... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
9345,
9710
]
} | 14,380 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
//... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
10042,
10625
]
} | 14,381 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
10738,
10917
]
} | 14,382 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _checkOnERC721Received | 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 == IERC721... | /**
* @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 to... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
11477,
12285
]
} | 14,383 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721 | 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 _ow... | /**
* @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}.
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
| /**
* @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, ``... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
12852,
12983
]
} | 14,384 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanc... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the total amount of tokens stored by the contract.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
132,
192
]
} | 14,385 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanc... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
| /**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
375,
479
]
} | 14,386 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanc... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) external view returns (uint256);
| /**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
655,
729
]
} | 14,387 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
605,
834
]
} | 14,388 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
| /**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
913,
1174
]
} | 14,389 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1245,
1363
]
} | 14,390 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
| /**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
1435,
1673
]
} | 14,391 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnume... | /**
* @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, ``... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
2281,
2875
]
} | 14,392 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _addTokenToOwnerEnumeration | function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
| /**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3171,
3397
]
} | 14,393 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _addTokenToAllTokensEnumeration | function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
| /**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
3593,
3762
]
} | 14,394 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _removeTokenFromOwnerEnumeration | function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 ... | /**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
4384,
5377
]
} | 14,395 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _removeTokenFromAllTokensEnumeration | function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allT... | /**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
5667,
6751
]
} | 14,396 |
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override {
super._beforeTokenTransfer(from, to, tokenId);
// Skip freshly minted tokens to save gas
if (from != address(0)) {
tokenTransferCounts[tokenId] += 1;
}
}
| /**
* @dev Track token transfers / upgrade potentials
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
7088,
7429
]
} | 14,397 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | upgradeToken | function upgradeToken(uint256 tokenId) external {
require(_exists(tokenId), "Update nonexistent token");
require(_msgSender() == ERC721.ownerOf(tokenId), "Must own token for upgrade");
require(tokenLevels[tokenId] < tokenTransferCounts[tokenId], "Token is not ready for upgrade");
uint256 oldLevel ... | /**
* @dev Upgrade a token if it's ready
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
7493,
8026
]
} | 14,398 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | getMooncakeTextSlotIds | function getMooncakeTextSlotIds(uint256 tokenId, uint256 level) public view returns (uint8[6] memory) {
uint8[6] memory slotIds;
//generate a sequence of pseudo random numbers, seeded by id
uint32[15] memory seq;
uint256 r = tokenId + 20000;
for (uint256 i = 0; i < 15; i++) {
r = (r ... | /**
* @dev Return the slot id for each text chunk. Useful for translations.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
8125,
10377
]
} | 14,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.