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
DelegatedSending
DelegatedSending.sol
0xf7908ab1f1e352f83c5ebc75051c0565aeaea5fb
Solidity
DelegatedSending
contract DelegatedSending is ReadsAzimuth { // Pool: :who was given their own pool by :prefix, of :size invites // event Pool(uint16 indexed prefix, uint32 indexed who, uint16 size); // Sent: :by sent :point // event Sent( uint16 indexed prefix, uint32 indexed fromPool, ...
// DelegatedSending: invite-like point sending // // This contract allows planet owners to gift planets to their friends, // if a star has allowed it. // // Star owners can grant a number of "invites" to planets. An "invite" in // the context of this contract means a planet from the same parent star, // ...
LineComment
canReceive
function canReceive(address _recipient) public view returns (bool result) { return ( 0 == azimuth.getOwnedPointCount(_recipient) && 0 == azimuth.getTransferringForCount(_recipient) ); }
// canReceive(): whether the _recipient is eligible to receive a planet // from this contract or not // // only those who don't own or are entitled to any points may receive //
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://c3e090bdc98c036b421a1fe9195484d6c637a7cbd60674bdb2b7c38412122e01
{ "func_code_index": [ 5757, 5985 ] }
2,007
DelegatedSending
DelegatedSending.sol
0xf7908ab1f1e352f83c5ebc75051c0565aeaea5fb
Solidity
DelegatedSending
contract DelegatedSending is ReadsAzimuth { // Pool: :who was given their own pool by :prefix, of :size invites // event Pool(uint16 indexed prefix, uint32 indexed who, uint16 size); // Sent: :by sent :point // event Sent( uint16 indexed prefix, uint32 indexed fromPool, ...
// DelegatedSending: invite-like point sending // // This contract allows planet owners to gift planets to their friends, // if a star has allowed it. // // Star owners can grant a number of "invites" to planets. An "invite" in // the context of this contract means a planet from the same parent star, // ...
LineComment
getPoolStars
function getPoolStars(uint32 _who) external view returns (uint16[] stars) { return poolStars[_who]; }
// getPoolStars(): returns a list of stars _who has pools for //
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://c3e090bdc98c036b421a1fe9195484d6c637a7cbd60674bdb2b7c38412122e01
{ "func_code_index": [ 6060, 6190 ] }
2,008
DelegatedSending
DelegatedSending.sol
0xf7908ab1f1e352f83c5ebc75051c0565aeaea5fb
Solidity
DelegatedSending
contract DelegatedSending is ReadsAzimuth { // Pool: :who was given their own pool by :prefix, of :size invites // event Pool(uint16 indexed prefix, uint32 indexed who, uint16 size); // Sent: :by sent :point // event Sent( uint16 indexed prefix, uint32 indexed fromPool, ...
// DelegatedSending: invite-like point sending // // This contract allows planet owners to gift planets to their friends, // if a star has allowed it. // // Star owners can grant a number of "invites" to planets. An "invite" in // the context of this contract means a planet from the same parent star, // ...
LineComment
getInviters
function getInviters() external view returns (uint32[] invs) { return inviters; }
// getInviters(): returns a list of all points with their own pools //
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://c3e090bdc98c036b421a1fe9195484d6c637a7cbd60674bdb2b7c38412122e01
{ "func_code_index": [ 6271, 6381 ] }
2,009
DelegatedSending
DelegatedSending.sol
0xf7908ab1f1e352f83c5ebc75051c0565aeaea5fb
Solidity
DelegatedSending
contract DelegatedSending is ReadsAzimuth { // Pool: :who was given their own pool by :prefix, of :size invites // event Pool(uint16 indexed prefix, uint32 indexed who, uint16 size); // Sent: :by sent :point // event Sent( uint16 indexed prefix, uint32 indexed fromPool, ...
// DelegatedSending: invite-like point sending // // This contract allows planet owners to gift planets to their friends, // if a star has allowed it. // // Star owners can grant a number of "invites" to planets. An "invite" in // the context of this contract means a planet from the same parent star, // ...
LineComment
getInvited
function getInvited(uint32 _who) external view returns (uint32[] invd) { return invited[_who]; }
// getInvited(): returns a list of points invited by _who //
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://c3e090bdc98c036b421a1fe9195484d6c637a7cbd60674bdb2b7c38412122e01
{ "func_code_index": [ 6452, 6577 ] }
2,010
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 606, 1230 ] }
2,011
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 2160, 2562 ] }
2,012
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Requirements: ...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 3032, 3210 ] }
2,013
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {Address-functionCall-address-bytes-}, but with * `errorMessage` as a fallback revert reason when `target` reverts. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 3374, 3575 ] }
2,014
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Performs a Solidity function call using a low level `call`, * transferring `value` wei. A plain`call` is an unsafe replacement for a * function call: use this function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls)...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 4148, 4379 ] }
2,015
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {Address-functionCallWithValue-address-bytes-uint256-}, but * with `errorMessage` as a fallback revert reason when `target` reverts. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 4560, 4881 ] }
2,016
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
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.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 94, 154 ] }
2,017
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
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.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 237, 310 ] }
2,018
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
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.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 534, 616 ] }
2,019
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
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.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 895, 983 ] }
2,020
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
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.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 1647, 1726 ] }
2,021
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
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.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 2039, 2141 ] }
2,022
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 259, 445 ] }
2,023
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 723, 864 ] }
2,024
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 1162, 1359 ] }
2,025
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 1613, 2089 ] }
2,026
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 2560, 2697 ] }
2,027
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 3188, 3471 ] }
2,028
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 3931, 4066 ] }
2,029
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 4546, 4717 ] }
2,030
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line ...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 747, 1374 ] }
2,031
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 2393, 3159 ] }
2,032
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 497, 581 ] }
2,033
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 1139, 1292 ] }
2,034
HatAirdrop
HatAirdrop.sol
0x63f28989cca095e61b1dc74050e6132eeb4cb7c3
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://75e0826307cea4fcdb14e513c28c765678b11bf94c772e7638ae18889c1108e1
{ "func_code_index": [ 1442, 1691 ] }
2,035
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
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.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 94, 154 ] }
2,036
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
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.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 237, 310 ] }
2,037
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
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.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 534, 616 ] }
2,038
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
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.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 895, 983 ] }
2,039
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
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.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1647, 1726 ] }
2,040
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
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.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2039, 2141 ] }
2,041
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 259, 445 ] }
2,042
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 723, 864 ] }
2,043
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1162, 1359 ] }
2,044
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1613, 2089 ] }
2,045
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2560, 2697 ] }
2,046
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 3188, 3471 ] }
2,047
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 3931, 4066 ] }
2,048
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 4546, 4717 ] }
2,049
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 606, 1230 ] }
2,050
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2160, 2562 ] }
2,051
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 3318, 3496 ] }
2,052
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 3721, 3922 ] }
2,053
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 4292, 4523 ] }
2,054
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 4774, 5095 ] }
2,055
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line ...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 747, 1374 ] }
2,056
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2393, 3159 ] }
2,057
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Ownable
contract Ownable is Context { /** * @dev So here we seperate the rights of the classic ownership into 'owner' and 'minter' * this way the developer/owner stays the 'owner' and can make changes like adding a pool * at any time but cannot mint anymore as soon as the 'minter' gets changes (to the ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 811, 895 ] }
2,058
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Ownable
contract Ownable is Context { /** * @dev So here we seperate the rights of the classic ownership into 'owner' and 'minter' * this way the developer/owner stays the 'owner' and can make changes like adding a pool * at any time but cannot mint anymore as soon as the 'minter' gets changes (to the ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1453, 1606 ] }
2,059
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Ownable
contract Ownable is Context { /** * @dev So here we seperate the rights of the classic ownership into 'owner' and 'minter' * this way the developer/owner stays the 'owner' and can make changes like adding a pool * at any time but cannot mint anymore as soon as the 'minter' gets changes (to the ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1756, 2005 ] }
2,060
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Mintable
contract Mintable is Context { /** * @dev So here we seperate the rights of the classic ownership into 'owner' and 'minter' * this way the developer/owner stays the 'owner' and can make changes like adding a pool * at any time but cannot mint anymore as soon as the 'minter' gets changes (to the...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an minter) that can be granted exclusive access to * specific functions. * * By default, the minter account will be the one that deploys the contract. This * can later be changed with {transferMintership...
NatSpecMultiLine
minter
function minter() public view returns (address) { return _minter; }
/** * @dev Returns the address of the current minter. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 820, 906 ] }
2,061
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
Mintable
contract Mintable is Context { /** * @dev So here we seperate the rights of the classic ownership into 'owner' and 'minter' * this way the developer/owner stays the 'owner' and can make changes like adding a pool * at any time but cannot mint anymore as soon as the 'minter' gets changes (to the...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an minter) that can be granted exclusive access to * specific functions. * * By default, the minter account will be the one that deploys the contract. This * can later be changed with {transferMintership...
NatSpecMultiLine
transferMintership
function transferMintership(address newMinter) public virtual onlyMinter { require(newMinter != address(0), "Mintable: new minter is the zero address"); emit MintershipTransferred(_minter, newMinter); _minter = newMinter; }
/** * @dev Transfers mintership of the contract to a new account (`newMinter`). * Can only be called by the current minter. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1276, 1536 ] }
2,062
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1202, 1290 ] }
2,063
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 1404, 1496 ] }
2,064
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint256) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2129, 2219 ] }
2,065
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2279, 2384 ] }
2,066
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @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
burnedSupply
function burnedSupply() public view returns (uint256) { return _burnedSupply; }
/** * @dev Returns the amount of burned tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2455, 2553 ] }
2,067
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @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
burnRate
function burnRate() public view returns (uint256) { return _burnRate; }
/** * @dev Returns the burnrate. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2609, 2699 ] }
2,068
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 2757, 2881 ] }
2,069
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 3089, 3269 ] }
2,070
CROWED
CROWED.sol
0x7216ae77b12fdcf250caff22b252bdeb3f188e35
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _burnedSupply; uint256 pr...
/** * @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(uint256 amount) public virtual returns (bool) { _burn(_msgSender(), amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `account` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv2
ipfs://2c46401db6fba9a9044d2a9ef4a783487fdd694901d8f835f40463f41db7374a
{ "func_code_index": [ 3475, 3608 ] }
2,071
Token
Token.sol
0xfb28540d3d8d395ea2951bd3c83034b20c2225c0
Solidity
ERC20
interface ERC20 { //Methods function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address recipient, uint256 amount) external...
totalSupply
function totalSupply() external view returns (uint256);
//Methods
LineComment
v0.8.6+commit.11564f7e
MIT
{ "func_code_index": [ 34, 93 ] }
2,072
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 106, 544 ] }
2,073
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 674, 982 ] }
2,074
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 1115, 1270 ] }
2,075
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 1353, 1508 ] }
2,076
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 1664, 1793 ] }
2,077
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 294, 390 ] }
2,078
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; }
/** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 605, 716 ] }
2,079
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
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.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 1050, 1218 ] }
2,080
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
transfer
function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; }
/** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 1388, 1533 ] }
2,081
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
approve
function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 2175, 2424 ] }
2,082
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint256 value) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; }
/** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 2892, 3219 ] }
2,083
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add( addedValue ); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); retur...
/** * @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 * Emits an Approva...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 3729, 4104 ] }
2,084
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub( subtractedValue ); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); ...
/** * @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 * Emits an Approva...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 4619, 5004 ] }
2,085
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
_transfer
function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); }
/** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 5226, 5493 ] }
2,086
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
_mint
function _mint(uint256 value) internal { require(msg.sender != address(0)); _totalSupply = _totalSupply.add(value); _balances[msg.sender] = _balances[msg.sender].add(value); emit Transfer(address(0), msg.sender, 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 value The amount that will be created. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 5767, 6036 ] }
2,087
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
_burn
function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 6265, 6539 ] }
2,088
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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()...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation em...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 value) internal { _allowed[account][msg.sender] = _allowed[account][msg.sender].sub( value ); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); }
/** * @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. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param valu...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 6933, 7221 ] }
2,089
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
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.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 154, 345 ] }
2,090
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
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.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 419, 613 ] }
2,091
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
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...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
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.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 702, 904 ] }
2,092
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
Solidity
ERC20Interface
interface ERC20Interface { // Standard ERC-20 interface. function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external retur...
transfer
function transfer(address to, uint256 value) external returns (bool);
// Standard ERC-20 interface.
LineComment
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 63, 137 ] }
2,093
Bexpress
Bexpress.sol
0xc002141f62961afa759f7b22aaeb151bf80a3d8d
Solidity
ERC20Interface
interface ERC20Interface { // Standard ERC-20 interface. function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external retur...
mint
function mint() external returns (bool);
// Extension of ERC-20 interface to support supply adjustment.
LineComment
v0.5.17+commit.d19bba13
None
bzzr://cfefed105a08f450eba1a193f0c7cb37af76c84c4dc3c10269331305bff11870
{ "func_code_index": [ 655, 700 ] }
2,094
ArtexToken
ArtexToken.sol
0x7705faa34b16eb6d77dfc7812be2367ba6b0248e
Solidity
Crowdsale
contract Crowdsale is Owned, Stateful { uint public etherPriceUSDWEI; address public beneficiary; uint public totalLimitUSDWEI; uint public minimalSuccessUSDWEI; uint public collectedUSDWEI; uint public crowdsaleStartTime; uint public crowdsaleFinishTime; uint public tokenP...
emitTokens
function emitTokens(address _investor, uint _usdwei) internal returns(uint tokensToEmit);
//abstract methods
LineComment
v0.4.18+commit.9cf6e910
bzzr://06bbc0bf525ce858495eaf3a678c495345c4c11cbd3b9dac4cceec3427b0f5d2
{ "func_code_index": [ 941, 1035 ] }
2,095
ArtexToken
ArtexToken.sol
0x7705faa34b16eb6d77dfc7812be2367ba6b0248e
Solidity
Crowdsale
contract Crowdsale is Owned, Stateful { uint public etherPriceUSDWEI; address public beneficiary; uint public totalLimitUSDWEI; uint public minimalSuccessUSDWEI; uint public collectedUSDWEI; uint public crowdsaleStartTime; uint public crowdsaleFinishTime; uint public tokenP...
withdrawBack
function withdrawBack() external saleFailedState { returnInvestmentsToInternal(msg.sender); }
// This function must be called by token holder in case of crowdsale failed
LineComment
v0.4.18+commit.9cf6e910
bzzr://06bbc0bf525ce858495eaf3a678c495345c4c11cbd3b9dac4cceec3427b0f5d2
{ "func_code_index": [ 6515, 6627 ] }
2,096
ArtexToken
ArtexToken.sol
0x7705faa34b16eb6d77dfc7812be2367ba6b0248e
Solidity
MigratableToken
contract MigratableToken is Token { function MigratableToken() payable Token() {} bool stateMigrated = false; address public migrationAgent; uint public totalMigrated; address public migrationHost; mapping(address => bool) migratedInvestors; event Migrated(address indexed from, ...
migrate
function migrate() external { require(migrationAgent != 0); uint value = balances[msg.sender]; balances[msg.sender] -= value; Transfer(msg.sender, this, value); totalSupply -= value; totalMigrated += value; MigrationAgent(migrationAgent).migrateFrom(msg.sender, value); Migrated(m...
//migration by investor
LineComment
v0.4.18+commit.9cf6e910
bzzr://06bbc0bf525ce858495eaf3a678c495345c4c11cbd3b9dac4cceec3427b0f5d2
{ "func_code_index": [ 3099, 3497 ] }
2,097
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
setMintConfig
function setMintConfig(MintConfig calldata config) external onlyOwner { mintConfig = config; }
/// @notice Toggle minting relevant flags.
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 3312, 3422 ] }
2,098
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
mintSigned
function mintSigned( address to, uint32 num, uint32 numMax, uint256 nonce, bytes calldata signature ) external payable nonReentrant onlyDuringSignedMintingPeriod { bytes32 message = ECDSA.toEthSignedMessageHash( abi.encodePacked(to, numMax, nonce) ); if (num + numSignedMintsFrom...
/// @notice Mints tokens to a given address using a signed message. /// @dev The minter might be different than the receiver. /// @param to Token receiver /// @param num Number of tokens to be minted. /// @param numMax Max number of tokens that can be minted to the receiver /// @param signature to prove that the receiv...
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 4591, 5392 ] }
2,099
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
mintPublic
function mintPublic(address to, uint32 num) external payable nonReentrant onlyDuringPublicMintingPeriod { if (num > MAX_MINT_PER_TX) revert TooManyMintsRequested(); uint256 numRemaining = MAX_NUM_TOKENS - totalSupply; if (num > numRemaining) revert InsufficientTokensRemanining(); if (n...
/// @notice Mints tokens to a given address. /// @dev The minter might be different than the receiver. /// @param to Token receiver /// @param num Number of tokens to be minted.
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 5588, 6067 ] }
2,100
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
mintReserve
function mintReserve(address to) external onlyOwner { if (reserveMinted) revert MintDisabled(); reserveMinted = true; _processMint(to, NUM_RESERVED_MINTS); }
/// @notice Mints the DAO allocated tokens. /// @dev The minter might be different than the receiver. /// @param to Token receiver
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 6212, 6401 ] }
2,101
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
_processMint
function _processMint(address to, uint32 num) internal { uint32 supply = totalSupply; for (uint256 i = 0; i < num; i++) { if (MAX_NUM_TOKENS <= supply) revert SoldOut(); ERC721._safeMint(to, supply); supply++; } totalSupply = supply; }
/// @notice Mints new tokens for the recipient.
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 6455, 6766 ] }
2,102
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
changeSigners
function changeSigners( address[] calldata delSigners, address[] calldata addSigners ) external onlyOwner { for (uint256 idx; idx < delSigners.length; ++idx) { _signers.remove(delSigners[idx]); } for (uint256 idx; idx < addSigners.length; ++idx) { _signers.add(addSigners[idx]); }...
/// @notice Removes and adds addresses to the set of allowed signers. /// @dev Removal is performed before addition.
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 7100, 7466 ] }
2,103
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
getSigners
function getSigners() external view returns (address[] memory signers) { uint256 len = _signers.length(); signers = new address[](len); for (uint256 idx = 0; idx < len; ++idx) { signers[idx] = _signers.at(idx); } }
/// @notice Returns the addresses that are used for signature verification
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 7547, 7813 ] }
2,104
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
/// @notice Default function for receiving funds /// @dev This enables the contract to be used as splitter for royalties.
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 8138, 8203 ] }
2,105
GmStudioMindTheGap
contracts/collections/MindTheGap/MindTheGap.sol
0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb
Solidity
GmStudioMindTheGap
contract GmStudioMindTheGap is ERC721Common, ReentrancyGuard, ERC2981SinglePercentual { using EnumerableSet for EnumerableSet.AddressSet; using SignatureChecker for EnumerableSet.AddressSet; using Address for address payable; /// @notice Price for minting uint256 public constant MINT_PR...
// __ __ __ // | \ | \ \ // ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______ // / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \ // | ▓▓▓▓...
LineComment
_processPayment
function _processPayment() internal { paymentSplitter.sendValue(msg.value); }
/// @notice Processes an incoming payment and sends it to the payment /// splitter.
NatSpecSingleLine
v0.8.11+commit.d7f03943
Unlicense
{ "func_code_index": [ 8297, 8390 ] }
2,106