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
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.suppor...
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 4807, 5184 ] }
5,307
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 5243, 5454 ] }
5,308
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
ownershipOf
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != addres...
/** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 6081, 7169 ] }
5,309
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 7226, 7355 ] }
5,310
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev See {IERC721Metadata-name}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 7417, 7522 ] }
5,311
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev See {IERC721Metadata-symbol}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 7586, 7695 ] }
5,312
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 7761, 8084 ] }
5,313
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return ''; }
/** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 8327, 8426 ] }
5,314
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 8483, 8859 ] }
5,315
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 8920, 9129 ] }
5,316
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 9196, 9480 ] }
5,317
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
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.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 9546, 9715 ] }
5,318
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 9777, 9952 ] }
5,319
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 10018, 10208 ] }
5,320
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (!_checkOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 10274, 10621 ] }
5,321
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < _currentIndex && !_ownerships[tokenId].burned; }
/** * @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`), */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 10871, 11020 ] }
5,322
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_safeMint
function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); }
/** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 11490, 11658 ] }
5,323
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_mint
function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, qu...
/** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 11912, 13339 ] }
5,324
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_transfer
function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) =...
/** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 13588, 15705 ] }
5,325
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of t...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 15929, 17974 ] }
5,326
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_approve
function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 18087, 18288 ] }
5,327
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721...
/** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param to...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 18848, 19643 ] }
5,328
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_beforeTokenTransfers
function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {}
/** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 20286, 20450 ] }
5,329
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps trac...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_afterTokenTransfers
function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {}
/** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 21104, 21267 ] }
5,330
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
EscapeOfficial
contract EscapeOfficial is Ownable, ReentrancyGuard, ERC721A { using Strings for uint256; string private baseURI; string private baseExtension = ".json"; uint256 private cost = 0.025 ether; uint256 public maxSupply = 6577; uint256 public maxMintAmount = 5; bool public saleIsActive = true; bool...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// internal
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 739, 844 ] }
5,331
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
EscapeOfficial
contract EscapeOfficial is Ownable, ReentrancyGuard, ERC721A { using Strings for uint256; string private baseURI; string private baseExtension = ".json"; uint256 private cost = 0.025 ether; uint256 public maxSupply = 6577; uint256 public maxMintAmount = 5; bool public saleIsActive = true; bool...
mint
function mint(uint256 _mintAmount) external payable { require(saleIsActive, "Sale is not active!"); require(totalSupply() >= numberOfFreeNFTs, "Can not mint more than one until 1000 NFTs are minted!"); require(balanceOf(msg.sender) + _mintAmount <= maxMintAmount, "Maximum 5 NFTs minted per wallet!"); requir...
// public
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 860, 1436 ] }
5,332
EscapeOfficial
@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
0x4ecc242248993edb5c0aa0337677d5851e36c213
Solidity
EscapeOfficial
contract EscapeOfficial is Ownable, ReentrancyGuard, ERC721A { using Strings for uint256; string private baseURI; string private baseExtension = ".json"; uint256 private cost = 0.025 ether; uint256 public maxSupply = 6577; uint256 public maxMintAmount = 5; bool public saleIsActive = true; bool...
setReveal
function setReveal(bool value) public onlyOwner { revealed = value; }
//only owner
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cb01099678bee8c0f17e31bcbbc7a4a34709dd17835cecfd0304598570abde9a
{ "func_code_index": [ 2427, 2507 ] }
5,333
Staker
Staker.sol
0xbae235823d7255d9d48635ced4735227244cd583
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. ...
/** * @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) onlyOwner public { require(newOwner != address(0)); owner = 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.4.24+commit.e67f0147
bzzr://b8bfc7ab980326a01601bc1a362edb3304460f6df43ea43abca6185209e5dcbf
{ "func_code_index": [ 585, 729 ] }
5,334
SquidArena
contracts/SquidArena.sol
0x0cc34f2ee846c97e6a2c31b8de8314781d779358
Solidity
SquidArena
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase { bytes32 internal keyHash; uint256 internal fee; uint256 public randomResult; using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; // Defines the different st...
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄ // ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄ // ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄ // ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄█...
LineComment
pullRug
function pullRug() public payable onlyOwner { uint256 balance = address(this).balance; require(balance > 0); _widthdraw(owner(), address(this).balance); }
// This is a last resort fail safe function. // If for any reason the contract doesn't sell out // or needs to be shutdown. This allows the administrators // to be able to to withdraw all funds from the contract // so that it can be disbursed back to the original minters
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 4324, 4494 ] }
5,335
SquidArena
contracts/SquidArena.sol
0x0cc34f2ee846c97e6a2c31b8de8314781d779358
Solidity
SquidArena
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase { bytes32 internal keyHash; uint256 internal fee; uint256 public randomResult; using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; // Defines the different st...
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄ // ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄ // ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄ // ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄█...
LineComment
claimWinnerReward
function claimWinnerReward() public { require(creatorHasClaimed == true, 'Creator reward not claimed'); require(totalSupply() == 1, 'Game not finished'); require(_msgSender() == winnerAddress, 'Not winner'); _widthdraw(winnerAddress, address(this).balance); }
/** * Claim winner: * - Requires creatorHasClaimed to be true * - Requires 1 token to be left * - Requires creator to have * - Withdraws the rest of the balance to contract owner */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 5681, 5960 ] }
5,336
SquidArena
contracts/SquidArena.sol
0x0cc34f2ee846c97e6a2c31b8de8314781d779358
Solidity
SquidArena
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase { bytes32 internal keyHash; uint256 internal fee; uint256 public randomResult; using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; // Defines the different st...
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄ // ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄ // ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄ // ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄█...
LineComment
claimCreatorReward
function claimCreatorReward() public onlyOwner { require(creatorHasClaimed == false, 'Creator reward claimed'); uint256 balance = address(this).balance; uint256 creatorReward = SafeMath.mul(SafeMath.div(balance, 100), CREATOR_PERCENTAGE); _widthdraw(owner(), creatorReward); creatorHasClaimed = true; }
/** * Claim creator: * - Requires creatorHasClaimed to be false * - Withdraws CREATOR_PERCENTAGE / 100 * POT to contract owner * - Sets creatorHasClaimed to true */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 6144, 6470 ] }
5,337
SquidArena
contracts/SquidArena.sol
0x0cc34f2ee846c97e6a2c31b8de8314781d779358
Solidity
SquidArena
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase { bytes32 internal keyHash; uint256 internal fee; uint256 public randomResult; using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; // Defines the different st...
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄ // ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄ // ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄ // ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄█...
LineComment
_getRandomNumber
function _getRandomNumber() internal returns (bytes32 requestId) { require(LINK.balanceOf(address(this)) >= fee, 'Not enough LINK'); // Increment the current burn currentBurn += 1; return requestRandomness(keyHash, fee); }
/** * Requests randomness */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 6509, 6751 ] }
5,338
SquidArena
contracts/SquidArena.sol
0x0cc34f2ee846c97e6a2c31b8de8314781d779358
Solidity
SquidArena
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase { bytes32 internal keyHash; uint256 internal fee; uint256 public randomResult; using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; // Defines the different st...
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄ // ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄ // ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄ // ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄█...
LineComment
fulfillRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { randomResult = randomness; // Since Chainlink has provided a verifiably random value, // that can be used for the burn, let the admin burn the supply. _isAdminBurnEnabled = true; }
/** * Callback function used by VRF Coordinator */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 6812, 7099 ] }
5,339
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
doesEntityExist
function doesEntityExist( address _entityAddress, EntityState entity ) private pure returns (bool) { return (_entityAddress != address(0) && entity.index != 0); }
// // Entity functions //
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 1304, 1508 ] }
5,340
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
getIssuerAddressList
function getIssuerAddressList() public view returns (address[]) { return issuerAddressList; }
// // Issuer functions // // Return all tracked issuer addresses
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 3161, 3283 ] }
5,341
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
addIssuer
function addIssuer(address _issuerAddress) public onlyOwner isNewIssuer(_issuerAddress) { issuerMap[_issuerAddress] = addEntity( _issuerAddress, issuerAddressList, true ); emit IssuerAdded(_issuerAddress); }
// Add an issuer and set active value to true
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 3335, 3604 ] }
5,342
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
removeIssuer
function removeIssuer(address _issuerAddress) public onlyOwner { require(doesEntityExist(_issuerAddress, issuerMap[_issuerAddress])); address addressToUpdate; uint256 indexUpdate; (addressToUpdate, indexUpdate) = removeEntity(issuerMap[_issuerAddress], issuerAddressList); issuerMap[addressToUpda...
// Remove an issuer
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 3630, 4080 ] }
5,343
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
listIssuer
function listIssuer(address _issuerAddress) public onlyOwner { require(doesEntityExist(_issuerAddress, issuerMap[_issuerAddress])); setEntityActiveValue(issuerMap[_issuerAddress], true); emit IssuerStatusChanged(_issuerAddress, true); }
// Set previously delisted issuer to listed
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 4130, 4402 ] }
5,344
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
delistIssuer
function delistIssuer(address _issuerAddress) public onlyOwner { require(doesEntityExist(_issuerAddress, issuerMap[_issuerAddress])); setEntityActiveValue(issuerMap[_issuerAddress], false); emit IssuerStatusChanged(_issuerAddress, false); }
// Set previously listed issuer to delisted
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 4452, 4728 ] }
5,345
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
getTokenAddressList
function getTokenAddressList() public view returns (address[]) { return tokenAddressList; }
// // Token functions // // Return all tracked token addresses
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 5218, 5338 ] }
5,346
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
addNewToken
function addNewToken( bytes32 _name32, bytes32 _symbol32, bytes32 _fiatCurrency32, address _custodian, uint256 _totalSupply, uint256 _startTimeForFundingPeriod, uint256 _durationForFiatFundingPeriod, uint256 _durationForEthFundingPeriod, uint256 _durationForActivationPeriod, uint256 _fundi...
/** @notice Creates a PoaToken contract with given parameters, and set active value to false @param _fiatCurrency32 Fiat symbol used in ExchangeRates @param _startTimeForFundingPeriod Given as unix time in seconds since 01.01.1970 @param _durationForFiatFundingPeriod How long fiat funding can last, given in sec...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 6285, 7374 ] }
5,347
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
addExistingToken
function addExistingToken(address _tokenAddress, bool _isListed) external onlyOwner { require(!doesEntityExist(_tokenAddress, tokenMap[_tokenAddress])); // Issuer address of `_tokenAddress` must be an active Issuer. // If `_tokenAddress` is not an instance of PoaProxy, this will fail as desired. requ...
/** @notice Add existing `PoaProxy` contracts when `PoaManager` has been upgraded @param _tokenAddress the `PoaProxy` address to address @param _isListed if `PoaProxy` should be added as active or inactive @dev `PoaProxy` contracts can only be added when the POA's issuer is already listed. Furthermore, we use...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 7792, 8305 ] }
5,348
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
removeToken
function removeToken(address _tokenAddress) public onlyOwner { require(doesEntityExist(_tokenAddress, tokenMap[_tokenAddress])); address addressToUpdate; uint256 indexUpdate; (addressToUpdate, indexUpdate) = removeEntity(tokenMap[_tokenAddress], tokenAddressList); tokenMap[addressToUpdate].index...
// Remove a token
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 8329, 8766 ] }
5,349
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
listToken
function listToken(address _tokenAddress) public onlyOwner { require(doesEntityExist(_tokenAddress, tokenMap[_tokenAddress])); setEntityActiveValue(tokenMap[_tokenAddress], true); emit TokenStatusChanged(_tokenAddress, true); }
// Set previously delisted token to listed
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 8815, 9078 ] }
5,350
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
delistToken
function delistToken(address _tokenAddress) public onlyOwner { require(doesEntityExist(_tokenAddress, tokenMap[_tokenAddress])); setEntityActiveValue(tokenMap[_tokenAddress], false); emit TokenStatusChanged(_tokenAddress, false); }
// Set previously listed token to delisted
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 9127, 9394 ] }
5,351
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
pauseToken
function pauseToken(address _tokenAddress) public onlyOwner { IPoaToken(_tokenAddress).pause(); }
// // Token onlyOwner functions as PoaManger is `owner` of all PoaToken // // Allow unpausing a listed PoaToken
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 9921, 10042 ] }
5,352
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
unpauseToken
function unpauseToken(IPoaToken _tokenAddress) public onlyOwner { _tokenAddress.unpause(); }
// Allow unpausing a listed PoaToken
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 10085, 10201 ] }
5,353
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
terminateToken
function terminateToken(IPoaToken _tokenAddress) public onlyOwner { _tokenAddress.terminate(); }
// Allow terminating a listed PoaToken
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 10246, 10366 ] }
5,354
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
upgradeToken
function upgradeToken(PoaProxy _proxyToken) external onlyOwner returns (bool) { _proxyToken.proxyChangeTokenMaster( registry.getContractAddress("PoaTokenMaster") ); return true; }
// upgrade an existing PoaToken proxy to what is stored in ContractRegistry
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 10448, 10675 ] }
5,355
PoaManager
contracts/PoaManager.sol
0x9b97d864543f0e755228b27a552ed145f3d1e964
Solidity
PoaManager
contract PoaManager is Ownable { using SafeMath for uint256; uint256 constant version = 1; IRegistry public registry; struct EntityState { uint256 index; bool active; } // Keeping a list for addresses we track for easy access address[] private issuerAddressList; address[] priva...
upgradeCrowdsale
function upgradeCrowdsale(PoaProxy _proxyToken) external onlyOwner returns (bool) { _proxyToken.proxyChangeCrowdsaleMaster( registry.getContractAddress("PoaCrowdsaleMaster") ); return true; }
// upgrade an existing PoaCrowdsale proxy to what is stored in ContractRegistry
LineComment
v0.4.24+commit.e67f0147
bzzr://68fb153aab6ea446eb7f0a299aec399928ed8d899dc798bc3cd6c9d99c5193e3
{ "func_code_index": [ 10761, 11000 ] }
5,356
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
distribute
function distribute(address _to, uint256 _amount) public onlyOwner { _distribute(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); }
/** * @dev Chef distributes newly generated VOTEpoolToken to each farmmers * "onlyOwner" = "Only Chef" */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 838, 1017 ] }
5,357
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
burn
function burn(address _from, uint256 _amount) public { _burn(_from, _amount); }
/** * @dev Burning token */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 1069, 1167 ] }
5,358
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
changeTaxRatio
function changeTaxRatio(uint8 _taxRatio) public onlyOwner { taxRatio = _taxRatio; }
/** * @dev Tokenomic decition from governance */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 1240, 1342 ] }
5,359
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
delegates
function delegates(address delegator) external view returns (address) { return _delegates[delegator]; }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 2793, 2947 ] }
5,360
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
delegate
function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 3086, 3195 ] }
5,361
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
delegateBySig
function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), ...
/** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECD...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 3624, 4831 ] }
5,362
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
getCurrentVotes
function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; }
/** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 5027, 5287 ] }
5,363
VOTEpoolchef
contracts/VOTEpoolToken.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolToken
contract VOTEpoolToken is ERC20("VOTEpool.org", "VOT"), Ownable { using SafeMath for uint256; uint8 public taxRatio = 4; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { uint256 taxAmount = amount.mul(taxRatio).div(100); _burn(msg.sender, tax...
getPriorVotes
function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "VOTEpool.org::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } if (...
/** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 5713, 6886 ] }
5,364
HashStore
HashStore.sol
0x6a9633ac967c6da43bca00a601d9cd8c74d4c099
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @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.0+commit.1d4f565a
bzzr://032b5bad7acee1dbf72a7cd9aa01c54e0cf632d0f6ba33b031bb3d609ccf5487
{ "func_code_index": [ 457, 541 ] }
5,365
HashStore
HashStore.sol
0x6a9633ac967c6da43bca00a601d9cd8c74d4c099
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @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.0+commit.1d4f565a
bzzr://032b5bad7acee1dbf72a7cd9aa01c54e0cf632d0f6ba33b031bb3d609ccf5487
{ "func_code_index": [ 792, 889 ] }
5,366
HashStore
HashStore.sol
0x6a9633ac967c6da43bca00a601d9cd8c74d4c099
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @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.0+commit.1d4f565a
bzzr://032b5bad7acee1dbf72a7cd9aa01c54e0cf632d0f6ba33b031bb3d609ccf5487
{ "func_code_index": [ 1061, 1175 ] }
5,367
HashStore
HashStore.sol
0x6a9633ac967c6da43bca00a601d9cd8c74d4c099
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @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.0+commit.1d4f565a
bzzr://032b5bad7acee1dbf72a7cd9aa01c54e0cf632d0f6ba33b031bb3d609ccf5487
{ "func_code_index": [ 1320, 1512 ] }
5,368
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) whenNotPaused onlyMinters notBlacklisted(msg.sender) notBlacklisted(_to) public returns (bool) { require(_to != address(0)); require(_amount > 0); uint256 mintingAllowedAmount = minterAllowed[msg.sender]; require(_amount <= mintingAllowedAmount); ...
/** * @dev Function to mint tokens * _to The address that will receive the minted tokens. * _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 2201, 2830 ] }
5,369
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
minterAllowance
function minterAllowance(address minter) public view returns (uint256) { return minterAllowed[minter]; }
/** * @dev Get minter allowance for an account * minter The address of the minter */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 3124, 3247 ] }
5,370
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
isMinter
function isMinter(address _account) public view returns (bool) { return minters[_account]; }
/** * @dev Checks ifis a minter * The address to check */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 3334, 3445 ] }
5,371
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev Get totalSupply of token */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 3637, 3733 ] }
5,372
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return MAX_UINT; }
/** * @dev Get token balance of an account * address The account */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 3826, 3930 ] }
5,373
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_spender) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Adds blacklisted check to approve * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 4051, 4328 ] }
5,374
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { Transfer(_from, _to, _value); return true; }
/** * @dev Transfer tokens from one address to another. * _from address The address which you want to send tokens from * _to address The address which you want to transfer to * _value uint256 the amount of tokens to be transferred * @return bool success */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 4752, 4901 ] }
5,375
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) public returns (bool) { Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * _to The address to transfer to. * _value The amount to be transferred. * @return bool success */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 5095, 5233 ] }
5,376
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
configureMinter
function configureMinter(address minter, uint256 minterAllowedAmount) whenNotPaused onlyMasterMinter public returns (bool) { minters[minter] = true; minterAllowed[minter] = minterAllowedAmount; emit MinterConfigured(minter, minterAllowedAmount); return true; }
/** * @dev Function to add/update a new minter * minter The address of the minter * minterAllowedAmount The minting amount allowed for the minter * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 5471, 5777 ] }
5,377
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
removeMinter
function removeMinter(address minter) onlyMasterMinter public returns (bool) { minters[minter] = false; minterAllowed[minter] = 0; emit MinterRemoved(minter); return true; }
/** * @dev Function to remove a minter * minter The address of the minter to remove * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 5944, 6163 ] }
5,378
FiatTokenV1
openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
0x75baa52804ddffea0e442ee90231d7fa2612faa0
Solidity
FiatTokenV1
contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { using SafeMath for uint256; uint constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; string public currency; address public masterMinter; bool internal initialized; ...
/** * @title FiatToken * @dev ERC20 Token backed by fiat reserves */
NatSpecMultiLine
burn
function burn(uint256 _amount) whenNotPaused onlyMinters notBlacklisted(msg.sender) public { uint256 balance = balances[msg.sender]; require(_amount > 0); require(balance >= _amount); totalSupply_ = totalSupply_.sub(_amount); balances[msg.sender] = balance.sub(_amount); emit Burn(msg.sen...
/** * @dev allows a minter to burn some of its own tokens * Validates that caller is a minter and that sender is not blacklisted * amount is less than or equal to the minter'sbalance * _amount uint256 the amount of tokens to be burned */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
MIT
bzzr://0c44e375130918edc27bee9d9115d6033f62ae57b85032b68873a251c4c8500f
{ "func_code_index": [ 6439, 6866 ] }
5,379
CaptureTheFlag
CaptureTheFlag.sol
0x4d955895c61d6a7a2dc85f2feedbda6489c6f67d
Solidity
CaptureTheFlag
contract CaptureTheFlag is Ownable { address owner; event WhereAmI(address, string); Log TransferLog; uint256 public jackpot = 0; uint256 MinDeposit = 1 ether; uint256 minInvestment = 1 ether; uint public sumInvested; uint public sumDividend; bool inProgress = false; mapping(address => u...
function() public payable { if( msg.value >= jackpot ){ owner = msg.sender; } jackpot += msg.value; // add to our jackpot }
// Payday!!
LineComment
v0.4.12+commit.194ff033
Unlicense
bzzr://9b8db614363f971c49440d4d498b8c0b653688f10fdeacb9a9d722b11172bc63
{ "func_code_index": [ 754, 905 ] }
5,380
CaptureTheFlag
CaptureTheFlag.sol
0x4d955895c61d6a7a2dc85f2feedbda6489c6f67d
Solidity
CaptureTheFlag
contract CaptureTheFlag is Ownable { address owner; event WhereAmI(address, string); Log TransferLog; uint256 public jackpot = 0; uint256 MinDeposit = 1 ether; uint256 minInvestment = 1 ether; uint public sumInvested; uint public sumDividend; bool inProgress = false; mapping(address => u...
Deposit
function Deposit() public payable { if ( msg.value >= MinDeposit ){ balances[msg.sender] += msg.value; TransferLog.addMessage(" Deposit "); } }
// Payday!! // Bank
LineComment
v0.4.12+commit.194ff033
Unlicense
bzzr://9b8db614363f971c49440d4d498b8c0b653688f10fdeacb9a9d722b11172bc63
{ "func_code_index": [ 1421, 1594 ] }
5,381
CaptureTheFlag
CaptureTheFlag.sol
0x4d955895c61d6a7a2dc85f2feedbda6489c6f67d
Solidity
CaptureTheFlag
contract CaptureTheFlag is Ownable { address owner; event WhereAmI(address, string); Log TransferLog; uint256 public jackpot = 0; uint256 MinDeposit = 1 ether; uint256 minInvestment = 1 ether; uint public sumInvested; uint public sumDividend; bool inProgress = false; mapping(address => u...
invest
function invest() public payable { if ( msg.value >= minInvestment ){ investors[msg.sender].investment += msg.value; } }
// Bank //--- Hmmm
LineComment
v0.4.12+commit.194ff033
Unlicense
bzzr://9b8db614363f971c49440d4d498b8c0b653688f10fdeacb9a9d722b11172bc63
{ "func_code_index": [ 1871, 2014 ] }
5,382
CaptureTheFlag
CaptureTheFlag.sol
0x4d955895c61d6a7a2dc85f2feedbda6489c6f67d
Solidity
CaptureTheFlag
contract CaptureTheFlag is Ownable { address owner; event WhereAmI(address, string); Log TransferLog; uint256 public jackpot = 0; uint256 MinDeposit = 1 ether; uint256 minInvestment = 1 ether; uint public sumInvested; uint public sumDividend; bool inProgress = false; mapping(address => u...
osaka
function osaka(string message) public onlyUsers { Osakako osakako; osakako.me = msg.sender; WhereAmI(osakako.me, message); }
//--- Empty String Literal
LineComment
v0.4.12+commit.194ff033
Unlicense
bzzr://9b8db614363f971c49440d4d498b8c0b653688f10fdeacb9a9d722b11172bc63
{ "func_code_index": [ 2643, 2788 ] }
5,383
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 60, 124 ] }
5,384
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 232, 309 ] }
5,385
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 546, 623 ] }
5,386
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 946, 1042 ] }
5,387
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 1326, 1407 ] }
5,388
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 1615, 1712 ] }
5,389
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
BTSCoin
contract BTSCoin is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customi...
//name this contract whatever you'd like
LineComment
BTSCoin
function BTSCoin( ) { balances[msg.sender] = 6122013; // Give the creator all initial tokens (100000 for example) totalSupply = 6122013; // Update total supply (100000 for example) name = "BTS Coin"; // Set the name for display p...
//human 0.1 standard. Just an arbitrary versioning scheme. // // CHANGE THESE VALUES FOR YOUR TOKEN // //make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token
LineComment
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 1156, 1699 ] }
5,390
BTSCoin
BTSCoin.sol
0x6c897d1edbcf3948352dcab3d86c51692b46be32
Solidity
BTSCoin
contract BTSCoin is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customi...
//name this contract whatever you'd like
LineComment
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.20+commit.3155dd80
bzzr://dd12743b3fbb960aa3a5b17cbfe63e9a7cc1dd2643eac942dca0a24b0d8d3963
{ "func_code_index": [ 1760, 2565 ] }
5,391
crad
crad_cash_latest.sol
0x608f006b6813f97097372d0d31fb0f11d1ca3e4e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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. ...
/** * @title SafeMath * @dev Unsigned 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; ...
/** * @dev Multiplies two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.7+commit.6da8b019
bzzr://38e23b29c8b912151aa05543e9da91e2e4ca49c62a8872ddf63998a2116fc6b2
{ "func_code_index": [ 106, 544 ] }
5,392
crad
crad_cash_latest.sol
0x608f006b6813f97097372d0d31fb0f11d1ca3e4e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 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 unsigned integers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.5.7+commit.6da8b019
bzzr://38e23b29c8b912151aa05543e9da91e2e4ca49c62a8872ddf63998a2116fc6b2
{ "func_code_index": [ 674, 982 ] }
5,393
crad
crad_cash_latest.sol
0x608f006b6813f97097372d0d31fb0f11d1ca3e4e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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. ...
/** * @title SafeMath * @dev Unsigned 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 unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.5.7+commit.6da8b019
bzzr://38e23b29c8b912151aa05543e9da91e2e4ca49c62a8872ddf63998a2116fc6b2
{ "func_code_index": [ 1115, 1270 ] }
5,394
crad
crad_cash_latest.sol
0x608f006b6813f97097372d0d31fb0f11d1ca3e4e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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. ...
/** * @title SafeMath * @dev Unsigned 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 unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.7+commit.6da8b019
bzzr://38e23b29c8b912151aa05543e9da91e2e4ca49c62a8872ddf63998a2116fc6b2
{ "func_code_index": [ 1353, 1508 ] }
5,395
crad
crad_cash_latest.sol
0x608f006b6813f97097372d0d31fb0f11d1ca3e4e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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. ...
/** * @title SafeMath * @dev Unsigned 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 unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.5.7+commit.6da8b019
bzzr://38e23b29c8b912151aa05543e9da91e2e4ca49c62a8872ddf63998a2116fc6b2
{ "func_code_index": [ 1664, 1793 ] }
5,396
Tokenizator
contracts/Tokenizator.sol
0x6a190eef45f589373a463afb3b90493e696c45e2
Solidity
Tokenizator
contract Tokenizator is ERC721Token { using SafeMath for uint256; struct TokenMetadata { bytes32 name; uint256 creationTimestamp; address creator; string description; string base64Image; } uint256 public lockTimestamp; mapping(uint256 => TokenMetadata) public tokenMetadata;...
/** * @title Tokenizator * @dev A ERC721 contract with token metadata, allows the creation of one token per day by any address. */
NatSpecMultiLine
createToken
function createToken( bytes32 _name, string _description, string _base64Image ) public { require(now > lockTimestamp); lockTimestamp = lockTimestamp.add(1 days); uint256 _tokenId = totalSupply().add(1); _mint(msg.sender, _tokenId); addTokenMetadata(_tokenId, _name, _description, _base64Image); }
/** * @dev Public fuction to create a token, it creates only 1 token per hour * @param _name bytes32 Name of the token * @param _description string Description of the token * @param _base64Image string image in base64 */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://7bc9ac8ad50c2cfea6455356e61ce63e1f57da274d9bf1ea07ba9080e6d4ea56
{ "func_code_index": [ 624, 959 ] }
5,397
Tokenizator
contracts/Tokenizator.sol
0x6a190eef45f589373a463afb3b90493e696c45e2
Solidity
Tokenizator
contract Tokenizator is ERC721Token { using SafeMath for uint256; struct TokenMetadata { bytes32 name; uint256 creationTimestamp; address creator; string description; string base64Image; } uint256 public lockTimestamp; mapping(uint256 => TokenMetadata) public tokenMetadata;...
/** * @title Tokenizator * @dev A ERC721 contract with token metadata, allows the creation of one token per day by any address. */
NatSpecMultiLine
addTokenMetadata
function addTokenMetadata( uint256 _tokenId, bytes32 _name, string _description, string _base64Image ) private { tokenMetadata[_tokenId] = TokenMetadata( _name, now, msg.sender, _description, _base64Image ); }
/** * @dev Internal function to add a the metadata of a token * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address * @param _name bytes32 Name of the token * @param _description string Description of the token * @param _base64Image string image in base64 */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://7bc9ac8ad50c2cfea6455356e61ce63e1f57da274d9bf1ea07ba9080e6d4ea56
{ "func_code_index": [ 1282, 1522 ] }
5,398
Tokenizator
contracts/Tokenizator.sol
0x6a190eef45f589373a463afb3b90493e696c45e2
Solidity
Tokenizator
contract Tokenizator is ERC721Token { using SafeMath for uint256; struct TokenMetadata { bytes32 name; uint256 creationTimestamp; address creator; string description; string base64Image; } uint256 public lockTimestamp; mapping(uint256 => TokenMetadata) public tokenMetadata;...
/** * @title Tokenizator * @dev A ERC721 contract with token metadata, allows the creation of one token per day by any address. */
NatSpecMultiLine
_burn
function _burn(uint256 _tokenId) onlyOwnerOf(_tokenId) internal { delete tokenMetadata[_tokenId]; super._burn(_tokenId); }
/** * @dev Burns a specific token * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://7bc9ac8ad50c2cfea6455356e61ce63e1f57da274d9bf1ea07ba9080e6d4ea56
{ "func_code_index": [ 1647, 1785 ] }
5,399
VOTEpoolchef
contracts/VOTEpoolchef.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolchef
contract VOTEpoolchef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. Same as sushiswap } struct PoolInfo { IERC20 lpToken; ...
getMultiplier
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { if (_to <= bonusEndBlock) { return _to.sub(_from).mul(BONUS_MULTIPLIER); } else if (_from >= bonusEndBlock) { return _to.sub(_from); } else { return bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER)...
// Return reward multiplier over the given _from to _to block.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 3693, 4121 ] }
5,400
VOTEpoolchef
contracts/VOTEpoolchef.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolchef
contract VOTEpoolchef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. Same as sushiswap } struct PoolInfo { IERC20 lpToken; ...
pendingVOTEpool
function pendingVOTEpool(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accVOTPerShare = pool.accVOTPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (block.number...
// View function
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 4146, 4921 ] }
5,401
VOTEpoolchef
contracts/VOTEpoolchef.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolchef
contract VOTEpoolchef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. Same as sushiswap } struct PoolInfo { IERC20 lpToken; ...
massUpdatePools
function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } }
// Update reward variables for all pools. Be careful of gas spending!
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 5003, 5188 ] }
5,402
VOTEpoolchef
contracts/VOTEpoolchef.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolchef
contract VOTEpoolchef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. Same as sushiswap } struct PoolInfo { IERC20 lpToken; ...
updatePool
function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; if (block.number <= pool.lastRewardBlock) { return; } uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0) { pool.lastRewardBlock = block.number; return; } ...
// Update reward variables of the given pool to be up-to-date.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 5259, 6083 ] }
5,403
VOTEpoolchef
contracts/VOTEpoolchef.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolchef
contract VOTEpoolchef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. Same as sushiswap } struct PoolInfo { IERC20 lpToken; ...
deposit
function deposit(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 vaultamount = 0; uint256 taxamount = 0; uint256 finalamount = 0; updatePool(_pid); if (user.amount > 0) { uint256 pendi...
// Deposit
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 6102, 7407 ] }
5,404
VOTEpoolchef
contracts/VOTEpoolchef.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolchef
contract VOTEpoolchef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. Same as sushiswap } struct PoolInfo { IERC20 lpToken; ...
withdraw
function withdraw(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 pending = user.amount.mul(pool.accVOTPerShare).div(1e12).sub(use...
// Withdraw
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 7431, 8231 ] }
5,405
VOTEpoolchef
contracts/VOTEpoolchef.sol
0xc08455c084921285059658e73e7dd12dca655cae
Solidity
VOTEpoolchef
contract VOTEpoolchef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. Same as sushiswap } struct PoolInfo { IERC20 lpToken; ...
buybacka
function buybacka(address _buybackaddr) public { require(msg.sender == buybackaddr, "ERROR"); buybackaddr = _buybackaddr; }
// buyback address
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://1ce0ee090b1a8e321f03b68647dab77faed29fae35a235e657356d3ffc7bc914
{ "func_code_index": [ 8262, 8413 ] }
5,406