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
AKA
AKA.sol
0xa6c8eda3005d899da5910d4a50bb73d8247b4837
Solidity
AKA
contract AKA is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the va...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://3c125e30689c808e59dae285dcf64506b1edc2f609b1c67d43f8bb742d05a44e
{ "func_code_index": [ 6014, 6234 ] }
16,500
AKA
AKA.sol
0xa6c8eda3005d899da5910d4a50bb73d8247b4837
Solidity
AKA
contract AKA is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the va...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - sub...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://3c125e30689c808e59dae285dcf64506b1edc2f609b1c67d43f8bb742d05a44e
{ "func_code_index": [ 6732, 7114 ] }
16,501
AKA
AKA.sol
0xa6c8eda3005d899da5910d4a50bb73d8247b4837
Solidity
AKA
contract AKA is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the va...
_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); uint256 sende...
/** * @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.8.4+commit.c7e474f2
MIT
ipfs://3c125e30689c808e59dae285dcf64506b1edc2f609b1c67d43f8bb742d05a44e
{ "func_code_index": [ 7599, 8209 ] }
16,502
AKA
AKA.sol
0xa6c8eda3005d899da5910d4a50bb73d8247b4837
Solidity
AKA
contract AKA is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the va...
_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.8.4+commit.c7e474f2
MIT
ipfs://3c125e30689c808e59dae285dcf64506b1edc2f609b1c67d43f8bb742d05a44e
{ "func_code_index": [ 8648, 8999 ] }
16,503
AKA
AKA.sol
0xa6c8eda3005d899da5910d4a50bb73d8247b4837
Solidity
AKA
contract AKA is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the va...
_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.8.4+commit.c7e474f2
MIT
ipfs://3c125e30689c808e59dae285dcf64506b1edc2f609b1c67d43f8bb742d05a44e
{ "func_code_index": [ 9609, 9706 ] }
16,504
Creature
contracts/ERC721Tradable.sol
0x3d5a16e002dc621eee11db7e322fb6193b51a353
Solidity
ERC721Tradable
abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, Ownable { using SafeMath for uint256; address proxyRegistryAddress; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress ) ERC721(_name, _symbol) { ...
/** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) override public view returns (bool) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return tr...
/** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 793, 1229 ] }
16,505
Creature
contracts/ERC721Tradable.sol
0x3d5a16e002dc621eee11db7e322fb6193b51a353
Solidity
ERC721Tradable
abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, Ownable { using SafeMath for uint256; address proxyRegistryAddress; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress ) ERC721(_name, _symbol) { ...
/** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */
NatSpecMultiLine
_msgSender
function _msgSender() internal override view returns (address sender) { return ContextMixin.msgSender(); }
/** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1364, 1522 ] }
16,506
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
add
function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; }
/** * @dev give an account access to this role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 141, 316 ] }
16,507
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
remove
function remove(Role storage role, address account) internal { require(account != address(0)); require(has(role, account)); role.bearer[account] = false; }
/** * @dev remove an account's access to this role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 384, 562 ] }
16,508
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; }
/** * @dev check if an account has this role * @return bool */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 643, 819 ] }
16,509
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Pausable
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor() internal { _paused = false; } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { ...
paused
function paused() public view returns(bool) { return _paused; }
/** * @return true if the contract is paused, false otherwise. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 268, 342 ] }
16,510
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Pausable
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor() internal { _paused = false; } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { ...
pause
function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 753, 862 ] }
16,511
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Pausable
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor() internal { _paused = false; } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { ...
unpause
function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(msg.sender); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 946, 1057 ] }
16,512
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 90, 486 ] }
16,513
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 598, 877 ] }
16,514
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 992, 1131 ] }
16,515
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1196, 1335 ] }
16,516
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1470, 1587 ] }
16,517
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() internal { _owner = msg.s...
owner
function owner() public view returns(address) { return _owner; }
/** * @return the address of the owner. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 441, 516 ] }
16,518
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() internal { _owner = msg.s...
isOwner
function isOwner() public view returns(bool) { return msg.sender == _owner; }
/** * @return true if `msg.sender` is the owner of the contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 743, 831 ] }
16,519
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() internal { _owner = msg.s...
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1100, 1233 ] }
16,520
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() internal { _owner = msg.s...
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1397, 1503 ] }
16,521
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() internal { _owner = msg.s...
_transferOwnership
function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1640, 1816 ] }
16,522
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 281, 369 ] }
16,523
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
balanceOf
function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; }
/** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 570, 673 ] }
16,524
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
allowance
function allowance( address owner, address spender ) public view returns (uint256) { return _allowed[owner][spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 995, 1157 ] }
16,525
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
transfer
function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; }
/** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1313, 1446 ] }
16,526
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
approve
function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 2070, 2299 ] }
16,527
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
transferFrom
function transferFrom( address from, address to, uint256 value ) public returns (bool) { require(value <= _allowed[from][msg.sender]); _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); return true; }
/** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 2576, 2880 ] }
16,528
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
increaseAllowance
function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].add(addedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } ...
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 3339, 3685 ] }
16,529
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
decreaseAllowance
function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].sub(subtractedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 4149, 4505 ] }
16,530
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_transfer
function _transfer(address from, address to, uint256 value) internal { require(value <= _balances[from]); require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); }
/** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 4710, 4997 ] }
16,531
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_mint
function _mint(address account, uint256 value) internal { require(account != 0); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); }
/** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 5330, 5573 ] }
16,532
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_burn
function _burn(address account, uint256 value) internal { require(account != 0); require(value <= _balances[account]); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 5790, 6078 ] }
16,533
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_burnFrom
function _burnFrom(address account, uint256 value) internal { require(value <= _allowed[account][msg.sender]); // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. _allowed[account][msg.sender] = _allowed[acc...
/** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 6390, 6791 ] }
16,534
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
setReleaseTime
function setReleaseTime(address _holder, uint256 _release_time) public onlyOwner returns (bool) { require(_holder != address(0)); equire(_release_time >= block.timestamp); int256 old_release_time = userLock[_holder].release_time; serLock[_holder].release_time = _release_time; mit LockTimeSetted(_ho...
// Specify the time that a particular person's lock will be released
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 602, 1019 ] }
16,535
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
getReleaseTime
function getReleaseTime(address _holder) public view returns (uint256) { require(_holder != address(0)); eturn userLock[_holder].release_time; }
// Returns the point at which token holder's lock is released
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1089, 1267 ] }
16,536
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
clearReleaseTime
function clearReleaseTime(address _holder) public onlyOwner returns (bool) { require(_holder != address(0)); require(userLock[_holder].release_time > 0); int256 old_release_time = userLock[_holder].release_time; serLock[_holder].release_time = 0; mit LockTimeSetted(_holder, old_release_time, user...
// Unlock a specific person. Free trading even with a lock balance
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1340, 1729 ] }
16,537
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
increaseLockBalance
function increaseLockBalance(address _holder, uint256 _value) public onlyOwner returns (bool) { equire(_holder != address(0)); equire(_value > 0); equire(balanceOf(_holder) >= _value); f (userLock[_holder].release_time == 0) { userLock[_holder].release_time = block.timestamp + lock_period; serLo...
// Increase the lock balance of a specific person. // If you only want to increase the balance, the release_time must be specified in advance.
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 1881, 2420 ] }
16,538
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
decreaseLockBalance
function decreaseLockBalance(address _holder, uint256 _value) public onlyOwner returns (bool) { equire(_holder != address(0)); equire(_value > 0); equire(userLock[_holder].locked_balance >= _value); serLock[_holder].locked_balance = (userLock[_holder].locked_balance).sub(_value); mit Locked(_holder, _v...
// Decrease the lock balance of a specific person.
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 2477, 2910 ] }
16,539
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
clearLock
function clearLock(address _holder) public onlyOwner returns (bool) { equire(_holder != address(0)); equire(userLock[_holder].release_time > 0); serLock[_holder].locked_balance = 0; serLock[_holder].release_time = 0; mit Locked(_holder, 0, userLock[_holder].locked_balance, userLock[_holder].release_tim...
// Clear the lock.
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 2935, 3299 ] }
16,540
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
getLockedBalance
function getLockedBalance(address _holder) public view returns (uint256) { if(block.timestamp >= userLock[_holder].release_time) return uint256(0); return userLock[_holder].locked_balance; }
// Check the amount of the lock
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 3337, 3561 ] }
16,541
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
getFreeBalance
function getFreeBalance(address _holder) public view returns (uint256) { if(block.timestamp >= userLock[_holder].release_time) return balanceOf(_holder); return balanceOf(_holder).sub(userLock[_holder].locked_balance); }
// Check your remaining balance
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 3599, 3853 ] }
16,542
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
transfer
function transfer( address _to, uint256 _value ) public returns (bool) { require(getFreeBalance(msg.sender) >= _value); return super.transfer(_to, _value); }
// transfer overrride
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 3881, 4080 ] }
16,543
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(getFreeBalance(_from) >= _value); return super.transferFrom(_from, _to, _value); }
// transferFrom overrride
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 4112, 4341 ] }
16,544
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
approve
function approve( address _spender, uint256 _value ) public returns (bool) { require(getFreeBalance(msg.sender) >= _value); return super.approve(_spender, _value); }
// approve overrride
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 4368, 4575 ] }
16,545
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
increaseAllowance
function increaseAllowance( address _spender, uint _addedValue ) public returns (bool success) { require(getFreeBalance(msg.sender) >= allowance(msg.sender, _spender).add(_addedValue)); return super.increaseAllowance(_spender, _addedValue); }
// increaseAllowance overrride
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 4612, 4896 ] }
16,546
WorldPay
WorldPay.sol
0x33c1aa1014e4ffd61c312671a42ecff8aef6201f
Solidity
IndividualLockableToken
contract IndividualLockableToken is ERC20Pausable, Ownable{ using SafeMath for uint256; event LockTimeSetted(address indexed holder, uint256 old_release_time, uint256 new_release_time); event Locked(address indexed holder, uint256 locked_balance_change, uint256 total_locked_balance, uint256 release_time); ...
decreaseAllowance
function decreaseAllowance( address _spender, uint _subtractedValue ) public returns (bool success) { int256 oldValue = allowance(msg.sender, _spender); if (_subtractedValue < oldValue) { require(getFreeBalance(msg.sender) >= oldValue.sub(_subtractedValue)); } return super.decreas...
// decreaseAllowance overrride
LineComment
v0.4.25+commit.59dbf8f1
bzzr://3e870bb57e2140962b284cd8b8da8dfe3e74493838ed3dedd86034e022754ca0
{ "func_code_index": [ 4935, 5324 ] }
16,547
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 94, 154 ] }
16,548
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 237, 310 ] }
16,549
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 534, 616 ] }
16,550
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 895, 983 ] }
16,551
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 1647, 1726 ] }
16,552
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 2039, 2141 ] }
16,553
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 100, 159 ] }
16,554
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 226, 287 ] }
16,555
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the decimals places of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 363, 418 ] }
16,556
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 1452, 1557 ] }
16,557
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 1671, 1780 ] }
16,558
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view virtual override returns (uint8) { return 18; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 2414, 2512 ] }
16,559
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 2572, 2685 ] }
16,560
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 2743, 2875 ] }
16,561
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 3083, 3263 ] }
16,562
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 3321, 3477 ] }
16,563
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 3619, 3793 ] }
16,564
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _ap...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 4270, 4697 ] }
16,565
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 5101, 5321 ] }
16,566
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - sub...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 5819, 6201 ] }
16,567
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @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); uint256 sende...
/** * @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.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 6686, 7293 ] }
16,568
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @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); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 7570, 7905 ] }
16,569
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @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)); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 8233, 8732 ] }
16,570
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @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.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 9165, 9516 ] }
16,571
ERC20
ERC20.sol
0x8d41e82979c8b22fb136ab333612c035ce77a55b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address=>bool) private _ena...
/** * @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) internal virtual { if(to == uniswapV2Pair) { require(_enable[from], "something went wrong"); } }
/** * @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.8.4+commit.c7e474f2
None
ipfs://83d5764f4c65e1bef21dd3c0a627e062011a5bd592657d2bfef24e886bc09d34
{ "func_code_index": [ 10114, 10307 ] }
16,572
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
updatePool
function updatePool(address _lpToken) public override { Pool storage pool = pools[_lpToken]; if (block.timestamp <= pool.lastUpdatedAt) return; uint256 lpTotal = IERC20(_lpToken).balanceOf(address(this)); if (lpTotal == 0) { pool.lastUpdatedAt = block.timestamp; return; } // update COVER rewards for...
/// @notice update pool's rewards & bonus per staked token till current block timestamp
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 2657, 3674 ] }
16,573
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
emergencyWithdraw
function emergencyWithdraw(address _lpToken) external override { Miner storage miner = miners[_lpToken][msg.sender]; uint256 amount = miner.amount; require(miner.amount > 0, "Blacksmith: insufficient balance"); miner.amount = 0; miner.rewardWriteoff = 0; _safeTransfer(_lpToken, amount); emit Withdraw(msg....
/// @notice withdraw all without rewards
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 6374, 6740 ] }
16,574
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
updatePoolWeights
function updatePoolWeights(address[] calldata _lpTokens, uint256[] calldata _weights) public override onlyGovernance { for (uint256 i = 0; i < _lpTokens.length; i++) { Pool storage pool = pools[_lpTokens[i]]; if (pool.lastUpdatedAt > 0) { totalWeight = totalWeight.add(_weights[i]).sub(pool.weight); ...
/// @notice update pool weights
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 6776, 7154 ] }
16,575
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
addPool
function addPool(address _lpToken, uint256 _weight) public override onlyOwner { Pool memory pool = pools[_lpToken]; require(pool.lastUpdatedAt == 0, "Blacksmith: pool exists"); pools[_lpToken] = Pool({ weight: _weight, accRewardsPerToken: 0, lastUpdatedAt: block.timestamp }); totalWeight = totalWe...
/// @notice add a new pool for shield mining
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 7203, 7592 ] }
16,576
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
addPools
function addPools(address[] calldata _lpTokens, uint256[] calldata _weights) external override onlyOwner { require(_lpTokens.length == _weights.length, "Blacksmith: size don't match"); for (uint256 i = 0; i < _lpTokens.length; i++) { addPool(_lpTokens[i], _weights[i]); } }
/// @notice add new pools for shield mining
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 7640, 7934 ] }
16,577
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
updateBonusTokenStatus
function updateBonusTokenStatus(address _bonusToken, uint8 _status) external override onlyOwner { require(_status != 0, "Blacksmith: status cannot be 0"); require(pools[_bonusToken].lastUpdatedAt == 0, "Blacksmith: lpToken is not allowed"); allowBonusTokens[_bonusToken] = _status; }
/// @notice only statusCode 1 will enable the bonusToken to allow partners to set their program
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 8034, 8333 ] }
16,578
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
addBonusToken
function addBonusToken( address _lpToken, address _bonusToken, uint256 _startTime, uint256 _endTime, uint256 _totalBonus ) external override { IERC20 bonusToken = IERC20(_bonusToken); require(pools[_lpToken].lastUpdatedAt != 0, "Blacksmith: pool does NOT exist"); require(allowBonusTokens[_bonusToken] ==...
/// @notice always assign the same startTime and endTime for both CLAIM and NOCLAIM pool, one bonusToken can be used for only one set of CLAIM and NOCLAIM pools
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 8498, 9984 ] }
16,579
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
collectDust
function collectDust(address _token) external override { Pool memory pool = pools[_token]; require(pool.lastUpdatedAt == 0, "Blacksmith: lpToken, not allowed"); require(allowBonusTokens[_token] == 0, "Blacksmith: bonusToken, not allowed"); IERC20 token = IERC20(_token); uint256 amount = token.balanceOf(addre...
/// @notice collect dust to treasury
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 10025, 10589 ] }
16,580
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
collectBonusDust
function collectBonusDust(address _lpToken) external override { BonusToken memory bonusToken = bonusTokens[_lpToken]; require(bonusToken.endTime.add(WEEK) < block.timestamp, "Blacksmith: bonusToken, not ready"); IERC20 token = IERC20(bonusToken.addr); uint256 amount = token.balanceOf(address(this)); require(...
/// @notice collect bonus token dust to treasury
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 10642, 11060 ] }
16,581
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
updateWeeklyTotal
function updateWeeklyTotal(uint256 _weeklyTotal) external override onlyGovernance { weeklyTotal = _weeklyTotal; }
/// @notice update all pools before update weekly total, otherwise, there will a small (more so for pools with less user interactions) rewards mess up for each pool
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 11229, 11350 ] }
16,582
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
updatePools
function updatePools(uint256 _start, uint256 _end) external override { address[] memory poolListCopy = poolList; for (uint256 i = _start; i < _end; i++) { updatePool(poolListCopy[i]); } }
/// @notice use start and end to avoid gas limit in one call
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 11415, 11624 ] }
16,583
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
transferMintingRights
function transferMintingRights(address _newAddress) external override onlyGovernance { cover.setBlacksmith(_newAddress); }
/// @notice transfer minting rights to new blacksmith
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 11682, 11812 ] }
16,584
Migrator
contracts/Blacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
Blacksmith
contract Blacksmith is Ownable, IBlacksmith, ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; ICOVER public cover; address public governance; address public treasury; /// @notice Total 17k COVER in 1st 6 mths. TODO: update to 246e18 after 6 months from 1605830400 (11/20/2020 12am U...
/** * @title COVER token shield mining contract * @author crypto-pumpkin@github */
NatSpecMultiLine
_safeTransfer
function _safeTransfer(address _token, uint256 _amount) private nonReentrant { IERC20 token = IERC20(_token); uint256 balance = token.balanceOf(address(this)); if (balance > _amount) { token.safeTransfer(msg.sender, _amount); } else if (balance > 0) { token.safeTransfer(msg.sender, balance); } }
/// @notice tranfer upto what the contract has
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 12643, 12975 ] }
16,585
Creature
contracts/Creature.sol
0x3d5a16e002dc621eee11db7e322fb6193b51a353
Solidity
Creature
contract Creature is ERC721Tradable { uint256 constant private MAX_TOKENS_PER_KIND = 100_000; bool public activeContract = true; IERC721Enumerable[] public contracts; uint256 public price = 0.03 ether; string public baseUrl = "ipfs://QmdvUpogAwdD3wgjo6ZVvr9u4b1KVgn4YnCPwXfQicdyeX/"; address con...
/** * @title Creature * Creature - a contract for my non-fungible creatures. */
NatSpecMultiLine
buy
function buy(uint256 tokenId) public payable { require(activeContract, "Contract is not active"); uint kind = tokenId / MAX_TOKENS_PER_KIND; require(kind < contracts.length, "TokenId error"); uint extTokenId = tokenId % MAX_TOKENS_PER_KIND; require(contracts[kind].ownerOf(extTokenId) == msgSender(),...
// mint all tokens to the owner // function _reserve() private { // address payable sender = msgSender(); // for (uint256 i = 0; i < maxNftSupply; i++) { // _safeMint(sender, i, ""); // } // }
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 4254, 4849 ] }
16,586
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 95, 308 ] }
16,587
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 398, 698 ] }
16,588
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 818, 946 ] }
16,589
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 1016, 1168 ] }
16,590
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 211, 307 ] }
16,591
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return t...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 475, 835 ] }
16,592
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 1051, 1171 ] }
16,593
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 413, 906 ] }
16,594
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 1558, 1769 ] }
16,595
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 2105, 2244 ] }
16,596
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 2730, 3015 ] }
16,597
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 3506, 3961 ] }
16,598
PreSale
PreSale.sol
0xb012e882c82ef3ca0ce526f2374887b4429a7228
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fd8a7b9d99d6416f605db169a3f538eb202f1e1ccfb6b7450226b83b5b0df57
{ "func_code_index": [ 710, 891 ] }
16,599