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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toUint8 | function toUint8(uint256 value) internal pure returns (uint8) {
require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
return uint8(value);
}
| /**
* @dev Returns the downcasted uint8 from uint256, reverting on
* overflow (when the input is greater than largest uint8).
*
* Counterpart to Solidity's `uint8` operator.
*
* Requirements:
*
* - input must fit into 8 bits.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
3260,
3450
]
} | 56,761 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toUint256 | function toUint256(int256 value) internal pure returns (uint256) {
require(value >= 0, "SafeCast: value must be positive");
return uint256(value);
}
| /**
* @dev Converts a signed int256 into an unsigned uint256.
*
* Requirements:
*
* - input must be greater than or equal to 0.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
3625,
3801
]
} | 56,762 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toInt128 | function toInt128(int256 value) internal pure returns (int128) {
require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
return int128(value);
}
| /**
* @dev Returns the downcasted int128 from int256, reverting on
* overflow (when the input is less than smallest int128 or
* greater than largest int128).
*
* Counterpart to Solidity's `int128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
4172,
4396
]
} | 56,763 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toInt64 | function toInt64(int256 value) internal pure returns (int64) {
require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
return int64(value);
}
| /**
* @dev Returns the downcasted int64 from int256, reverting on
* overflow (when the input is less than smallest int64 or
* greater than largest int64).
*
* Counterpart to Solidity's `int64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
4762,
4980
]
} | 56,764 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toInt32 | function toInt32(int256 value) internal pure returns (int32) {
require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
return int32(value);
}
| /**
* @dev Returns the downcasted int32 from int256, reverting on
* overflow (when the input is less than smallest int32 or
* greater than largest int32).
*
* Counterpart to Solidity's `int32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
5346,
5564
]
} | 56,765 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toInt16 | function toInt16(int256 value) internal pure returns (int16) {
require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
return int16(value);
}
| /**
* @dev Returns the downcasted int16 from int256, reverting on
* overflow (when the input is less than smallest int16 or
* greater than largest int16).
*
* Counterpart to Solidity's `int16` operator.
*
* Requirements:
*
* - input must fit into 16 bits
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
5930,
6148
]
} | 56,766 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toInt8 | function toInt8(int256 value) internal pure returns (int8) {
require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
return int8(value);
}
| /**
* @dev Returns the downcasted int8 from int256, reverting on
* overflow (when the input is less than smallest int8 or
* greater than largest int8).
*
* Counterpart to Solidity's `int8` operator.
*
* Requirements:
*
* - input must fit into 8 bits.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
6510,
6722
]
} | 56,767 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | SafeCast | library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
f... | /**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` ... | NatSpecMultiLine | toInt256 | function toInt256(uint256 value) internal pure returns (int256) {
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
return int256(value);
}
| /**
* @dev Converts an unsigned uint256 into a signed int256.
*
* Requirements:
*
* - input must be less than or equal to maxInt256.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
6902,
7208
]
} | 56,768 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
94,
154
]
} | 56,769 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
237,
310
]
} | 56,770 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
534,
616
]
} | 56,771 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
895,
983
]
} | 56,772 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
1647,
1726
]
} | 56,773 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
2039,
2175
]
} | 56,774 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
100,
159
]
} | 56,775 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
226,
287
]
} | 56,776 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
363,
418
]
} | 56,777 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
775,
880
]
} | 56,778 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
994,
1103
]
} | 56,779 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view virtual override returns (uint8) {
return 9;
}
| /**
* @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 9, imitating the relationship between
* Ether and Wei. This is ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
1736,
1833
]
} | 56,780 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
1893,
2006
]
} | 56,781 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
2064,
2196
]
} | 56,782 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
2404,
2584
]
} | 56,783 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
2642,
2798
]
} | 56,784 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
2940,
3114
]
} | 56,785 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds all... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
3591,
4088
]
} | 56,786 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
4492,
4712
]
} | 56,787 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, c... | /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
5210,
5628
]
} | 56,788 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
... | /**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
6113,
6851
]
} | 56,789 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
7133,
7537
]
} | 56,790 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds ba... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
7865,
8461
]
} | 56,791 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(own... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
8894,
9279
]
} | 56,792 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - wh... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
9874,
10004
]
} | 56,793 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _afterTokenTransfer | function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
| /**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
10603,
10732
]
} | 56,794 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
401,
493
]
} | 56,795 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(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.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
1052,
1151
]
} | 56,796 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
1301,
1498
]
} | 56,797 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingTokenOptionalInterface | interface DividendPayingTokenOptionalInterface {
/// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw.
function withdrawableDividendOf(address _owner) external view r... | /// @title Dividend-Paying Token Optional Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev OPTIONAL functions for a dividend-paying token contract. | NatSpecSingleLine | withdrawableDividendOf | function withdrawableDividendOf(address _owner) external view returns(uint256);
| /// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
255,
337
]
} | 56,798 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingTokenOptionalInterface | interface DividendPayingTokenOptionalInterface {
/// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw.
function withdrawableDividendOf(address _owner) external view r... | /// @title Dividend-Paying Token Optional Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev OPTIONAL functions for a dividend-paying token contract. | NatSpecSingleLine | withdrawnDividendOf | function withdrawnDividendOf(address _owner) external view returns(uint256);
| /// @notice View the amount of dividend in wei that an address has withdrawn.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` has withdrawn. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
547,
626
]
} | 56,799 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingTokenOptionalInterface | interface DividendPayingTokenOptionalInterface {
/// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw.
function withdrawableDividendOf(address _owner) external view r... | /// @title Dividend-Paying Token Optional Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev OPTIONAL functions for a dividend-paying token contract. | NatSpecSingleLine | accumulativeDividendOf | function accumulativeDividendOf(address _owner) external view returns(uint256);
| /// @notice View the amount of dividend in wei that an address has earned in total.
/// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner)
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` has earned in total. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
954,
1036
]
} | 56,800 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingTokenInterface | interface DividendPayingTokenInterface {
/// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw.
function dividendOf(address _owner) external view returns(uint256);
... | /// @title Dividend-Paying Token Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev An interface for a dividend-paying token contract. | NatSpecSingleLine | dividendOf | function dividendOf(address _owner) external view returns(uint256);
| /// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
247,
317
]
} | 56,801 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingTokenInterface | interface DividendPayingTokenInterface {
/// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw.
function dividendOf(address _owner) external view returns(uint256);
... | /// @title Dividend-Paying Token Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev An interface for a dividend-paying token contract. | NatSpecSingleLine | distributeDividends | function distributeDividends() external payable;
| /// @notice Distributes ether to token holders as dividends.
/// @dev SHOULD distribute the paid ether to token holders as dividends.
/// SHOULD NOT directly transfer ether to token holders in this function.
/// MUST emit a `DividendsDistributed` event when the amount of distributed ether is greater than 0. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
643,
694
]
} | 56,802 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingTokenInterface | interface DividendPayingTokenInterface {
/// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw.
function dividendOf(address _owner) external view returns(uint256);
... | /// @title Dividend-Paying Token Interface
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev An interface for a dividend-paying token contract. | NatSpecSingleLine | withdrawDividend | function withdrawDividend() external;
| /// @notice Withdraws the ether distributed to the sender.
/// @dev SHOULD transfer `dividendOf(msg.sender)` wei to `msg.sender`, and `dividendOf(msg.sender)` SHOULD be 0 after the transfer.
/// MUST emit a `DividendWithdrawn` event if the amount of ether transferred is greater than 0. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
994,
1034
]
} | 56,803 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | /// @dev Distributes dividends whenever ether is paid to this contract. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
1839,
1903
]
} | 56,804 | ||
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | distributeDividends | function distributeDividends() public override payable {
require(totalSupply() > 0);
if (msg.value > 0) {
magnifiedDividendPerShare = magnifiedDividendPerShare.add(
(msg.value).mul(magnitude) / totalSupply()
);
emit DividendsDistributed(msg.sender, msg.value);
totalDividendsDistribu... | /// @notice Distributes ether to token holders as dividends.
/// @dev It reverts if the total supply of tokens is 0.
/// It emits the `DividendsDistributed` event if the amount of received ether is greater than 0.
/// About undistributed ether:
/// In each distribution, there is a small amount of ether not distribute... | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
2749,
3145
]
} | 56,805 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | withdrawDividend | function withdrawDividend() public virtual override {
_withdrawDividendOfUser(payable(msg.sender));
}
| /// @notice Withdraws the ether distributed to the sender.
/// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
3311,
3423
]
} | 56,806 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | _withdrawDividendOfUser | function _withdrawDividendOfUser(address payable user) internal returns (uint256) {
uint256 _withdrawableDividend = withdrawableDividendOf(user);
if (_withdrawableDividend > 0) {
withdrawnDividends[user] = withdrawnDividends[user].add(_withdrawableDividend);
emit DividendWithdrawn(user, _withdrawableDiv... | /// @notice Withdraws the ether distributed to the sender.
/// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
3589,
4217
]
} | 56,807 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | dividendOf | function dividendOf(address _owner) public view override returns(uint256) {
return withdrawableDividendOf(_owner);
}
| /// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
4427,
4554
]
} | 56,808 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | withdrawableDividendOf | function withdrawableDividendOf(address _owner) public view override returns(uint256) {
return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]);
}
| /// @notice View the amount of dividend in wei that an address can withdraw.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` can withdraw. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
4762,
4933
]
} | 56,809 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | withdrawnDividendOf | function withdrawnDividendOf(address _owner) public view override returns(uint256) {
return withdrawnDividends[_owner];
}
| /// @notice View the amount of dividend in wei that an address has withdrawn.
/// @param _owner The address of a token holder.
/// @return The amount of dividend in wei that `_owner` has withdrawn. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
5143,
5275
]
} | 56,810 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | accumulativeDividendOf | function accumulativeDividendOf(address _owner) public view override returns(uint256) {
return magnifiedDividendPerShare.mul(balanceOf(_owner)).toInt256()
.add(magnifiedDividendCorrections[_owner]).toUint256() / magnitude;
}
| /// @notice View the amount of dividend in wei that an address has earned in total.
/// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner)
/// = (magnifiedDividendPerShare * balanceOf(_owner) + magnifiedDividendCorrections[_owner]) / magnitude
/// @param _owner The addres... | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
5713,
5955
]
} | 56,811 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | _transfer | function _transfer(address from, address to, uint256 value) internal virtual override {
require(false);
int256 _magCorrection = magnifiedDividendPerShare.mul(value).toInt256();
magnifiedDividendCorrections[from] = magnifiedDividendCorrections[from].add(_magCorrection);
magnifiedDividendCorrections[to] = m... | /// @dev Internal function that transfer tokens from one address to another.
/// Update magnifiedDividendCorrections to keep dividends unchanged.
/// @param from The address to transfer from.
/// @param to The address to transfer to.
/// @param value The amount to be transferred. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
6254,
6642
]
} | 56,812 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | _mint | function _mint(address account, uint256 value) internal override {
super._mint(account, value);
magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
.sub( (magnifiedDividendPerShare.mul(value)).toInt256() );
}
| /// @dev Internal function that mints tokens to an account.
/// Update magnifiedDividendCorrections to keep dividends unchanged.
/// @param account The account that will receive the created tokens.
/// @param value The amount that will be created. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
6905,
7164
]
} | 56,813 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | DividendPayingToken | contract DividendPayingToken is ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
using SafeMath for uint256;
using SignedSafeMath for int256;
using SafeCast for uint256;
using SafeCast for int256;
// With `magnitude`, we can properly distribute dividends even if the amount of... | /// @title Dividend-Paying Token
/// @author Roger Wu (https://github.com/roger-wu)
/// @dev A mintable ERC20 token that allows anyone to pay and distribute ether
/// to token holders as dividends and allows token holders to withdraw their dividends.
/// Reference: the source code of PoWH3D: https://etherscan.io/addr... | NatSpecSingleLine | _burn | function _burn(address account, uint256 value) internal override {
super._burn(account, value);
magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
.add( (magnifiedDividendPerShare.mul(value)).toInt256() );
}
| /// @dev Internal function that burns an amount of the token of a given account.
/// Update magnifiedDividendCorrections to keep dividends unchanged.
/// @param account The account whose tokens will be burnt.
/// @param value The amount that will be burnt. | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
7436,
7695
]
} | 56,814 |
ShibMars | ShibMars.sol | 0x6c267d4a8a8158cd6b0e4edd010b1e4d1dc04f61 | Solidity | ShibMars | contract ShibMars is ERC20, Ownable, SafeToken, LockToken {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
bool private inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
SMARDividendTracker public dividendTra... | excludeFromDividends | function excludeFromDividends(address account) external onlyOwner {
dividendTracker.excludeFromDividends(account);
}
| //this will be used to exclude from dividends the presale smart contract address | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://378a96fc78dda756648d48142e08c63a092f8d3c7acea297a126e650f9a6ce48 | {
"func_code_index": [
9358,
9493
]
} | 56,815 | ||
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
295,
391
]
} | 56,816 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
602,
713
]
} | 56,817 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
1047,
1183
]
} | 56,818 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
1349,
1494
]
} | 56,819 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
2136,
2385
]
} | 56,820 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
2853,
3157
]
} | 56,821 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
4052,
4319
]
} | 56,822 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
| /**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
4666,
4940
]
} | 56,823 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
5169,
5443
]
} | 56,824 | |
TrueFeedBack | openzeppelin-solidity/contracts/token/ERC20/ERC20.sol | 0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788 | 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.2+commit.1df8f40c | bzzr://11171b9cdb89a3d6c17485dd058d2552f68228f9000cfe130384d5430eb277e0 | {
"func_code_index": [
5837,
6101
]
} | 56,825 | |
SaiProxyCreateAndExecute | SaiProxyCreateAndExecute.sol | 0xd64979357160e8146f6e1d805cf20437397bf1ba | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x);
}
function mul(uint x, uint y) internal pure returns (uint z) {
requir... | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
/... | LineComment | rpow | function rpow(uint x, uint n) internal pure returns (uint z) {
z = n % 2 != 0 ? x : RAY;
for (n /= 2; n != 0; n /= 2) {
x = rmul(x, x);
if (n % 2 != 0) {
z = rmul(z, x);
}
}
}
| // This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x *... | LineComment | v0.4.24+commit.e67f0147 | bzzr://4c430618e894df522e3f4e4367eb6d5e27e3010c833491487f809ef2716b3cbe | {
"func_code_index": [
1905,
2177
]
} | 56,826 | |
SaiProxyCreateAndExecute | SaiProxyCreateAndExecute.sol | 0xd64979357160e8146f6e1d805cf20437397bf1ba | Solidity | SaiProxyCreateAndExecute | contract SaiProxyCreateAndExecute is SaiProxy {
// Create a DSProxy instance and open a cup
function createAndOpen(address registry_, address tub_) public returns (address proxy, bytes32 cup) {
proxy = ProxyRegistryInterface(registry_).build(msg.sender);
cup = open(tub_);
TubInter... | createAndOpen | function createAndOpen(address registry_, address tub_) public returns (address proxy, bytes32 cup) {
proxy = ProxyRegistryInterface(registry_).build(msg.sender);
cup = open(tub_);
TubInterface(tub_).give(cup, proxy);
}
| // Create a DSProxy instance and open a cup | LineComment | v0.4.24+commit.e67f0147 | bzzr://4c430618e894df522e3f4e4367eb6d5e27e3010c833491487f809ef2716b3cbe | {
"func_code_index": [
100,
356
]
} | 56,827 | |||
SaiProxyCreateAndExecute | SaiProxyCreateAndExecute.sol | 0xd64979357160e8146f6e1d805cf20437397bf1ba | Solidity | SaiProxyCreateAndExecute | contract SaiProxyCreateAndExecute is SaiProxy {
// Create a DSProxy instance and open a cup
function createAndOpen(address registry_, address tub_) public returns (address proxy, bytes32 cup) {
proxy = ProxyRegistryInterface(registry_).build(msg.sender);
cup = open(tub_);
TubInter... | createOpenAndLock | function createOpenAndLock(address registry_, address tub_) public payable returns (address proxy, bytes32 cup) {
proxy = ProxyRegistryInterface(registry_).build(msg.sender);
cup = open(tub_);
lock(tub_, cup);
TubInterface(tub_).give(cup, proxy);
}
| // Create a DSProxy instance, open a cup, and lock collateral | LineComment | v0.4.24+commit.e67f0147 | bzzr://4c430618e894df522e3f4e4367eb6d5e27e3010c833491487f809ef2716b3cbe | {
"func_code_index": [
426,
720
]
} | 56,828 | |||
SaiProxyCreateAndExecute | SaiProxyCreateAndExecute.sol | 0xd64979357160e8146f6e1d805cf20437397bf1ba | Solidity | SaiProxyCreateAndExecute | contract SaiProxyCreateAndExecute is SaiProxy {
// Create a DSProxy instance and open a cup
function createAndOpen(address registry_, address tub_) public returns (address proxy, bytes32 cup) {
proxy = ProxyRegistryInterface(registry_).build(msg.sender);
cup = open(tub_);
TubInter... | createOpenLockAndDraw | function createOpenLockAndDraw(address registry_, address tub_, uint wad) public payable returns (address proxy, bytes32 cup) {
proxy = ProxyRegistryInterface(registry_).build(msg.sender);
cup = open(tub_);
lockAndDraw(tub_, cup, wad);
TubInterface(tub_).give(cup, proxy);
}
| // Create a DSProxy instance, open a cup, lock collateral, and draw DAI | LineComment | v0.4.24+commit.e67f0147 | bzzr://4c430618e894df522e3f4e4367eb6d5e27e3010c833491487f809ef2716b3cbe | {
"func_code_index": [
800,
1120
]
} | 56,829 | |||
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
399,
491
]
} | 56,830 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(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.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
1050,
1149
]
} | 56,831 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
1299,
1496
]
} | 56,832 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | MerkleProof | library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images... | /**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/crypt... | NatSpecMultiLine | verify | function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
| /**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
357,
552
]
} | 56,833 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | MerkleProof | library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images... | /**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/crypt... | NatSpecMultiLine | processProof | function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current el... | /**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
909,
1615
]
} | 56,834 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryAdd | function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
| /**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
161,
388
]
} | 56,835 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | trySub | function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
| /**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
536,
735
]
} | 56,836 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMul | function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// 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
... | /**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
885,
1393
]
} | 56,837 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryDiv | function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
| /**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
1544,
1744
]
} | 56,838 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMod | function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
1905,
2105
]
} | 56,839 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
2347,
2450
]
} | 56,840 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
| /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
2728,
2831
]
} | 56,841 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
| /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
3085,
3188
]
} | 56,842 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
3484,
3587
]
} | 56,843 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 (consu... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
4049,
4152
]
} | 56,844 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | sub | function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterp... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
4626,
4871
]
} | 56,845 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | div | function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting 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 ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
5364,
5608
]
} | 56,846 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mod | function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
6266,
6510
]
} | 56,847 |
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | TheUltimateSurvivorNFT | contract TheUltimateSurvivorNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
mapping(address => uint256) public whiteListClaims;
uint public constant maxSurvivorWhiteList = 3;
uint public constant maxTokenPurchase = 10;
uint public constant MAX_PRESALE = ... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
1191,
1296
]
} | 56,848 | ||
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | TheUltimateSurvivorNFT | contract TheUltimateSurvivorNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
mapping(address => uint256) public whiteListClaims;
uint public constant maxSurvivorWhiteList = 3;
uint public constant maxTokenPurchase = 10;
uint public constant MAX_PRESALE = ... | mintPresale | function mintPresale(uint numberOfTokens, bytes32[] calldata _merkleProof) public payable {
require(isPresaleActive, "Presale must be active");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, whiteList,leaf), "Invalid Proof");
uint... | // public | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
1949,
3010
]
} | 56,849 | ||
TheUltimateSurvivorNFT | @openzeppelin/contracts/access/Ownable.sol | 0x92421a82ea64eefa1f635cef1350f73f1965f5f0 | Solidity | TheUltimateSurvivorNFT | contract TheUltimateSurvivorNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
mapping(address => uint256) public whiteListClaims;
uint public constant maxSurvivorWhiteList = 3;
uint public constant maxTokenPurchase = 10;
uint public constant MAX_PRESALE = ... | flipReveal | function flipReveal() public onlyOwner {
revealed = !revealed;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://0e85dafd88f0a3c740ac87da3ef04a7abecaf5ada798a5d2c2d60e21998faf3f | {
"func_code_index": [
5066,
5143
]
} | 56,850 | ||
StandardToken | StandardToken.sol | 0xc55c52b147b23c0d0003d93848d11295637d8cff | Solidity | StandardToken | contract StandardToken is StandardStop {
using SafeMath for uint;
mapping(address => uint) balances;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => bool) optionPoolMembers;
mapping(address => uint) optionPoolMemberApproveTotal;
string public name;
strin... | name | function name() public view returns (string _name) {
return name;
}
| // Function to access name of token . | LineComment | v0.4.24+commit.e67f0147 | bzzr://30d9a6bbabbaf8ea19edb2f4c986c847a6946bd6d5142a058bb25210f84f7bad | {
"func_code_index": [
2015,
2101
]
} | 56,851 | |||
StandardToken | StandardToken.sol | 0xc55c52b147b23c0d0003d93848d11295637d8cff | Solidity | StandardToken | contract StandardToken is StandardStop {
using SafeMath for uint;
mapping(address => uint) balances;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => bool) optionPoolMembers;
mapping(address => uint) optionPoolMemberApproveTotal;
string public name;
strin... | symbol | function symbol() public view returns (string _symbol) {
return symbol;
}
| // Function to access symbol of token . | LineComment | v0.4.24+commit.e67f0147 | bzzr://30d9a6bbabbaf8ea19edb2f4c986c847a6946bd6d5142a058bb25210f84f7bad | {
"func_code_index": [
2147,
2239
]
} | 56,852 | |||
StandardToken | StandardToken.sol | 0xc55c52b147b23c0d0003d93848d11295637d8cff | Solidity | StandardToken | contract StandardToken is StandardStop {
using SafeMath for uint;
mapping(address => uint) balances;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => bool) optionPoolMembers;
mapping(address => uint) optionPoolMemberApproveTotal;
string public name;
strin... | decimals | function decimals() public view returns (uint8 _decimals) {
return decimals;
}
| // Function to access decimals of token . | LineComment | v0.4.24+commit.e67f0147 | bzzr://30d9a6bbabbaf8ea19edb2f4c986c847a6946bd6d5142a058bb25210f84f7bad | {
"func_code_index": [
2287,
2384
]
} | 56,853 | |||
StandardToken | StandardToken.sol | 0xc55c52b147b23c0d0003d93848d11295637d8cff | Solidity | StandardToken | contract StandardToken is StandardStop {
using SafeMath for uint;
mapping(address => uint) balances;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => bool) optionPoolMembers;
mapping(address => uint) optionPoolMemberApproveTotal;
string public name;
strin... | totalSupply | function totalSupply() public view returns (uint _totalSupply) {
return totalSupply;
}
| // Function to access total supply of tokens . | LineComment | v0.4.24+commit.e67f0147 | bzzr://30d9a6bbabbaf8ea19edb2f4c986c847a6946bd6d5142a058bb25210f84f7bad | {
"func_code_index": [
2437,
2542
]
} | 56,854 | |||
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @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(uint64 a, uint64 b) internal pure returns (uint64) {
uint64 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
253,
435
]
} | 56,855 |
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @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(uint64 a, uint64 b) internal pure returns (uint64) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
705,
843
]
} | 56,856 |
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @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(uint64 a, uint64 b, string memory errorMessage) internal pure returns (uint64) {
require(b <= a, errorMessage);
uint64 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
1133,
1326
]
} | 56,857 |
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @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(uint64 a, uint64 b) internal pure returns (uint64) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
1572,
2044
]
} | 56,858 |
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @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(uint64 a, uint64 b) internal pure returns (uint64) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
2507,
2641
]
} | 56,859 |
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @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(uint64 a, uint64 b, string memory errorMessage) internal pure returns (uint64) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint64 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
3124,
3470
]
} | 56,860 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.