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
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); // internal owner _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { ...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 12634, 13184 ] }
58,261
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_transfer
function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); //...
/** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 13516, 14120 ] }
58,262
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_setTokenURI
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; }
/** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 14271, 14491 ] }
58,263
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_setBaseURI
function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; }
/** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 14716, 14821 ] }
58,264
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (!to.isContract()) { return true; } bytes memory returndata = to.functionCall(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, ...
/** * @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.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 15381, 15990 ] }
58,265
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner }
/** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 16104, 16301 ] }
58,266
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 16909, 17007 ] }
58,267
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender =...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 506, 598 ] }
58,268
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender =...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 1157, 1310 ] }
58,269
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender =...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 1460, 1709 ] }
58,270
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 94, 154 ] }
58,271
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 237, 310 ] }
58,272
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indimightygojiraing whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 543, 625 ] }
58,273
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 904, 992 ] }
58,274
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indimightygojiraing whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unf...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 1665, 1744 ] }
58,275
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indimightygojiraing whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 2066, 2168 ] }
58,276
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 902, 990 ] }
58,277
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 1104, 1196 ] }
58,278
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 1829, 1917 ] }
58,279
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 1977, 2082 ] }
58,280
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 2140, 2264 ] }
58,281
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 2472, 2652 ] }
58,282
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 2710, 2866 ] }
58,283
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 3008, 3182 ] }
58,284
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indimightygojiraing the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at le...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 3660, 3986 ] }
58,285
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indimightygojiraing the updated allowance. * * Requirements: * * - `s...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 4399, 4622 ] }
58,286
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indimightygojiraing the updated allowance. * * Requirements: * * - `s...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 5129, 5403 ] }
58,287
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 5888, 6432 ] }
58,288
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 6708, 7091 ] }
58,289
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 7418, 7841 ] }
58,290
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 8274, 8625 ] }
58,291
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applimightygojiraions that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 8961, 9056 ] }
58,292
mightygojirascontract
@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol
0x9cc103edf0a60e07dd7a6fd4a16fd2cbf7981d92
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://93fbf3ab6f1da163317b7b28fa738cb098bf07cbb4f7cbca91e163cb6a9cb11a
{ "func_code_index": [ 9654, 9751 ] }
58,293
TinlakeSpell
TinlakeSpell.sol
0x129bd9f30a2d880090d5928c7c70932f86e70e6f
Solidity
TinlakeSpell
contract TinlakeSpell { // { // "DEPLOYMENT_NAME": "NewSilver 2 mainnet deployment", // "ROOT_CONTRACT": "0x53b2d22d07E069a3b132BfeaaD275b10273d381E", // "TINLAKE_CURRENCY": "0x6b175474e89094c44da98b954eedeac495271d0f", // "BORROWER_DEPLOYER": "0x9137BFdbB43BDf83DB5B8e691B5D2ceBE6475392", // "TITLE_FA...
// spell for: ns2 tranche migration
LineComment
cast
function cast() public { require(!done, "spell-already-cast"); done = true; execute(); }
// permissions to be set
LineComment
v0.5.15+commit.6a57276f
Unknown
bzzr://18dae78835aa7dfec024bdfb78040f31b174bb13681c462843146ed6cd78a0ac
{ "func_code_index": [ 4656, 4781 ] }
58,294
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseTokenURI; }
// fetch the api endpoint
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 1046, 1164 ] }
58,295
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
setBaseURI
function setBaseURI(string memory baseURI) public onlyOwner { baseTokenURI = baseURI; }
// set the api endpoint, useful if the endpoint needs to be changed to a different location
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 1266, 1372 ] }
58,296
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
setPrice
function setPrice(uint256 _newPrice) public onlyOwner { price = _newPrice; }
// let the owner of the contract change the price of the LMC token, set amount in WEI!!!!
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 1472, 1567 ] }
58,297
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
withdrawAll
function withdrawAll() public payable onlyOwner { //require(payable(msg.sender).send(address(this).balance)); uint256 _each = address(this).balance / 4; require(payable(a1).send(_each)); require(payable(a2).send(_each)); require(payable(a3).send(_each)); require(payable(a4).send(_each)); ...
// withdraw the funds of the contract to the owner of the smart contract
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 1650, 2004 ] }
58,298
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
pause
function pause(bool val) public onlyOwner { salePaused = val; }
// pause or start the sale
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 2041, 2123 ] }
58,299
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
walletOfOwner
function walletOfOwner(address _owner) public view returns(uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokenIDs = new uint256[](tokenCount); for(uint256 i; i < tokenCount; i++) { tokenIDs[i] = tokenOfOwnerByIndex(_owner, i); } return tokenIDs; }
// view the tokens of the holder, if the owner does not hold any tokens, return an empty array
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 2228, 2576 ] }
58,300
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
mintLMC
function mintLMC(uint256 amountOfTokens) public payable { require(!salePaused, "Sale paused"); require(amountOfTokens > 0 && amountOfTokens < 21, "Minimum mint is 1 and max are 20 LMCs at a time"); require(msg.value == price * amountOfTokens, ...
// mint los muertos, max. 20
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 2615, 3259 ] }
58,301
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
setProvenanceHash
function setProvenanceHash(string memory provenanceHash) public onlyOwner { LMC_PROVENANCE = provenanceHash; }
// set the provenance hash
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 3296, 3425 ] }
58,302
LosMuertosClub
LosMuertosClub.sol
0x401253bd4333014c73d81a308166ade05d954c2f
Solidity
LosMuertosClub
contract LosMuertosClub is ERC721Enumerable, Ownable { string baseTokenURI; uint256 public price = 0.02 ether; bool public salePaused = true; uint256 public reserved = 26; // Team gets 4 LMC (minted in constructor), 26 are used for giveaways and other competitions uint256 public constant MAX_LM...
reserveLMC
function reserveLMC(address to, uint256 amount) public onlyOwner { require(amount > 0 && amount <= reserved, "Requested LMC amount exceeds reserve"); uint256 supply = totalSupply(); for (uint256 i; i < amount; i++) { _safeMint(to, supply + i); } reserved -= amount; ...
// reserve LMCs for giveaways
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://cc478c31312dda3db4f8b77056a6c0f698cdea79f290ae53ec97d2ef0ffcb317
{ "func_code_index": [ 3465, 3820 ] }
58,303
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) p...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 270, 516 ] }
58,304
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) p...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 722, 838 ] }
58,305
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @pa...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_to] = balances[_to].a...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 383, 893 ] }
58,306
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @pa...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethere...
/** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 1124, 1679 ] }
58,307
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @pa...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 1997, 2142 ] }
58,308
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onl...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 166, 226 ] }
58,309
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onl...
/** * @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 { 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.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 540, 672 ] }
58,310
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that ...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 480, 710 ] }
58,311
DbiCapitalToken
DbiCapitalToken.sol
0x6e5c02cf6fa4770a8c91d19cf58d24bd24bcc6b8
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that ...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() public onlyOwner returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.20-nightly.2018.1.6+commit.2548228b
bzzr://0072e4a12713420877533462089c6f82e4381491f119877b6a795c9463895c11
{ "func_code_index": [ 824, 958 ] }
58,312
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
setAuthenticationPeriod
function setAuthenticationPeriod(uint256 period) public onlyOwner whenNotPaused { authenticationPeriod = period; }
/* @dev Sets a new value for authenticationPeriod. * Can only be called by Identity Administrators. * @param period new value for authenticationPeriod */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1156, 1289 ] }
58,313
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
authenticate
function authenticate(address account) public onlyRegistered onlyIdentityAdmin whenNotPaused { dateAuthenticated[account] = now; }
/* @dev Sets the authentication date of `account` * to the current time. * Can only be called by Identity Administrators. * @param account address to change its auth date */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1495, 1685 ] }
58,314
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
addWhitelisted
function addWhitelisted(address account) public onlyRegistered onlyIdentityAdmin whenNotPaused { _addWhitelisted(account); }
/* @dev Adds an address as whitelisted. * Can only be called by Identity Administrators. * @param account address to add as whitelisted */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1850, 2034 ] }
58,315
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
addWhitelistedWithDID
function addWhitelistedWithDID(address account, string memory did) public onlyRegistered onlyIdentityAdmin whenNotPaused { _addWhitelistedWithDID(account, did); }
/* @dev Adds an address as whitelisted under a specific ID * @param account The address to add * @param did the ID to add account under */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 2199, 2421 ] }
58,316
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
removeWhitelisted
function removeWhitelisted(address account) public onlyRegistered onlyIdentityAdmin whenNotPaused { _removeWhitelisted(account); }
/* @dev Removes an address as whitelisted. * Can only be called by Identity Administrators. * @param account address to remove as whitelisted */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 2592, 2782 ] }
58,317
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
renounceWhitelisted
function renounceWhitelisted() public whenNotPaused { _removeWhitelisted(msg.sender); }
/* @dev Renounces message sender from whitelisted */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 2849, 2955 ] }
58,318
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
isWhitelisted
function isWhitelisted(address account) public view returns (bool) { uint256 daysSinceAuthentication = (now.sub(dateAuthenticated[account])) / 1 days; return (daysSinceAuthentication <= authenticationPeriod) && whitelist.has(account); }
/* @dev Returns true if given address has been added to whitelist * @param account the address to check * @return a bool indicating weather the address is present in whitelist */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 3160, 3437 ] }
58,319
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
lastAuthenticated
function lastAuthenticated(address account) public view returns (uint256) { return dateAuthenticated[account]; }
/* @dev Function that gives the date the given user was added * @param account The address to check * @return The date the address was added */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 3607, 3738 ] }
58,320
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
addBlacklisted
function addBlacklisted(address account) public onlyRegistered onlyIdentityAdmin whenNotPaused { blacklist.add(account); emit BlacklistAdded(account); }
/* @dev Adds an address to blacklist. * Can only be called by Identity Administrators. * @param account address to add as blacklisted */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 5052, 5273 ] }
58,321
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
removeBlacklisted
function removeBlacklisted(address account) public onlyRegistered onlyIdentityAdmin whenNotPaused { blacklist.remove(account); emit BlacklistRemoved(account); }
/* @dev Removes an address from blacklist * Can only be called by Identity Administrators. * @param account address to remove as blacklisted */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 5443, 5672 ] }
58,322
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
addContract
function addContract(address account) public onlyRegistered onlyIdentityAdmin whenNotPaused { require(isContract(account), "Given address is not a contract"); contracts.add(account); _addWhitelisted(account); emit ContractAdded(account); }
/* @dev Function to add a Contract to list of contracts * @param account The address to add */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 5787, 6115 ] }
58,323
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
removeContract
function removeContract(address account) public onlyRegistered onlyIdentityAdmin whenNotPaused { contracts.remove(account); _removeWhitelisted(account); emit ContractRemoved(account); }
/* @dev Function to remove a Contract from list of contracts * @param account The address to add */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 6235, 6500 ] }
58,324
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
isDAOContract
function isDAOContract(address account) public view returns (bool) { return contracts.has(account); }
/* @dev Function to check if given contract is on list of contracts. * @param address to check * @return a bool indicating if address is on list of contracts */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 6687, 6807 ] }
58,325
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
_addWhitelisted
function _addWhitelisted(address account) internal { whitelist.add(account); whitelistedCount += 1; dateAdded[account] = now; dateAuthenticated[account] = now; if (isContract(account)) { whitelistedContracts += 1; } emit WhitelistedAdded(account); }
/* @dev Internal function to add to whitelisted * @param account the address to add */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 6914, 7255 ] }
58,326
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
_addWhitelistedWithDID
function _addWhitelistedWithDID(address account, string memory did) internal { bytes32 pHash = keccak256(bytes(did)); require(didHashToAddress[pHash] == address(0), "DID already registered"); addrToDID[account] = did; didHashToAddress[pHash] = account; _addWhitelisted(account); }
/* @dev Internal whitelisting with did function. * @param account the address to add * @param did the id to register account under */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 7415, 7754 ] }
58,327
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
_removeWhitelisted
function _removeWhitelisted(address account) internal { whitelist.remove(account); whitelistedCount -= 1; delete dateAuthenticated[account]; if (isContract(account)) { whitelistedContracts -= 1; } string memory did = addrToDID[account]; bytes32 pHash = keccak256(bytes(d...
/* @dev Internal function to remove from whitelisted * @param account the address to add */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 7866, 8403 ] }
58,328
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
isBlacklisted
function isBlacklisted(address account) public view returns (bool) { return blacklist.has(account); }
/* @dev Returns true if given address has been added to the blacklist * @param account the address to check * @return a bool indicating weather the address is present in the blacklist */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 8616, 8736 ] }
58,329
GoodDollar
contracts/identity/Identity.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
Identity
contract Identity is IdentityAdminRole, SchemeGuard, Pausable { using Roles for Roles.Role; using SafeMath for uint256; Roles.Role private blacklist; Roles.Role private whitelist; Roles.Role private contracts; uint256 public whitelistedCount = 0; uint256 public whitelistedContract...
/* @title Identity contract responsible for whitelisting * and keeping track of amount of whitelisted users */
Comment
isContract
function isContract(address _addr) internal view returns (bool) { uint256 length; assembly { length := extcodesize(_addr) } return length > 0; }
/* @dev Function to see if given address is a contract * @return true if address is a contract */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 8854, 9057 ] }
58,330
Urn
contracts/Urn.sol
0xe4520f883c7760bfb35071463346c5eafbb25622
Solidity
Urn
contract Urn is ERC20("URN", "URN"), ERC20Permit("URN"), ERC20Burnable, ReentrancyGuard, Ownable(5, true, true) { /// Track controller contracts and their permissions mapping(address => bool) private _controllers; /// Authorises known addresses to mint URN tokens. /// @param contractAddress The address...
/// @title Graveyard NFT Project's URN Token /// @author @0xyamyam /// @notice URN tokens have no specified utility or value, who knows what the future holds. /// URN tokens are minted when you commit failed NFT project tokens to the Graveyard (more if you own a CRYPT).
NatSpecSingleLine
setController
function setController(address contractAddress, bool canMint) external onlyOwner { require(Address.isContract(contractAddress), "Only contracts can be added as controllers"); _controllers[contractAddress] = canMint; }
/// Authorises known addresses to mint URN tokens. /// @param contractAddress The address to associate permissions /// @param canMint Is the address allowed to mint URN
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 404, 645 ] }
58,331
Urn
contracts/Urn.sol
0xe4520f883c7760bfb35071463346c5eafbb25622
Solidity
Urn
contract Urn is ERC20("URN", "URN"), ERC20Permit("URN"), ERC20Burnable, ReentrancyGuard, Ownable(5, true, true) { /// Track controller contracts and their permissions mapping(address => bool) private _controllers; /// Authorises known addresses to mint URN tokens. /// @param contractAddress The address...
/// @title Graveyard NFT Project's URN Token /// @author @0xyamyam /// @notice URN tokens have no specified utility or value, who knows what the future holds. /// URN tokens are minted when you commit failed NFT project tokens to the Graveyard (more if you own a CRYPT).
NatSpecSingleLine
mint
function mint(address to, uint256 amount) external nonReentrant { require(_controllers[_msgSender()] == true, "Only controllers with mint permissions can mint URN"); _mint(to, amount); }
/// Mint URN Tokens from controllers /// @param to The address to mint tokens for /// @param amount The amount of tokens to mint
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 788, 998 ] }
58,332
LinkPriceOracle
LinkPriceOracle.sol
0x24391869e7d7ae4a410d613c17396b6ece227f54
Solidity
LinkPriceOracle
contract LinkPriceOracle is Ownable { mapping(address => ILinkOracle) public linkOracles; mapping(address => uint) private tokenPrices; event AddLinkOracle(address indexed token, address oracle); event RemoveLinkOracle(address indexed token); event PriceUpdate(address indexed token, uint amount); ...
tokenPrice
function tokenPrice(address _token) external view returns(uint) { if (address(linkOracles[_token]) != address(0)) { uint latestAnswer = linkOracles[_token].latestAnswer(); require(latestAnswer > 1, "LinkPriceOracle: invalid oracle value"); return latestAnswer * 1e10; } else if (tokenPrices[_t...
// _token price in USD with 18 decimals
LineComment
v0.8.6+commit.11564f7e
None
ipfs://3d69d6d990cf279579f884901a02dd8a7964a3d289072ea13bc38adff7491e96
{ "func_code_index": [ 962, 1426 ] }
58,333
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
IERC165
contract IERC165 { /** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(by...
/** * @title IERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 287, 368 ] }
58,334
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
IERC721Receiver
contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be ...
/** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */
NatSpecMultiLine
onERC721Received
function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4);
/** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Receive...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 893, 1016 ] }
58,335
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
ERC165
contract ERC165 is IERC165 { bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private...
/** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; }
/** * @dev implement supportsInterface(bytes4) using a lookup table */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 639, 779 ] }
58,336
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
ERC165
contract ERC165 is IERC165 { bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private...
/** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */
NatSpecMultiLine
_registerInterface
function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff); _supportedInterfaces[interfaceId] = true; }
/** * @dev internal method for registering an interface */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 858, 1024 ] }
58,337
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
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.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 457, 541 ] }
58,338
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
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.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 792, 889 ] }
58,339
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
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
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 1170, 1315 ] }
58,340
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
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.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 1487, 1601 ] }
58,341
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
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.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 1746, 1938 ] }
58,342
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 259, 445 ] }
58,343
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 723, 864 ] }
58,344
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 1162, 1359 ] }
58,345
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
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-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 1613, 2089 ] }
58,346
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 2560, 2697 ] }
58,347
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 3188, 3471 ] }
58,348
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 3931, 4066 ] }
58,349
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 4546, 4717 ] }
58,350
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Address
library Address { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check ...
/** * Utility library of inline functions on addresses */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more deta...
/** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a ...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 382, 1022 ] }
58,351
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
mintUnicorn
function mintUnicorn() external { uint256 id; require(UNICORN_TOTAL_SUPPLY < 100, "Unicorns are now extinct"); quire(!unicornClaimed[msg.sender], "You have already claimed a unicorn"); require(UNI_ADDRESS.balanceOf(msg.sender) >= 1000 * 10**18, "Min balance 1000 UNI"); require(_temp...
// Get the Unicorn's head item
LineComment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 4320, 5088 ] }
58,352
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getIndividualCount
function getIndividualCount( uint256 _templateId ) public view returns(uint256) { uint counter = 0; for (uint i = 0; i < allItems.length; i++) { // If match found & is not burned if (allItems[i].templateId == _templateId && !allItems[i].burned) { ...
// The total supply of any one item // Ask for example how many of "Torch" item exist
LineComment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 6203, 6710 ] }
58,353
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getIndividualOwnedCount
function getIndividualOwnedCount( uint256 _templateId, address _owner ) public view returns(uint256) { uint counter = 0; uint[] memory ownedItems = getItemsByOwner(_owner); for(uint i = 0; i < ownedItems.length; i++) { /* If ownedItems[i]'s te...
// Total supply of any one item owned by _owner // Ask for example how many of "Torch" item does the _owner have
LineComment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 6841, 7474 ] }
58,354
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getIndividualCountByID
function getIndividualCountByID( uint256 _tokenId ) public view tokenExists(_tokenId) returns(uint256) { uint256 counter = 0; uint256 templateId = allItems[_tokenId].templateId; // templateId we are looking for for(uint i = 0; i < allItems.length; i++) { if(...
// Given a _tokenId returns how many other tokens exist with // the same _templateId
LineComment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 7577, 8104 ] }
58,355
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getIndividualOwnedCountByID
function getIndividualOwnedCountByID( uint256 _tokenId, address _owner ) public view tokenExists(_tokenId) returns(uint256) { uint256 counter = 0; uint256 templateId = allItems[_tokenId].templateId; // templateId we are looking for uint[] memory ownedItems = getItemsByOw...
// Given a _tokenId returns how many other tokens the _owner has // with the same _templateId
LineComment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 8216, 8922 ] }
58,356
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getTemplateCountsByTokenIDs
function getTemplateCountsByTokenIDs( uint[] memory _tokenIds ) public view returns(uint[] memory) { uint[] memory counts = new uint[](_tokenIds.length); for(uint i = 0; i < _tokenIds.length; i++) { counts[i] = getIndividualCountByID(_tokenIds[i]); } ...
/* Given an array of _tokenIds return the corresponding _templateId count for each of those _tokenIds */
Comment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 9050, 9442 ] }
58,357
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getTemplateCountsByTokenIDsOfOwner
function getTemplateCountsByTokenIDsOfOwner( uint[] memory _tokenIds, address _owner ) public view returns(uint[] memory) { uint[] memory counts = new uint[](_tokenIds.length); for(uint i = 0; i < _tokenIds.length; i++) { counts[i] = getIndividualOwnedCountByID(_...
/* Given an array of _tokenIds return the corresponding _templateId count for each of those _tokenIds that the _owner owns */
Comment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 9591, 10029 ] }
58,358
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getTemplateIDsByTokenIDs
function getTemplateIDsByTokenIDs( uint[] memory _tokenIds ) public view returns(uint[] memory) { uint[] memory templateIds = new uint[](_tokenIds.length); for(uint i = 0; i < _tokenIds.length; i++) { templateIds[i] = allItems[_tokenIds[i]].templateId; } ...
/* Given an array of _tokenIds return the corresponding _templateIds for each of those _tokenIds Useful for cross referencing / weeding out duplicates to populate the UI */
Comment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 10245, 10646 ] }
58,359
Inventory
Inventory.sol
0x9680223f7069203e361f55fefc89b7c1a952cdcc
Solidity
Inventory
contract Inventory is ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using SafeMath for uint256; using Address for address; string private _name; string private _symbol; string private _pathStart; string private _pathEnd; bytes4 private constant InterfaceId_ERC72...
getItemsByOwner
function getItemsByOwner( address _owner ) public view returns(uint[] memory) { uint[] memory result = new uint[](_ownedTokensCount[_owner]); uint counter = 0; for (uint i = 0; i < allItems.length; i++) { // If owner is _owner and token is not burned ...
// Get all the item id's by owner
LineComment
v0.5.17+commit.d19bba13
None
bzzr://3d6f0cf075dd3e4b74e4524d3514f301990ef7f34c54193bd247324d93b04317
{ "func_code_index": [ 10689, 11302 ] }
58,360