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
StealthRelayer
contracts/StealthRelayer.sol
0x0a61c2146a7800bdc278833f21ebf56cd660ee2a
Solidity
StealthRelayer
contract StealthRelayer is Governable, CollectableDust, StealthTx, IStealthRelayer { using Address for address; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet internal _jobs; bool public override forceBlockProtection; address public override caller; constructor(address _stealt...
/* * YearnStealthRelayer */
Comment
setPenalty
function setPenalty(uint256 _penalty) external override onlyGovernor { _setPenalty(_penalty); }
// StealthTx: restricted-access
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3634, 3737 ] }
10,100
StealthRelayer
contracts/StealthRelayer.sol
0x0a61c2146a7800bdc278833f21ebf56cd660ee2a
Solidity
StealthRelayer
contract StealthRelayer is Governable, CollectableDust, StealthTx, IStealthRelayer { using Address for address; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet internal _jobs; bool public override forceBlockProtection; address public override caller; constructor(address _stealt...
/* * YearnStealthRelayer */
Comment
setPendingGovernor
function setPendingGovernor(address _pendingGovernor) external override onlyGovernor { _setPendingGovernor(_pendingGovernor); }
// Governable: restricted-access
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3899, 4034 ] }
10,101
StealthRelayer
contracts/StealthRelayer.sol
0x0a61c2146a7800bdc278833f21ebf56cd660ee2a
Solidity
StealthRelayer
contract StealthRelayer is Governable, CollectableDust, StealthTx, IStealthRelayer { using Address for address; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet internal _jobs; bool public override forceBlockProtection; address public override caller; constructor(address _stealt...
/* * YearnStealthRelayer */
Comment
sendDust
function sendDust( address _to, address _token, uint256 _amount ) external override onlyGovernor { _sendDust(_to, _token, _amount); }
// Collectable Dust: restricted-access
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 4173, 4328 ] }
10,102
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
/** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 374, 455 ] }
10,103
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC165
abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interface...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 103, 265 ] }
10,104
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 606, 998 ] }
10,105
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); }
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1928, 2250 ] }
10,106
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 3007, 3187 ] }
10,107
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 3412, 3646 ] }
10,108
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 4016, 4281 ] }
10,109
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract");...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 4532, 5047 ] }
10,110
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 5227, 5431 ] }
10,111
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallRe...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 5618, 6018 ] }
10,112
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 6200, 6405 ] }
10,113
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallR...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 6594, 6995 ] }
10,114
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
verifyCallResult
function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { ...
/** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 7218, 7935 ] }
10,115
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155
interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to...
/** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
balanceOf
function balanceOf(address account, uint256 id) external view returns (uint256);
/** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1463, 1548 ] }
10,116
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155
interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to...
/** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
balanceOfBatch
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);
/** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1751, 1901 ] }
10,117
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155
interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to...
/** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) external;
/** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 2166, 2240 ] }
10,118
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155
interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to...
/** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address account, address operator) external view returns (bool);
/** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 2388, 2483 ] }
10,119
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155
interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to...
/** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external;
/** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must h...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 3063, 3230 ] }
10,120
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155
interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to...
/** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
safeBatchTransferFrom
function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external;
/** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and ret...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 3639, 3835 ] }
10,121
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155MetadataURI
interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
/** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
uri
function uri(uint256 id) external view returns (string memory);
/** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 248, 316 ] }
10,122
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155Receiver
interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(addre...
/** * @dev _Available since v3.1._ */
NatSpecMultiLine
onERC1155Received
function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4);
/** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own func...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 875, 1065 ] }
10,123
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
IERC1155Receiver
interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(addre...
/** * @dev _Available since v3.1._ */
NatSpecMultiLine
onERC1155BatchReceived
function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4);
/** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc1...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 2063, 2282 ] }
10,124
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 684, 999 ] }
10,125
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
uri
function uri(uint256) public view virtual override returns (string memory) { return _uri; }
/** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substrin...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1405, 1515 ] }
10,126
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
balanceOf
function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; }
/** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1661, 1897 ] }
10,127
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
balanceOfBatch
function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); ...
/** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 2058, 2587 ] }
10,128
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC1155-setApprovalForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 2655, 2971 ] }
10,129
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; }
/** * @dev See {IERC1155-isApprovedForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 3038, 3211 ] }
10,130
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFro...
/** * @dev See {IERC1155-safeTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 3278, 3684 ] }
10,131
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
safeBatchTransferFrom
function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor appro...
/** * @dev See {IERC1155-safeBatchTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 3756, 4203 ] }
10,132
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_safeTransferFrom
function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingleton...
/** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implemen...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 4662, 5487 ] }
10,133
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_safeBatchTransferFrom
function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zer...
/** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 5840, 6919 ] }
10,134
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_setURI
function _setURI(string memory newuri) internal virtual { _uri = newuri; }
/** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said U...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 7758, 7851 ] }
10,135
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_mint
function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _as...
/** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * a...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 8247, 8851 ] }
10,136
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_mintBatch
function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operato...
/** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 9202, 9942 ] }
10,137
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_burn
function _burn( address account, uint256 id, uint256 amount ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount)...
/** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 10196, 10876 ] }
10,138
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_burnBatch
function _burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSend...
/** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 11074, 11997 ] }
10,139
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address =>...
/** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {}
/** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` a...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 12948, 13174 ] }
10,140
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155Supply
abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev I...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id a...
NatSpecMultiLine
totalSupply
function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; }
/** * @dev Total amount of tokens in with a given id. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 177, 295 ] }
10,141
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155Supply
abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev I...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id a...
NatSpecMultiLine
exists
function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; }
/** * @dev Indicates weither any token exist with a given id, or not. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 388, 515 ] }
10,142
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155Supply
abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev I...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id a...
NatSpecMultiLine
_mint
function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual override { super._mint(account, id, amount, data); _totalSupply[id] += amount; }
/** * @dev See {ERC1155-_mint}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 570, 817 ] }
10,143
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155Supply
abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev I...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id a...
NatSpecMultiLine
_mintBatch
function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._mintBatch(to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } }
/** * @dev See {ERC1155-_mintBatch}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 877, 1221 ] }
10,144
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155Supply
abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev I...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id a...
NatSpecMultiLine
_burn
function _burn( address account, uint256 id, uint256 amount ) internal virtual override { super._burn(account, id, amount); _totalSupply[id] -= amount; }
/** * @dev See {ERC1155-_burn}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1276, 1489 ] }
10,145
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
Solidity
ERC1155Supply
abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev I...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id a...
NatSpecMultiLine
_burnBatch
function _burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) internal virtual override { super._burnBatch(account, ids, amounts); for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } }
/** * @dev See {ERC1155-_burnBatch}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1549, 1869 ] }
10,146
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
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://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 399, 491 ] }
10,147
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
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://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1050, 1149 ] }
10,148
IBEX
IBEX.sol
0x54cfff9361d9932a91f0c08758082fb2a943c54a
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://224d50f643d1064a89506385bc25897c3e4f7147f9d27a79800c4a91e1616c24
{ "func_code_index": [ 1299, 1496 ] }
10,149
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
Proxy
contract Proxy { /** * @dev Fallback function allowing to perform a delegatecall to the given implementation. * This function will return whatever the implementation call returns */ function () external payable { address _impl = implementation(); require(_impl != address(0)); ...
/** * @title Proxy * @dev Gives the possibility to delegate any call to a foreign implementation. */
NatSpecMultiLine
function () external payable { address _impl = implementation(); require(_impl != address(0)); assembly { let ptr := mload(0x40) calldatacopy(ptr, 0, calldatasize) let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0) let size := returndatasize ret...
/** * @dev Fallback function allowing to perform a delegatecall to the given implementation. * This function will return whatever the implementation call returns */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 203, 717 ] }
10,150
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
Proxy
contract Proxy { /** * @dev Fallback function allowing to perform a delegatecall to the given implementation. * This function will return whatever the implementation call returns */ function () external payable { address _impl = implementation(); require(_impl != address(0)); ...
/** * @title Proxy * @dev Gives the possibility to delegate any call to a foreign implementation. */
NatSpecMultiLine
implementation
function implementation() public view returns (address);
/** * @dev Tells the address of the implementation where every call will be delegated. * @return address of the implementation to which it will be delegated */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 900, 961 ] }
10,151
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev This event will be emitted every time the implementation gets upgraded * @param implementation representing the address of the upgraded implementation */ event Upgraded(address indexed implementation); // Storage position of the address ...
/** * @title UpgradeabilityProxy * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded */
NatSpecMultiLine
implementation
function implementation() public view returns (address impl) { bytes32 position = IMPLEMENTATION_POSITION; assembly { impl := sload(position) } }
/** * @dev Tells the address of the current implementation * @return address of the current implementation */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 671, 866 ] }
10,152
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev This event will be emitted every time the implementation gets upgraded * @param implementation representing the address of the upgraded implementation */ event Upgraded(address indexed implementation); // Storage position of the address ...
/** * @title UpgradeabilityProxy * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded */
NatSpecMultiLine
_setImplementation
function _setImplementation(address _newImplementation) internal { bytes32 position = IMPLEMENTATION_POSITION; assembly { sstore(position, _newImplementation) } }
/** * @dev Sets the address of the current implementation * @param _newImplementation address representing the new implementation to be set */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 1032, 1244 ] }
10,153
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev This event will be emitted every time the implementation gets upgraded * @param implementation representing the address of the upgraded implementation */ event Upgraded(address indexed implementation); // Storage position of the address ...
/** * @title UpgradeabilityProxy * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded */
NatSpecMultiLine
_upgradeTo
function _upgradeTo(address _newImplementation) internal { address currentImplementation = implementation(); require(currentImplementation != _newImplementation); _setImplementation(_newImplementation); emit Upgraded(_newImplementation); }
/** * @dev Upgrades the implementation address * @param _newImplementation representing the address of the new implementation to be set */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 1406, 1691 ] }
10,154
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address pr...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
proxyOwner
function proxyOwner() public view returns (address owner) { bytes32 position = PROXY_OWNER_POSITION; assembly { owner := sload(position) } }
/** * @dev Tells the address of the owner * @return the address of the owner */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 1041, 1231 ] }
10,155
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address pr...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
transferProxyOwnership
function transferProxyOwnership(address _newOwner) public onlyProxyOwner { require(_newOwner != address(0)); _setUpgradeabilityOwner(_newOwner); emit ProxyOwnershipTransferred(proxyOwner(), _newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 1401, 1641 ] }
10,156
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address pr...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
upgradeTo
function upgradeTo(address _implementation) public onlyProxyOwner { _upgradeTo(_implementation); }
/** * @dev Allows the proxy owner to upgrade the current version of the proxy. * @param _implementation representing the address of the new implementation to be set. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 1833, 1950 ] }
10,157
OwnedUpgradeabilityProxy
OwnedUpgradeabilityProxy.sol
0x1c63d19a2d626e91dc67d93037e5716182bed6cd
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address pr...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
_setUpgradeabilityOwner
function _setUpgradeabilityOwner(address _newProxyOwner) internal { bytes32 position = PROXY_OWNER_POSITION; assembly { sstore(position, _newProxyOwner) } }
/** * @dev Sets the address of the owner */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://8e93e0c276776d1e5dce6354943cccd3d58432937c76c6c9a1f18c88c3f6c4af
{ "func_code_index": [ 2013, 2219 ] }
10,158
LionKing
LionKing.sol
0x382edfd4219d0a2039df6164a949cc1cf1515127
Solidity
LionKing
contract LionKing is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; ...
buyTax
function buyTax(address buyer) public view returns (uint) { return ((5 - trader[buyer].buynumber).mul(2)); }
// might return outdated counter if more than 30 mins
LineComment
v0.8.6+commit.11564f7e
None
ipfs://7ae1d656198d067875ab2a93a03a1b6534204dd2d445157f5402ac0eb6d9a977
{ "func_code_index": [ 15691, 15818 ] }
10,159
Airdrop
Airdrop.sol
0x50deb51bdb3f89d7a1536dc2a60a9efcf85636d3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https:...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint2...
/** * @dev Multiplies two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://8fe170db2b7a682ac280a4f112047f8bd3bad001c14cce8f9fa998febcfd6492
{ "func_code_index": [ 98, 496 ] }
10,160
Airdrop
Airdrop.sol
0x50deb51bdb3f89d7a1536dc2a60a9efcf85636d3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https:...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://8fe170db2b7a682ac280a4f112047f8bd3bad001c14cce8f9fa998febcfd6492
{ "func_code_index": [ 618, 902 ] }
10,161
Airdrop
Airdrop.sol
0x50deb51bdb3f89d7a1536dc2a60a9efcf85636d3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https:...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://8fe170db2b7a682ac280a4f112047f8bd3bad001c14cce8f9fa998febcfd6492
{ "func_code_index": [ 1027, 1166 ] }
10,162
Airdrop
Airdrop.sol
0x50deb51bdb3f89d7a1536dc2a60a9efcf85636d3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https:...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://8fe170db2b7a682ac280a4f112047f8bd3bad001c14cce8f9fa998febcfd6492
{ "func_code_index": [ 1241, 1380 ] }
10,163
Airdrop
Airdrop.sol
0x50deb51bdb3f89d7a1536dc2a60a9efcf85636d3
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https:...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
MIT
ipfs://8fe170db2b7a682ac280a4f112047f8bd3bad001c14cce8f9fa998febcfd6492
{ "func_code_index": [ 1525, 1642 ] }
10,164
KickLottery
contracts/IERC20Burnable.sol
0xa00292d18e44f6ed864eb2e1865875e3b5c10290
Solidity
IERC20Burnable
interface IERC20Burnable is IERC20 { /** * @dev Destroys `amount` tokens from the caller. */ function burn(uint256 amount) external; /** * @dev Returns `decimal` of token. */ function decimals() external view returns (uint8); }
/** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
burn
function burn(uint256 amount) external;
/** * @dev Destroys `amount` tokens from the caller. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 107, 150 ] }
10,165
KickLottery
contracts/IERC20Burnable.sol
0xa00292d18e44f6ed864eb2e1865875e3b5c10290
Solidity
IERC20Burnable
interface IERC20Burnable is IERC20 { /** * @dev Destroys `amount` tokens from the caller. */ function burn(uint256 amount) external; /** * @dev Returns `decimal` of token. */ function decimals() external view returns (uint8); }
/** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
decimals
function decimals() external view returns (uint8);
/** * @dev Returns `decimal` of token. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 208, 262 ] }
10,166
KickLottery
erc-payable-token/contracts/token/ERC1363/IERC1363Spender.sol
0xa00292d18e44f6ed864eb2e1865875e3b5c10290
Solidity
IERC1363Spender
interface IERC1363Spender { /** * @notice Handle the approval of ERC1363 tokens * @dev Any ERC1363 smart contract calls this function on the recipient * after an `approve`. This function MAY throw to revert and reject the * approval. Return of other than the magic value MUST result in the *...
/** * @title IERC1363Spender Interface * @author Vittorio Minacori (https://github.com/vittominacori) * @dev Interface for any contract that wants to support approveAndCall * from ERC1363 token contracts as defined in * https://eips.ethereum.org/EIPS/eip-1363 */
NatSpecMultiLine
onApprovalReceived
function onApprovalReceived( address sender, uint256 amount, bytes calldata data ) external returns (bytes4);
/** * @notice Handle the approval of ERC1363 tokens * @dev Any ERC1363 smart contract calls this function on the recipient * after an `approve`. This function MAY throw to revert and reject the * approval. Return of other than the magic value MUST result in the * transaction being reverted. * Note: the token cont...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 731, 872 ] }
10,167
KyberBancorReserve
IBancorNetwork.sol
0x053aa84fcc676113a57e0ebb0bd1913839874be4
Solidity
IBancorNetwork
contract IBancorNetwork { // to get rate, return dest amount + fee amount function getReturnByPath(IERC20[] calldata _path, uint256 _amount) external view returns (uint256, uint256); // to convert ETH to token, return dest amount function convert2( IERC20[] calldata _path, uint256 _amoun...
getReturnByPath
function getReturnByPath(IERC20[] calldata _path, uint256 _amount) external view returns (uint256, uint256);
// to get rate, return dest amount + fee amount
LineComment
v0.5.11+commit.c082d0b4
None
bzzr://ee7ab861f123518947f4857f95e8c7b30ebf70cc3008656c00de76191b6146d3
{ "func_code_index": [ 78, 190 ] }
10,168
KyberBancorReserve
IBancorNetwork.sol
0x053aa84fcc676113a57e0ebb0bd1913839874be4
Solidity
IBancorNetwork
contract IBancorNetwork { // to get rate, return dest amount + fee amount function getReturnByPath(IERC20[] calldata _path, uint256 _amount) external view returns (uint256, uint256); // to convert ETH to token, return dest amount function convert2( IERC20[] calldata _path, uint256 _amoun...
convert2
function convert2( IERC20[] calldata _path, uint256 _amount, uint256 _minReturn, address _affiliateAccount, uint256 _affiliateFee ) external payable returns (uint256);
// to convert ETH to token, return dest amount
LineComment
v0.5.11+commit.c082d0b4
None
bzzr://ee7ab861f123518947f4857f95e8c7b30ebf70cc3008656c00de76191b6146d3
{ "func_code_index": [ 242, 457 ] }
10,169
KyberBancorReserve
IBancorNetwork.sol
0x053aa84fcc676113a57e0ebb0bd1913839874be4
Solidity
IBancorNetwork
contract IBancorNetwork { // to get rate, return dest amount + fee amount function getReturnByPath(IERC20[] calldata _path, uint256 _amount) external view returns (uint256, uint256); // to convert ETH to token, return dest amount function convert2( IERC20[] calldata _path, uint256 _amoun...
claimAndConvert2
function claimAndConvert2( IERC20[] calldata _path, uint256 _amount, uint256 _minReturn, address _affiliateAccount, uint256 _affiliateFee ) external returns (uint256);
// to convert token to ETH, return dest amount
LineComment
v0.5.11+commit.c082d0b4
None
bzzr://ee7ab861f123518947f4857f95e8c7b30ebf70cc3008656c00de76191b6146d3
{ "func_code_index": [ 510, 725 ] }
10,170
KyberBancorReserve
WithdrawableV5.sol
0x053aa84fcc676113a57e0ebb0bd1913839874be4
Solidity
Withdrawable
contract Withdrawable is PermissionGroups { event TokenWithdraw(IERC20 token, uint amount, address sendTo); /** * @dev Withdraw all IERC20 compatible tokens * @param token IERC20 The address of the token contract */ function withdrawToken(IERC20 token, uint amount, address sendTo) external ...
withdrawToken
function withdrawToken(IERC20 token, uint amount, address sendTo) external onlyAdmin { require(token.transfer(sendTo, amount)); emit TokenWithdraw(token, amount, sendTo); }
/** * @dev Withdraw all IERC20 compatible tokens * @param token IERC20 The address of the token contract */
NatSpecMultiLine
v0.5.11+commit.c082d0b4
None
bzzr://ee7ab861f123518947f4857f95e8c7b30ebf70cc3008656c00de76191b6146d3
{ "func_code_index": [ 241, 437 ] }
10,171
KyberBancorReserve
WithdrawableV5.sol
0x053aa84fcc676113a57e0ebb0bd1913839874be4
Solidity
Withdrawable
contract Withdrawable is PermissionGroups { event TokenWithdraw(IERC20 token, uint amount, address sendTo); /** * @dev Withdraw all IERC20 compatible tokens * @param token IERC20 The address of the token contract */ function withdrawToken(IERC20 token, uint amount, address sendTo) external ...
withdrawEther
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin { sendTo.transfer(amount); emit EtherWithdraw(amount, sendTo); }
/** * @dev Withdraw Ethers */
NatSpecMultiLine
v0.5.11+commit.c082d0b4
None
bzzr://ee7ab861f123518947f4857f95e8c7b30ebf70cc3008656c00de76191b6146d3
{ "func_code_index": [ 538, 705 ] }
10,172
iBit
iBit.sol
0x9bfae0637c387bf8eff35d597684908df1a441bf
Solidity
iBit
contract iBit { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => u...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != address(0x0)); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value >= balan...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://01310c9f2a5d7c73d0fae549125b5d603ce0b89f187766ad2d8a6164d674c577
{ "func_code_index": [ 1643, 2500 ] }
10,173
iBit
iBit.sol
0x9bfae0637c387bf8eff35d597684908df1a441bf
Solidity
iBit
contract iBit { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => u...
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { _transfer(msg.sender, _to, _value); return true; }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://01310c9f2a5d7c73d0fae549125b5d603ce0b89f187766ad2d8a6164d674c577
{ "func_code_index": [ 2706, 2863 ] }
10,174
iBit
iBit.sol
0x9bfae0637c387bf8eff35d597684908df1a441bf
Solidity
iBit
contract iBit { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => u...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` on behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://01310c9f2a5d7c73d0fae549125b5d603ce0b89f187766ad2d8a6164d674c577
{ "func_code_index": [ 3138, 3439 ] }
10,175
iBit
iBit.sol
0x9bfae0637c387bf8eff35d597684908df1a441bf
Solidity
iBit
contract iBit { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => u...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens on your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://01310c9f2a5d7c73d0fae549125b5d603ce0b89f187766ad2d8a6164d674c577
{ "func_code_index": [ 3703, 3933 ] }
10,176
iBit
iBit.sol
0x9bfae0637c387bf8eff35d597684908df1a441bf
Solidity
iBit
contract iBit { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => u...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, address(this), _extraData); return true...
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://01310c9f2a5d7c73d0fae549125b5d603ce0b89f187766ad2d8a6164d674c577
{ "func_code_index": [ 4327, 4695 ] }
10,177
iBit
iBit.sol
0x9bfae0637c387bf8eff35d597684908df1a441bf
Solidity
iBit
contract iBit { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => u...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender,...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://01310c9f2a5d7c73d0fae549125b5d603ce0b89f187766ad2d8a6164d674c577
{ "func_code_index": [ 4865, 5244 ] }
10,178
iBit
iBit.sol
0x9bfae0637c387bf8eff35d597684908df1a441bf
Solidity
iBit
contract iBit { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => u...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://01310c9f2a5d7c73d0fae549125b5d603ce0b89f187766ad2d8a6164d674c577
{ "func_code_index": [ 5502, 6118 ] }
10,179
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
fromInt
function fromInt (int256 x) internal pure returns (int128) { require (x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF); return int128 (x << 64); }
/** * Convert signed 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x signed 256-bit integer number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 570, 736 ] }
10,180
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
toInt
function toInt (int128 x) internal pure returns (int64) { return int64 (x >> 64); }
/** * Convert signed 64.64 fixed point number into signed 64-bit integer number * rounding down. * * @param x signed 64.64-bit fixed point number * @return signed 64-bit integer number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 954, 1048 ] }
10,181
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
fromUInt
function fromUInt (uint256 x) internal pure returns (int128) { require (x <= 0x7FFFFFFFFFFFFFFF); return int128 (x << 64); }
/** * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 1283, 1423 ] }
10,182
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
toUInt
function toUInt (int128 x) internal pure returns (uint64) { require (x >= 0); return uint64 (x >> 64); }
/** * Convert signed 64.64 fixed point number into unsigned 64-bit integer * number rounding down. Revert on underflow. * * @param x signed 64.64-bit fixed point number * @return unsigned 64-bit integer number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 1667, 1787 ] }
10,183
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
from128x128
function from128x128 (int256 x) internal pure returns (int128) { int256 result = x >> 64; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); }
/** * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point * number rounding down. Revert on overflow. * * @param x signed 128.128-bin fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 2044, 2234 ] }
10,184
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
to128x128
function to128x128 (int128 x) internal pure returns (int256) { return int256 (x) << 64; }
/** * Convert signed 64.64 fixed point number into signed 128.128 fixed point * number. * * @param x signed 64.64-bit fixed point number * @return signed 128.128 fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 2448, 2548 ] }
10,185
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
add
function add (int128 x, int128 y) internal pure returns (int128) { int256 result = int256(x) + y; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); }
/** * Calculate x + y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 2767, 2965 ] }
10,186
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
sub
function sub (int128 x, int128 y) internal pure returns (int128) { int256 result = int256(x) - y; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); }
/** * Calculate x - y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 3184, 3382 ] }
10,187
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
mul
function mul (int128 x, int128 y) internal pure returns (int128) { int256 result = int256(x) * y >> 64; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); }
/** * Calculate x * y rounding down. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 3615, 3819 ] }
10,188
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
muli
function muli (int128 x, int256 y) internal pure returns (int256) { if (x == MIN_64x64) { require (y >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF && y <= 0x1000000000000000000000000000000000000000000000000); return -y << 63; } else { bool negativeResult = false; if (x < 0) { ...
/** * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point * number and y is signed 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y signed 256-bit integer number * @return signed 256-bit integer number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 4133, 5125 ] }
10,189
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
mulu
function mulu (int128 x, uint256 y) internal pure returns (uint256) { if (y == 0) return 0; require (x >= 0); uint256 lo = (uint256 (x) * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64; uint256 hi = uint256 (x) * (y >> 128); require (hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); hi...
/** * Calculate x * y rounding down, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y unsigned 256-bit integer number * @return unsigned 256-bit integer number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 5437, 5909 ] }
10,190
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
div
function div (int128 x, int128 y) internal pure returns (int128) { require (y != 0); int256 result = (int256 (x) << 64) / y; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); }
/** * Calculate x / y rounding towards zero. Revert on overflow or when y is * zero. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 6174, 6404 ] }
10,191
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
divi
function divi (int256 x, int256 y) internal pure returns (int128) { require (y != 0); bool negativeResult = false; if (x < 0) { x = -x; // We rely on overflow behavior here negativeResult = true; } if (y < 0) { y = -y; // We rely on overflow behavior here negativeResult = !negativeR...
/** * Calculate x / y rounding towards zero, where x and y are signed 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x signed 256-bit integer number * @param y signed 256-bit integer number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 6707, 7473 ] }
10,192
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
divu
function divu (uint256 x, uint256 y) internal pure returns (int128) { require (y != 0); uint128 result = divuu (x, y); require (result <= uint128 (MAX_64x64)); return int128 (result); }
/** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 7782, 7993 ] }
10,193
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
neg
function neg (int128 x) internal pure returns (int128) { require (x != MIN_64x64); return -x; }
/** * Calculate -x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 8158, 8269 ] }
10,194
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
abs
function abs (int128 x) internal pure returns (int128) { require (x != MIN_64x64); return x < 0 ? -x : x; }
/** * Calculate |x|. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 8435, 8558 ] }
10,195
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
inv
function inv (int128 x) internal pure returns (int128) { require (x != 0); int256 result = int256 (0x100000000000000000000000000000000) / x; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); }
/** * Calculate 1 / x rounding towards zero. Revert on overflow or when x is * zero. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 8772, 9018 ] }
10,196
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
avg
function avg (int128 x, int128 y) internal pure returns (int128) { return int128 ((int256 (x) + int256 (y)) >> 1); }
/** * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 9273, 9400 ] }
10,197
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
gavg
function gavg (int128 x, int128 y) internal pure returns (int128) { int256 m = int256 (x) * int256 (y); require (m >= 0); require (m < 0x4000000000000000000000000000000000000000000000000000000000000000); return int128 (sqrtu (uint256 (m), uint256 (x) + uint256 (y) >> 1)); }
/** * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down. * Revert on overflow or in case x * y is negative. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 9709, 10018 ] }
10,198
Component
Component.sol
0x4ab3d420504cfb1188ce3b805e9c3c32c2531f2e
Solidity
ABDKMath64x64
library ABDKMath64x64 { /** * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /** * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFF...
/** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * nee...
NatSpecMultiLine
pow
function pow (int128 x, uint256 y) internal pure returns (int128) { uint256 absoluteResult; bool negativeResult = false; if (x >= 0) { absoluteResult = powu (uint256 (x) << 63, y); } else { // We rely on overflow behavior here absoluteResult = powu (uint256 (uint128 (-x)) << 63, y); nega...
/** * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y uint256 value * @return signed 64.64-bit fixed point number */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://44f9869efe6cff5c5f543e2191ede97c1cdac7b3bccb186e17921ad8921ec0be
{ "func_code_index": [ 10322, 11071 ] }
10,199