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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4094,
4325
]
} | 200 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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");
// solhint-disa... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4576,
5111
]
} | 201 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
5291,
5495
]
} | 202 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.stat... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
5682,
6109
]
} | 203 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
6291,
6496
]
} | 204 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.deleg... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
6685,
7113
]
} | 205 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 () {
address msgSender = _msgSend... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
497,
589
]
} | 206 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 () {
address msgSender = _msgSend... | /**
* @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 onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1148,
1301
]
} | 207 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 () {
address msgSender = _msgSend... | /**
* @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 onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = 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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1451,
1700
]
} | 208 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | Solidity | Strings | library Strings {
bytes16 private constant alphabet = "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 lice... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
180,
908
]
} | 209 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | Solidity | Strings | library Strings {
bytes16 private constant alphabet = "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 lice... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1013,
1358
]
} | 210 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | Solidity | Strings | library Strings {
bytes16 private constant alphabet = "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 lice... | /**
* @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] = alphabet[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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1481,
1933
]
} | 211 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
977,
1274
]
} | 212 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1333,
1546
]
} | 213 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1603,
1847
]
} | 214 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1909,
2014
]
} | 215 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
2078,
2187
]
} | 216 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
2253,
2618
]
} | 217 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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}. Empty by default, can be overriden
* in child contracts.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
2750,
2849
]
} | 218 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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 ... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
2906,
3308
]
} | 219 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
3369,
3595
]
} | 220 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
3662,
3962
]
} | 221 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4028,
4197
]
} | 222 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4259,
4569
]
} | 223 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4635,
4791
]
} | 224 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4857,
5147
]
} | 225 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
6024,
6301
]
} | 226 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
6609,
6741
]
} | 227 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
6903,
7256
]
} | 228 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
7593,
7708
]
} | 229 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
7930,
8185
]
} | 230 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
8516,
8903
]
} | 231 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
9127,
9492
]
} | 232 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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);
// Clear approvals f... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
9824,
10373
]
} | 233 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
10486,
10665
]
} | 234 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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 == IERC721Receiver(to).onER... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
11225,
12073
]
} | 235 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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 _o... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
12679,
12777
]
} | 236 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | 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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
605,
847
]
} | 237 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | 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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
926,
1187
]
} | 238 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1258,
1376
]
} | 239 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | 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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
1448,
1686
]
} | 240 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | _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) {
_removeTokenFromOwnerEnumeration(from, token... | /**
* @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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
2294,
2854
]
} | 241 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | _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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
3150,
3376
]
} | 242 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | _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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
3572,
3741
]
} | 243 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | _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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4363,
5356
]
} | 244 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | 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;... | // <3 | LineComment | _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://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
5646,
6730
]
} | 245 |
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | Solidity | COVIDBots | contract COVIDBots is Ownable, ERC721Enumerable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
string public imageHash;
uint256 public constant MAX_MINTABLE_AT_ONCE = 20;
string public botcontractURI;
constructor() ERC721("COVIDBots", "BOT-19") {}
u... | airdropMint | function airdropMint(address receiver, uint256 numRolls) public onlyOwner {
require(numRolls < 21, "You should not mint more than 20 at a time.");
uint256 toMint = numRolls;
_mint(toMint, receiver);
}
| // function to mint and send airdrop | LineComment | v0.8.4+commit.c7e474f2 | MIT | ipfs://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
603,
825
]
} | 246 | ||
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | Solidity | COVIDBots | contract COVIDBots is Ownable, ERC721Enumerable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
string public imageHash;
uint256 public constant MAX_MINTABLE_AT_ONCE = 20;
string public botcontractURI;
constructor() ERC721("COVIDBots", "BOT-19") {}
u... | _mint | function _mint(uint256 _numToMint, address receiver) internal {
require(_numToMint <= MAX_MINTABLE_AT_ONCE, "Minting too many at once.");
uint256 updatedNumAvailableTokens = _numAvailableTokens;
for (uint256 i = 0; i < _numToMint; i++) {
uint256 newTokenId = useRandomAvailableToken(_numToMint, i);
... | // internal minting function | LineComment | v0.8.4+commit.c7e474f2 | MIT | ipfs://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
860,
1327
]
} | 247 | ||
COVIDBots | COVIDBots.sol | 0x9525c4fe14addba627db8e45036767895181e559 | Solidity | COVIDBots | contract COVIDBots is Ownable, ERC721Enumerable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
string public imageHash;
uint256 public constant MAX_MINTABLE_AT_ONCE = 20;
string public botcontractURI;
constructor() ERC721("COVIDBots", "BOT-19") {}
u... | setBaseURI | function setBaseURI(string memory baseURI) external onlyOwner {
_baseTokenURI = baseURI;
}
| // URIs | LineComment | v0.8.4+commit.c7e474f2 | MIT | ipfs://944a7377e0622a606d3cab245c6757f2fdca55cb915e220692d4274ff1187fed | {
"func_code_index": [
4266,
4367
]
} | 248 | ||
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256... | /**
* @dev Multiplies two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
90,
486
]
} | 249 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0); // Solidity only automatically asserts when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
598,
877
]
} | 250 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
992,
1131
]
} | 251 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
| /**
* @dev Adds two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1196,
1335
]
} | 252 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1470,
1587
]
} | 253 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | mul | function mul(int256 a, int256 b)
internal
pure
returns (int256)
{
int256 c = a * b;
// Detect overflow when multiplying MIN_INT256 with -1
require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
require((b == 0) || (c / b == a));
return c;
}
| /**
* @dev Multiplies two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
234,
574
]
} | 254 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | div | function div(int256 a, int256 b)
internal
pure
returns (int256)
{
// Prevent overflow when dividing MIN_INT256 by -1
require(b != -1 || a != MIN_INT256);
// Solidity already throws when dividing by 0.
return a / b;
}
| /**
* @dev Division of two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
664,
960
]
} | 255 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | sub | function sub(int256 a, int256 b)
internal
pure
returns (int256)
{
int256 c = a - b;
require((b >= 0 && c <= a) || (b < 0 && c > a));
return c;
}
| /**
* @dev Subtracts two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1048,
1261
]
} | 256 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | add | function add(int256 a, int256 b)
internal
pure
returns (int256)
{
int256 c = a + b;
require((b >= 0 && c >= a) || (b < 0 && c < a));
return c;
}
| /**
* @dev Adds two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1344,
1557
]
} | 257 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | abs | function abs(int256 a)
internal
pure
returns (int256)
{
require(a != MIN_INT256);
return a < 0 ? -a : a;
}
| /**
* @dev Converts to absolute value, and fails on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1642,
1808
]
} | 258 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | UInt256Lib | library UInt256Lib {
uint256 private constant MAX_INT256 = ~(uint256(1) << 255);
/**
* @dev Safely converts a uint256 to an int256.
*/
function toInt256Safe(uint256 a)
internal
pure
returns (int256)
{
require(a <= MAX_INT256);
return int25... | /**
* @title Various utilities useful for uint256.
*/ | NatSpecMultiLine | toInt256Safe | function toInt256Safe(uint256 a)
internal
pure
returns (int256)
{
require(a <= MAX_INT256);
return int256(a);
}
| /**
* @dev Safely converts a uint256 to an int256.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
162,
333
]
} | 259 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
*... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | owner | function owner() public view returns(address) {
return _owner;
}
| /**
* @return the address of the owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
451,
526
]
} | 260 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
*... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | isOwner | function isOwner() public view returns(bool) {
return msg.sender == _owner;
}
| /**
* @return true if `msg.sender` is the owner of the contract.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
753,
841
]
} | 261 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
*... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(_owner);
_owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1110,
1229
]
} | 262 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
*... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1393,
1499
]
} | 263 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
*... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal {
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
1636,
1812
]
} | 264 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
require(!rebaseLocked, "Cannot renounce ownership if rebase is locked");
super.renounceOwnership();
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Override to ensure that rebases aren't locked when this happens.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
2567,
2744
]
} | 265 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | canRebase | function canRebase() public view returns (bool) {
return ((!rebaseLocked || isOwner()) && lastRebaseTimestampSec.add(rebaseCooldown) < now);
}
| /**
* @notice Returns true if the cooldown timer has expired since the last rebase.
*
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
2981,
3142
]
} | 266 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | rebase | function rebase() external {
require(tx.origin == msg.sender);
require(canRebase(), "Rebase not allowed");
lastRebaseTimestampSec = now;
epoch = epoch.add(1);
(uint256 exchangeRate, int256 supplyDelta) = getRebaseValues();
uint256 supplyAfterRebase = cum.rebase(epoch, sup... | /**
* @notice Initiates a new rebase operation, provided the minimum time period has elapsed.
*
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
3419,
4521
]
} | 267 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | incrementTargetRate | function incrementTargetRate() internal {
targetRate = targetRate.mul(71).div(50);
}
| // Increment by 42% | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
4553,
4656
]
} | 268 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | finalRate | function finalRate() internal {
targetRate = (1 * 10 ** (DECIMALS+6));
}
| // Final rate of $1,000,000 per coin | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
4705,
4796
]
} | 269 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | getRebaseValues | function getRebaseValues() public view returns (uint256, int256) {
uint256 exchangeRate = marketOracle.getData();
if (exchangeRate > MAX_RATE) {
exchangeRate = MAX_RATE;
}
int256 supplyDelta = computeSupplyDelta(exchangeRate);
// Apply the dampening factor.
if (supplyDelta... | /**
* @notice Calculates the supplyDelta and returns the current set of values for the rebase
*
* @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag
* Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate
*
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
5132,
5872
]
} | 270 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | computeSupplyDelta | function computeSupplyDelta(uint256 rate)
internal
view
returns (int256)
{
if (withinDeviationThreshold(rate)) {
return 0;
}
int256 targetRateSigned = targetRate.toInt256Safe();
return cum.totalSupply().toInt256Safe()
.mul(rate.toInt256Safe().sub(targetRateSigned)... | /**
* @return Computes the total supply adjustment in response to the exchange rate
* and the targetRate.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
6017,
6427
]
} | 271 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | withinDeviationThreshold | function withinDeviationThreshold(uint256 rate)
internal
view
returns (bool)
{
uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold)
.div(10 ** DECIMALS);
return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold)
|| (rate < targetRat... | /**
* @param rate The current exchange rate, an 18 decimal fixed point number.
* @return If the rate is within the deviation threshold from the target rate, returns true.
* Otherwise, returns false.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
6669,
7089
]
} | 272 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | setMarketOracle | function setMarketOracle(IOracle marketOracle_)
external
onlyOwner
{
marketOracle = marketOracle_;
}
| /**
* @notice Sets the reference to the market oracle.
* @param marketOracle_ The address of the market oracle contract.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
7243,
7385
]
} | 273 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | addTransaction | function addTransaction(address destination, bytes calldata data)
external
onlyOwner
{
transactions.push(Transaction({
enabled: true,
destination: destination,
data: data
}));
}
| /**
* @notice Adds a transaction that gets called for a downstream receiver of rebases
* @param destination Address of contract destination
* @param data Transaction data payload
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
7603,
7870
]
} | 274 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | removeTransaction | function removeTransaction(uint index)
external
onlyOwner
{
require(index < transactions.length, "index out of bounds");
if (index < transactions.length - 1) {
transactions[index] = transactions[transactions.length - 1];
}
transactions.length--;
}
| /**
* @param index Index of transaction to remove.
* Transaction ordering may have changed since adding.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
8017,
8358
]
} | 275 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | setTransactionEnabled | function setTransactionEnabled(uint index, bool enabled)
external
onlyOwner
{
require(index < transactions.length, "index must be in range of stored tx list");
transactions[index].enabled = enabled;
}
| /**
* @param index Index of transaction. Transaction ordering may have changed since adding.
* @param enabled True for enabled, false for disabled.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
8535,
8786
]
} | 276 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | transactionsSize | function transactionsSize()
external
view
returns (uint256)
{
return transactions.length;
}
| /**
* @return Number of transactions, both enabled and disabled, in transactions list.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
8896,
9038
]
} | 277 |
Master | Master.sol | 0x7cb1f7f5f202dfd0e2e7a6576e4cf4659e892d6d | Solidity | Master | contract Master is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
struct Transaction {
bool enabled;
address destination;
bytes data;
}
event TransactionFailed(address indexed destination, uint index, bytes d... | /**
* @title Cum's Master
* @dev Controller for an elastic supply currency based on the uFragments Ideal Money protocol a.k.a. Ampleforth.
* uFragments operates symmetrically on expansion and contraction. It will both split and
* combine coins to maintain a stable unit price.
*
* This compone... | NatSpecMultiLine | externalCall | function externalCall(address destination, bytes memory data)
internal
returns (bool)
{
bool result;
assembly { // solhint-disable-line no-inline-assembly
// "Allocate" memory for output
// (0x40 is where "free memory" pointer is stored by convention)
let outputAddress :... | /**
* @dev wrapper to call the encoded transactions on downstream consumers.
* @param destination Address of destination contract.
* @param data The encoded data payload.
* @return True on success
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://3db074746559bd097861a123cc9a7d54637b7492983d43b1fe01d59a37491a0b | {
"func_code_index": [
9276,
10211
]
} | 278 |
Vesting | contracts/Vesting.sol | 0xefb2955782f138a0517dc9028bb85891b8c6fe42 | Solidity | Vesting | contract Vesting is Ownable, ReentrancyGuard {
using SafeMath for uint;
uint public constant NUMBER_OF_EPOCHS = 100;
uint public constant EPOCH_DURATION = 604800; // 1 week duration
IERC20 private immutable _bond;
uint public lastClaimedEpoch;
uint private immutable _startTime;
uint publi... | // default | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
1549,
1585
]
} | 279 | ||||||
BlockChainedElite | contracts/BlockChainedElite.sol | 0x97254a8a901617a13dd1bf1f26b81c00abbb35bd | Solidity | BlockChainedElite | contract BlockChainedElite is ERC721, Ownable {
using SafeMath for uint256;
// state variables
uint256 constant HotSaleLength = 14 days;
uint256 start;
// mapping
mapping (uint256 => string) public tokenNames;
mapping (string => bool) private nameReserved;
mapping (uint256 => uint256) ... | /**
* @title BlockChainedELite
* Limited run NFT collection of 2021's most popular pop culture icons
* Inspired by the Mock provided by OpenZeppelin
*/ | NatSpecMultiLine | toggleReserveName | function toggleReserveName(string memory str, bool isReserve) internal {
nameReserved[toLower(str)] = isReserve;
}
| /**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
3821,
3951
]
} | 280 | ||
BlockChainedElite | contracts/BlockChainedElite.sol | 0x97254a8a901617a13dd1bf1f26b81c00abbb35bd | Solidity | BlockChainedElite | contract BlockChainedElite is ERC721, Ownable {
using SafeMath for uint256;
// state variables
uint256 constant HotSaleLength = 14 days;
uint256 start;
// mapping
mapping (uint256 => string) public tokenNames;
mapping (string => bool) private nameReserved;
mapping (uint256 => uint256) ... | /**
* @title BlockChainedELite
* Limited run NFT collection of 2021's most popular pop culture icons
* Inspired by the Mock provided by OpenZeppelin
*/ | NatSpecMultiLine | isNameReserved | function isNameReserved(string memory nameString) public view returns (bool) {
return nameReserved[toLower(nameString)];
}
| /**
* @dev Returns if the name has been reserved.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
4020,
4158
]
} | 281 | ||
BlockChainedElite | contracts/BlockChainedElite.sol | 0x97254a8a901617a13dd1bf1f26b81c00abbb35bd | Solidity | BlockChainedElite | contract BlockChainedElite is ERC721, Ownable {
using SafeMath for uint256;
// state variables
uint256 constant HotSaleLength = 14 days;
uint256 start;
// mapping
mapping (uint256 => string) public tokenNames;
mapping (string => bool) private nameReserved;
mapping (uint256 => uint256) ... | /**
* @title BlockChainedELite
* Limited run NFT collection of 2021's most popular pop culture icons
* Inspired by the Mock provided by OpenZeppelin
*/ | NatSpecMultiLine | changeName | function changeName(uint256 tokenId, string memory newName) public {
address owner = ownerOf(tokenId);
require(_msgSender() == owner, "BCE: Ownership");
require(validateName(newName) == true, "BCE: Invalid");
require(sha256(bytes(newName)) != sha256(bytes(tokenNames[tokenId])), "BCE: Used");
requir... | /**
* @dev Changes the name for given tokenId
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
4223,
5041
]
} | 282 | ||
BlockChainedElite | contracts/BlockChainedElite.sol | 0x97254a8a901617a13dd1bf1f26b81c00abbb35bd | Solidity | BlockChainedElite | contract BlockChainedElite is ERC721, Ownable {
using SafeMath for uint256;
// state variables
uint256 constant HotSaleLength = 14 days;
uint256 start;
// mapping
mapping (uint256 => string) public tokenNames;
mapping (string => bool) private nameReserved;
mapping (uint256 => uint256) ... | /**
* @title BlockChainedELite
* Limited run NFT collection of 2021's most popular pop culture icons
* Inspired by the Mock provided by OpenZeppelin
*/ | NatSpecMultiLine | validateName | function validateName(string memory str) public pure returns (bool){
bytes memory b = bytes(str);
if(b.length < 1) return false;
if(b.length > 25) return false; // Cannot be longer than 25 characters
if(b[0] == 0x20) return false; // Leading space
if (b[b.length - 1] == 0x20) return false; // Traili... | /**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
5166,
6062
]
} | 283 | ||
BlockChainedElite | contracts/BlockChainedElite.sol | 0x97254a8a901617a13dd1bf1f26b81c00abbb35bd | Solidity | BlockChainedElite | contract BlockChainedElite is ERC721, Ownable {
using SafeMath for uint256;
// state variables
uint256 constant HotSaleLength = 14 days;
uint256 start;
// mapping
mapping (uint256 => string) public tokenNames;
mapping (string => bool) private nameReserved;
mapping (uint256 => uint256) ... | /**
* @title BlockChainedELite
* Limited run NFT collection of 2021's most popular pop culture icons
* Inspired by the Mock provided by OpenZeppelin
*/ | NatSpecMultiLine | toLower | function toLower(string memory str) public pure returns (string memory){
bytes memory bStr = bytes(str);
bytes memory bLower = new bytes(bStr.length);
for (uint i = 0; i < bStr.length; i++) {
// Uppercase character
if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) {
bLower[i]... | /**
* @dev Converts the string to lowercase
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | {
"func_code_index": [
6125,
6623
]
} | 284 | ||
Starchain | contracts/Starchain.sol | 0x9e731cba0deece52fd7c3b439e2ec4b950e385d6 | Solidity | Starchain | contract Starchain is ERC721PresetMinterPauserAutoId {
using Strings for uint256;
uint16 public maxSupply = 10000;
uint256 public price = 30000000000000000; // start at 0.04 ETH
address payable account1 = payable(0x551E0713059896774721025e9953FCBE073AB4cE); // callan
address payable account... | payAccounts | function payAccounts() public payable {
uint256 balance = address(this).balance;
if (balance != 0) {
account1.transfer((balance * 33 / 100));
account2.transfer((balance * 33 / 100));
account3.transfer(balance * 33 / 100);
}
}
| // send contract balance to addresses 1 and 2 | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2372,
2665
]
} | 285 | ||||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
94,
154
]
} | 286 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
237,
310
]
} | 287 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
534,
616
]
} | 288 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
895,
983
]
} | 289 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
1647,
1726
]
} | 290 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
2039,
2175
]
} | 291 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
100,
159
]
} | 292 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
226,
287
]
} | 293 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
363,
418
]
} | 294 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
811,
916
]
} | 295 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
1030,
1139
]
} | 296 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | decimals | function decimals() public view virtual override returns (uint8) {
return 18;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
1773,
1871
]
} | 297 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
1931,
2044
]
} | 298 | ||
QTH | QTH.sol | 0x198c654590f6f864a0054e2a213224fc9cc775de | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://270844cb18b7741751f95dcb651df74a9731e2465dae73ddbc7fb4ee6d7aec46 | {
"func_code_index": [
2102,
2234
]
} | 299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.