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
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 94, 154 ] }
59,361
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 237, 310 ] }
59,362
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
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 indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 534, 634 ] }
59,363
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 913, 1028 ] }
59,364
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
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 indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 1692, 1771 ] }
59,365
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
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 indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 2084, 2220 ] }
59,366
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 100, 159 ] }
59,367
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 226, 287 ] }
59,368
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the decimals places of the token. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 363, 418 ] }
59,369
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 virtual override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 776, 881 ] }
59,370
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 virtual override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 995, 1104 ] }
59,371
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 virtual override returns (uint8) { return 18; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 1738, 1836 ] }
59,372
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 1896, 2009 ] }
59,373
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 2067, 2249 ] }
59,374
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 2457, 2678 ] }
59,375
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 2736, 2942 ] }
59,376
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 3084, 3299 ] }
59,377
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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); uint256 currentAllowance = _allowances[sender][_msgSender()]; require( currentAllowance >= amount, "ERC20: transfer...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 3776, 4310 ] }
59,378
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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] + addedValue ); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 4714, 5016 ] }
59,379
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require( currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero" ); unchecked { ...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 5514, 6001 ] }
59,380
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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); ...
/** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 6486, 7261 ] }
59,381
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 7543, 7947 ] }
59,382
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 8275, 8871 ] }
59,383
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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(own...
/** * @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.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 9304, 9689 ] }
59,384
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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 transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - wh...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 10284, 10414 ] }
59,385
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @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
_afterTokenTransfer
function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 11013, 11142 ] }
59,386
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
/** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 374, 455 ] }
59,387
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
ERC165
abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interface...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 103, 265 ] }
59,388
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) external view returns (uint256 balance);
/** * @dev Returns the number of tokens in ``owner``'s account. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 719, 798 ] }
59,389
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) external view returns (address owner);
/** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 944, 1021 ] }
59,390
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token mus...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 1733, 1850 ] }
59,391
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) external;
/** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If th...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 2376, 2489 ] }
59,392
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) external;
/** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 2962, 3022 ] }
59,393
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) external view returns (address operator);
/** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 3176, 3260 ] }
59,394
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool _approved) external;
/** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 3587, 3662 ] }
59,395
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) external view returns (bool);
/** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 3813, 3906 ] }
59,396
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {appro...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 4483, 4630 ] }
59,397
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the total amount of tokens stored by the contract. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 132, 192 ] }
59,398
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 375, 506 ] }
59,399
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
IERC721Enumerable
interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanc...
/** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) external view returns (uint256);
/** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 682, 756 ] }
59,400
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
claimById
function claimById(uint256 tokenId) external { // Follow the Checks-Effects-Interactions pattern to prevent reentrancy // attacks // Checks // Check that the msgSender owns the token that is being claimed require( _msgSender() == firstContract.ownerOf(tokenId), "MUST_OWN_T...
/// @notice Claim First Gold for a given first ID /// @param tokenId The tokenId of the first NFT
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 1948, 2479 ] }
59,401
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
claimAllForOwner
function claimAllForOwner() external { uint256 tokenBalanceOwner = firstContract.balanceOf(_msgSender()); // Checks require(tokenBalanceOwner > 0, "NO_TOKENS_OWNED"); // i < tokenBalanceOwner because tokenBalanceOwner is 1-indexed for (uint256 i = 0; i < tokenBalanceOwner; i++) { /...
/// @notice Claim First Gold for all tokens owned by the sender /// @notice This function will run out of gas if you have too much first! If /// this is a concern, you should use claimRangeForOwner and claim First /// Gold in batches.
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 2737, 3342 ] }
59,402
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
claimRangeForOwner
function claimRangeForOwner(uint256 ownerIndexStart, uint256 ownerIndexEnd) external { uint256 tokenBalanceOwner = firstContract.balanceOf(_msgSender()); // Checks require(tokenBalanceOwner > 0, "NO_TOKENS_OWNED"); // We use < for ownerIndexEnd and tokenBalanceOwner because // tokenOf...
/// @notice Claim First Gold for all tokens owned by the sender within a /// given range /// @notice This function is useful if you own too much first to claim all at /// once or if you want to leave some first unclaimed. If you leave first /// unclaimed, however, you cannot claim it once the next season starts.
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 3684, 4644 ] }
59,403
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
_claim
function _claim(uint256 tokenId, address tokenOwner) internal { // Checks // Check that the token ID is in range // We use >= and <= to here because all of the token IDs are 0-indexed require( tokenId >= tokenIdStart && tokenId <= tokenIdEnd, "TOKEN_ID_OUT_OF_RANGE" ); ...
/// @dev Internal function to mint first upon claiming
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 4707, 5611 ] }
59,404
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
daoMint
function daoMint(uint256 amountDisplayValue) external onlyOwner { _mint(owner(), amountDisplayValue * (10**decimals())); }
/// @notice Allows the DAO to mint new tokens for use within the first /// Ecosystem /// @param amountDisplayValue The amount of first to mint. This should be /// input as the display value, not in raw decimals. If you want to mint /// 100 first, you should enter "100" rather than the value of 100 * 10^18.
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 5947, 6088 ] }
59,405
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
daoSetfirstContractAddress
function daoSetfirstContractAddress(address firstContractAddress_) external onlyOwner { firstContractAddress = firstContractAddress_; firstContract = IERC721Enumerable(firstContractAddress); }
/// @notice Allows the DAO to set a new contract address for first. This is /// relevant in the event that first migrates to a new contract. /// @param firstContractAddress_ The new contract address for first
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 6315, 6558 ] }
59,406
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
daoSetTokenIdRange
function daoSetTokenIdRange(uint256 tokenIdStart_, uint256 tokenIdEnd_) external onlyOwner { tokenIdStart = tokenIdStart_; tokenIdEnd = tokenIdEnd_; }
/// @notice Allows the DAO to set the token IDs that are eligible to claim /// first /// @param tokenIdStart_ The start of the eligible token range /// @param tokenIdEnd_ The end of the eligible token range /// @dev This is relevant in case a future first contract has a different /// total supply of first
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 6898, 7099 ] }
59,407
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
daoSetSeason
function daoSetSeason(uint256 season_) public onlyOwner { season = season_; }
/// @notice Allows the DAO to set a season for new First Gold claims /// @param season_ The season to use for claiming first
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 7237, 7333 ] }
59,408
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
daoSetFirstGoldPerTokenId
function daoSetFirstGoldPerTokenId(uint256 FirstGoldDisplayValue) public onlyOwner { FirstGoldPerTokenId = FirstGoldDisplayValue * (10**decimals()); }
/// @notice Allows the DAO to set the amount of First Gold that is /// claimed per token ID /// @param FirstGoldDisplayValue The amount of first a user can claim. /// This should be input as the display value, not in raw decimals. If you /// want to mint 100 first, you should enter "100" rather than the value of /// 10...
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 7697, 7889 ] }
59,409
FirstGold
FirstGold.sol
0xac2ef2bbeb7a749fdf2c75f18b15a208bc44646c
Solidity
FirstGold
contract FirstGold is Context, Ownable, ERC20 { // first contract is available at https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7 address public firstContractAddress = 0xc9Cb0FEe73f060Db66D2693D92d75c825B1afdbF; IERC721Enumerable public firstContract; // Give out 1...
daoSetSeasonAndFirstGoldPerTokenID
function daoSetSeasonAndFirstGoldPerTokenID( uint256 season_, uint256 FirstGoldDisplayValue ) external onlyOwner { daoSetSeason(season_); daoSetFirstGoldPerTokenId(FirstGoldDisplayValue); }
/// @notice Allows the DAO to set the season and First Gold per token ID /// in one transaction. This ensures that there is not a gap where a user /// can claim more First Gold than others /// @param season_ The season to use for claiming first /// @param FirstGoldDisplayValue The amount of first a user can claim. /// ...
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
None
ipfs://d4bd291a99209ae227361d6d13639761ed029b72b8cad060e1da1b9a0998a706
{ "func_code_index": [ 8778, 9018 ] }
59,410
Phantom
contracts/phantom.sol
0x6d0683ed0f79411bd6bd1f5d517ede248ead34ad
Solidity
Phantom
contract Phantom is ERC721, Ownable { using Strings for uint256; uint256 public price = 0.09 ether; bool public revealed; string private _mysteryURI; uint256 public supply = 3333; bool public saleLive = false; uint256 public totalSupply; string private _contractURI; string pr...
// ,----, // ,-.----. ,--, ,--. ,/ .`| ,----.. ____ // \ / \ ,--.'| ,---, ,--.'| ,` .' : / / \ ,' , `. // | : \ ,--, | : ' .' \ ,--,: : | ; ...
LineComment
presaleMint
function presaleMint(uint256 tokenQuantity) external payable { require(price * tokenQuantity <= msg.value, "x price"); require(totalSupply + tokenQuantity <= supply, "x supply"); require(saleLive, "closed"); require(tokenQuantity <= 4, "exceed"); for (uint256 i = 0; i < tokenQuantity; i++) { ...
// for presale
LineComment
v0.8.6+commit.11564f7e
{ "func_code_index": [ 460, 911 ] }
59,411
Phantom
contracts/phantom.sol
0x6d0683ed0f79411bd6bd1f5d517ede248ead34ad
Solidity
Phantom
contract Phantom is ERC721, Ownable { using Strings for uint256; uint256 public price = 0.09 ether; bool public revealed; string private _mysteryURI; uint256 public supply = 3333; bool public saleLive = false; uint256 public totalSupply; string private _contractURI; string pr...
// ,----, // ,-.----. ,--, ,--. ,/ .`| ,----.. ____ // \ / \ ,--.'| ,---, ,--.'| ,` .' : / / \ ,' , `. // | : \ ,--, | : ' .' \ ,--,: : | ; ...
LineComment
mint
function mint(uint256 tokenQuantity) external payable { require(saleLive, "closed"); require(tokenQuantity <= 4, "exceed"); require(price * tokenQuantity <= msg.value, "x price"); require(totalSupply + tokenQuantity <= supply, "x supply"); for (uint256 i = 0; i < tokenQuantity; i++) { _s...
// main sale
LineComment
v0.8.6+commit.11564f7e
{ "func_code_index": [ 931, 1375 ] }
59,412
Phantom
contracts/phantom.sol
0x6d0683ed0f79411bd6bd1f5d517ede248ead34ad
Solidity
Phantom
contract Phantom is ERC721, Ownable { using Strings for uint256; uint256 public price = 0.09 ether; bool public revealed; string private _mysteryURI; uint256 public supply = 3333; bool public saleLive = false; uint256 public totalSupply; string private _contractURI; string pr...
// ,----, // ,-.----. ,--, ,--. ,/ .`| ,----.. ____ // \ / \ ,--.'| ,---, ,--.'| ,` .' : / / \ ,' , `. // | : \ ,--, | : ' .' \ ,--,: : | ; ...
LineComment
withdraw
function withdraw() external { uint256 currentBalance = address(this).balance; payable(0xECe5Be2e951A8f9B6317bE94fAc75349E9146722).transfer( (currentBalance * 200) / 10000 ); payable(0x1E69347BfC401C35866f8C3587e900c7996EDC6e).transfer( (currentBalance * 200) / 10000 ); payable(0...
// 200 + 200 + 350 + 1475 + 1450 + 1475 +1450 + 1450 + 1450 + 500
LineComment
v0.8.6+commit.11564f7e
{ "func_code_index": [ 1688, 3030 ] }
59,413
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
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://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 506, 598 ] }
59,414
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
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://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 1157, 1310 ] }
59,415
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
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://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 1460, 1709 ] }
59,416
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
Solidity
TheAlphabets
contract TheAlphabets is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public NprojectersPrice = 30000000000000000; //0.03 ETH uint256 public SLootsPrice = 30000000000000000; //0.03 ETH uint256 public publicPrice = 50000000000000000; //...
/** * @title Realms contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
random
function random(string memory input) public pure returns (uint256) { return (uint256(keccak256(abi.encodePacked(input))) %26); }
// mirror a random number
LineComment
v0.7.6+commit.7338295f
MIT
ipfs://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 957, 1104 ] }
59,417
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
Solidity
TheAlphabets
contract TheAlphabets is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public NprojectersPrice = 30000000000000000; //0.03 ETH uint256 public SLootsPrice = 30000000000000000; //0.03 ETH uint256 public publicPrice = 50000000000000000; //...
/** * @title Realms contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
mintWithNproject
function mintWithNproject(uint NprojectId, uint TokenIdWanted) public payable nonReentrant { require(privateSale, "Private sale minting is over"); require(saleIsActive, "Sale must be active to mint"); require(NprojectersPrice <= msg.value, "Ether value sent is not correct"); require(NprojectContract...
//Private sale minting (reserved for Nproject owners)
LineComment
v0.7.6+commit.7338295f
MIT
ipfs://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 6144, 6774 ] }
59,418
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
Solidity
TheAlphabets
contract TheAlphabets is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public NprojectersPrice = 30000000000000000; //0.03 ETH uint256 public SLootsPrice = 30000000000000000; //0.03 ETH uint256 public publicPrice = 50000000000000000; //...
/** * @title Realms contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
mintWithSLoot
function mintWithSLoot(uint SLootId, uint TokenIdWanted) public payable nonReentrant { require(privateSale, "Private sale minting is over"); require(saleIsActive, "Sale must be active to mint"); require(SLootsPrice <= msg.value, "Ether value sent is not correct"); require(SLootContract.ownerOf(SLoot...
//Private sale minting (reserved for sLOOT owners)
LineComment
v0.7.6+commit.7338295f
MIT
ipfs://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 6839, 7485 ] }
59,419
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
Solidity
TheAlphabets
contract TheAlphabets is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public NprojectersPrice = 30000000000000000; //0.03 ETH uint256 public SLootsPrice = 30000000000000000; //0.03 ETH uint256 public publicPrice = 50000000000000000; //...
/** * @title Realms contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
mint
function mint(uint TokenIdWanted) public payable nonReentrant { require(saleIsActive, "Sale must be active to mint"); require(publicPrice <= msg.value, "Ether value sent is not correct"); require(TokenIdWanted > 0 && TokenIdWanted <= 9999, "Token ID invalid"); require(!_exists(TokenIdWanted), "This ...
//Public sale minting
LineComment
v0.7.6+commit.7338295f
MIT
ipfs://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 7515, 7944 ] }
59,420
TheAlphabets
@openzeppelin/contracts/access/Ownable.sol
0x46e19bd11772e5f4f984133b3e4aa5239097b36d
Solidity
Base64
library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (le...
encode
function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); ...
/// @notice Encodes some bytes to the base64 representation
NatSpecSingleLine
v0.7.6+commit.7338295f
MIT
ipfs://9cb5ce3b5c5bd1dd88543ef4571775906c4c1595568ec435be043d4a4011ecea
{ "func_code_index": [ 190, 1802 ] }
59,421
LiquidityMigrator
LiquidityMigrator.sol
0x2298f3960369fe07355c9750ab6813ead5fe1fdb
Solidity
IMigrator
interface IMigrator { enum TYPE { UNSTAKED, STAKED, WRAPPED } // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM function migrate( uint256 _amount, TYPE _from, TYPE _to ) external; }
migrate
function migrate( uint256 _amount, TYPE _from, TYPE _to ) external;
// migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM
LineComment
v0.7.5+commit.eb77ed08
Unknown
ipfs://06699a48a9297884eb650b7821b5c1f59618b76c2a4964c959c077ac0415778c
{ "func_code_index": [ 151, 239 ] }
59,422
LiquidityMigrator
LiquidityMigrator.sol
0x2298f3960369fe07355c9750ab6813ead5fe1fdb
Solidity
LiquidityMigrator
contract LiquidityMigrator { using SafeERC20 for IERC20; using SafeMath for uint256; address public policy; address public leftoverRecipient; ITreasury internal immutable treasury = ITreasury(0x873ad91fA4F2aA0d557C0919eC3F6c9D240cDd05); IERC20 internal immutable oldOHM = IERC20(0x38351...
migrateLP
function migrateLP( address pair, IUniswapV2Router routerFrom, IUniswapV2Router routerTo, address token, uint256 _minA, uint256 _minB, uint256 _deadline ) external onlyPolicy { // Since we are adding liquidity, any existing balance should be excluded uint256 initialNewOHMBalance = newOHM.bal...
/** * @notice Migrate LP and pair with new OHM */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://06699a48a9297884eb650b7821b5c1f59618b76c2a4964c959c077ac0415778c
{ "func_code_index": [ 843, 2688 ] }
59,423
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
QuarkChain
function QuarkChain() public { symbol = "QKC"; name = "QuarkChain"; decimals = 18; _totalSupply = 10000000000000000000000000000; balances[0x8907a6757AfcA5276Cfca544671e9AAA98AbE2be] = _totalSupply; Transfer(address(0), 0x8907a6757AfcA5276Cfca544671e9AAA98AbE2be, _totalSupply); }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 457, 800 ] }
59,424
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 988, 1109 ] }
59,425
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 1329, 1458 ] }
59,426
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 1802, 2079 ] }
59,427
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 2587, 2795 ] }
59,428
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 3326, 3684 ] }
59,429
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 3967, 4123 ] }
59,430
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 4478, 4795 ] }
59,431
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 4987, 5046 ] }
59,432
QuarkChain
QuarkChain.sol
0x49358a824c66b64a2f0c8bb3c99dd73586afab16
Solidity
QuarkChain
contract QuarkChain is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://4384b8deba2e746c2d0ffd6d445724c75aa5caf146cde2d6dfcf26b9c44fbab9
{ "func_code_index": [ 5279, 5468 ] }
59,433
PonziTokenH3H3
PonziTokenH3H3.sol
0x04129cff7d79a652256c73b1407f34828e79a4de
Solidity
PonziTokenH3H3
contract PonziTokenH3H3 { uint256 constant PRECISION = 0x10000000000000000; // 2^64 // CRR = 80 % int constant CRRN = 1; int constant CRRD = 2; // The price coefficient. Chosen such that at 1 token total supply // the reserve is 0.8 ether and price 1 ether/token. int constant LOGC = -0x296ABF784A358468C;...
// If you wanna escape this contract REALLY FAST // 1. open MEW/METAMASK // 2. Put this as data: 0xb1e35242 // 3. send 150000+ gas // That calls the getMeOutOfHere() method // 10% fees, price goes up crazy fast
LineComment
PonziTokenH3H3
function PonziTokenH3H3() public { //owner = msg.sender; }
//address owner;
LineComment
v0.4.19+commit.c4cbbb05
bzzr://4bfe40108e4f452e57a17955c1ee99cad6f9e0cc499743ecf31e33756e0a06e6
{ "func_code_index": [ 1119, 1184 ] }
59,434
PonziTokenH3H3
PonziTokenH3H3.sol
0x04129cff7d79a652256c73b1407f34828e79a4de
Solidity
PonziTokenH3H3
contract PonziTokenH3H3 { uint256 constant PRECISION = 0x10000000000000000; // 2^64 // CRR = 80 % int constant CRRN = 1; int constant CRRD = 2; // The price coefficient. Chosen such that at 1 token total supply // the reserve is 0.8 ether and price 1 ether/token. int constant LOGC = -0x296ABF784A358468C;...
// If you wanna escape this contract REALLY FAST // 1. open MEW/METAMASK // 2. Put this as data: 0xb1e35242 // 3. send 150000+ gas // That calls the getMeOutOfHere() method // 10% fees, price goes up crazy fast
LineComment
balanceOf
function balanceOf(address _owner) public constant returns (uint256 balance) { return balanceOfOld[_owner]; }
// These are functions solely created to appease the frontend
LineComment
v0.4.19+commit.c4cbbb05
bzzr://4bfe40108e4f452e57a17955c1ee99cad6f9e0cc499743ecf31e33756e0a06e6
{ "func_code_index": [ 1252, 1377 ] }
59,435
PonziTokenH3H3
PonziTokenH3H3.sol
0x04129cff7d79a652256c73b1407f34828e79a4de
Solidity
PonziTokenH3H3
contract PonziTokenH3H3 { uint256 constant PRECISION = 0x10000000000000000; // 2^64 // CRR = 80 % int constant CRRN = 1; int constant CRRD = 2; // The price coefficient. Chosen such that at 1 token total supply // the reserve is 0.8 ether and price 1 ether/token. int constant LOGC = -0x296ABF784A358468C;...
// If you wanna escape this contract REALLY FAST // 1. open MEW/METAMASK // 2. Put this as data: 0xb1e35242 // 3. send 150000+ gas // That calls the getMeOutOfHere() method // 10% fees, price goes up crazy fast
LineComment
transferTokens
function transferTokens(address _from, address _to, uint256 _value) internal { if (balanceOfOld[_from] < _value) revert(); if (_to == address(this)) { sell(_value); } else { int256 payoutDiff = (int256) (earningsPerShare * _value); balanceOfOld[_from] -= _value; balanceOfOld[_to] += _value...
// End of useless functions // Invariants // totalPayout/Supply correct: // totalPayouts = \sum_{addr:address} payouts(addr) // totalSupply = \sum_{addr:address} balanceOfOld(addr) // dividends not negative: // \forall addr:address. payouts[addr] <= earningsPerShare * balanceOfOld[addr] // supply/reserve correla...
LineComment
v0.4.19+commit.c4cbbb05
bzzr://4bfe40108e4f452e57a17955c1ee99cad6f9e0cc499743ecf31e33756e0a06e6
{ "func_code_index": [ 2956, 3401 ] }
59,436
PonziTokenH3H3
PonziTokenH3H3.sol
0x04129cff7d79a652256c73b1407f34828e79a4de
Solidity
PonziTokenH3H3
contract PonziTokenH3H3 { uint256 constant PRECISION = 0x10000000000000000; // 2^64 // CRR = 80 % int constant CRRN = 1; int constant CRRD = 2; // The price coefficient. Chosen such that at 1 token total supply // the reserve is 0.8 ether and price 1 ether/token. int constant LOGC = -0x296ABF784A358468C;...
// If you wanna escape this contract REALLY FAST // 1. open MEW/METAMASK // 2. Put this as data: 0xb1e35242 // 3. send 150000+ gas // That calls the getMeOutOfHere() method // 10% fees, price goes up crazy fast
LineComment
function () payable public { if (msg.value > 0) buy(); else withdrawOld(msg.sender); }
/*function destroy() external { selfdestruct(owner); }*/
Comment
v0.4.19+commit.c4cbbb05
bzzr://4bfe40108e4f452e57a17955c1ee99cad6f9e0cc499743ecf31e33756e0a06e6
{ "func_code_index": [ 9166, 9270 ] }
59,437
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 90, 486 ] }
59,438
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 598, 877 ] }
59,439
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 992, 1131 ] }
59,440
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 1196, 1335 ] }
59,441
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 1470, 1587 ] }
59,442
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ funct...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
name
function name() public view returns(string) { return _name; }
/** * @return the name of the token. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 313, 385 ] }
59,443
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ funct...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
symbol
function symbol() public view returns(string) { return _symbol; }
/** * @return the symbol of the token. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 441, 517 ] }
59,444
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ funct...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
decimals
function decimals() public view returns(uint8) { return _decimals; }
/** * @return the number of decimals of the token. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 585, 664 ] }
59,445
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 281, 369 ] }
59,446
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; }
/** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 570, 673 ] }
59,447
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally 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 view returns (uint256) { 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 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 995, 1157 ] }
59,448
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transfer
function transfer(address to, uint256 value) public returns (bool) { _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.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 1313, 1446 ] }
59,449
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally 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) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 2070, 2299 ] }
59,450
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally 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) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); return true; }
/** * @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 amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 2576, 2827 ] }
59,451
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseAllowance
function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].add(addedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } ...
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 3286, 3632 ] }
59,452
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].sub(subtractedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 4096, 4452 ] }
59,453
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
_transfer
function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); }
/** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 4657, 4904 ] }
59,454
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
_mint
function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); }
/** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 5237, 5491 ] }
59,455
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
_burn
function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 5708, 5962 ] }
59,456
Token
Token.sol
0xe6fb2701508e1a77c48f85a2e1a0e58867f7875b
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 value) internal { // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. _allowed[account][msg.sender] = _allowed[account][msg.sender].sub( value); _burn(account, ...
/** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://81ebb5ec407564524bf093d2229c433e287e912ba0bea0bb7ba3881be2d36432
{ "func_code_index": [ 6274, 6619 ] }
59,457
VeraCoin
VeraCoin.sol
0xf90f1648926005a8bb3ed8ec883164de7f768743
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://1f27e8465532873eb3888aa6ff655b1a02573d4be9906245de4351d19e9f1da1
{ "func_code_index": [ 179, 240 ] }
59,458
VeraCoin
VeraCoin.sol
0xf90f1648926005a8bb3ed8ec883164de7f768743
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner { if (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.16+commit.d7661dd9
bzzr://1f27e8465532873eb3888aa6ff655b1a02573d4be9906245de4351d19e9f1da1
{ "func_code_index": [ 589, 738 ] }
59,459
VeraCoin
VeraCoin.sol
0xf90f1648926005a8bb3ed8ec883164de7f768743
Solidity
Haltable
contract Haltable is Ownable { bool public halted; modifier stopInEmergency { require(!halted); _; } modifier onlyInEmergency { require(halted); _; } // called by the owner on emergency, triggers stopped state function halt() external onlyOwne...
/* * Haltable * * Abstract contract that allows children to implement an * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode. * * * Originally envisioned in FirstBlood ICO contract. */
Comment
halt
function halt() external onlyOwner { halted = true; }
// called by the owner on emergency, triggers stopped state
LineComment
v0.4.16+commit.d7661dd9
bzzr://1f27e8465532873eb3888aa6ff655b1a02573d4be9906245de4351d19e9f1da1
{ "func_code_index": [ 283, 355 ] }
59,460