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
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 3931, 4066 ] }
1,100
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 4546, 4717 ] }
1,101
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 606, 1230 ] }
1,102
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 2160, 2562 ] }
1,103
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 3318, 3496 ] }
1,104
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 3721, 3922 ] }
1,105
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 4292, 4523 ] }
1,106
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 4774, 5095 ] }
1,107
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 566, 650 ] }
1,108
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 1209, 1362 ] }
1,109
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 1512, 1761 ] }
1,110
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
SSPARK
contract SSPARK is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bo...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 8478, 8512 ] }
1,111
SSPARK
SSPARK.sol
0xed90c424a1044479e24d710d85ca0cb4d0f34b00
Solidity
SSPARK
contract SSPARK is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bo...
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.6.12+commit.27d51765
Unlicense
ipfs://98e00f45558a48b89c992117ea1ba1710b63ee655bd60c94b4191f8634ba9986
{ "func_code_index": [ 17290, 18129 ] }
1,112
ALCXRewarder
contracts/libraries/boring/BoringOwnable.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringOwnable
contract BoringOwnable is BoringOwnableData { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /// @notice `owner` defaults to msg.sender on construction. constructor() public { owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /// @notice Transfers ...
transferOwnership
function transferOwnership( address newOwner, bool direct, bool renounce ) public onlyOwner { if (direct) { // Checks require(newOwner != address(0) || renounce, "BoringOwnable::transferOwnership: zero address"); // Effects emit OwnershipTransferred(owner, newOwner); owner = newOwner; pendingOwner = ad...
/// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner. /// Can only be invoked by the current `owner`. /// @param newOwner Address of the new owner. /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`. /// @para...
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 735, 1136 ] }
1,113
ALCXRewarder
contracts/libraries/boring/BoringOwnable.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringOwnable
contract BoringOwnable is BoringOwnableData { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /// @notice `owner` defaults to msg.sender on construction. constructor() public { owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /// @notice Transfers ...
claimOwnership
function claimOwnership() public { address _pendingOwner = pendingOwner; // Checks require(msg.sender == _pendingOwner, "BoringOwnable::claimOwnership: caller != pending owner"); // Effects emit OwnershipTransferred(owner, _pendingOwner); owner = _pendingOwner; pendingOwner = address(0); }
/// @notice Needs to be called by `pendingOwner` to claim ownership.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1208, 1516 ] }
1,114
ALCXRewarder
contracts/libraries/boring/BoringERC20.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringERC20
library BoringERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) bytes4 private constant SIG_TR...
// solhint-disable avoid-low-level-calls
LineComment
returnDataToString
function returnDataToString(bytes memory data) internal pure returns (string memory) { if (data.length >= 64) { return abi.decode(data, (string)); } else if (data.length == 32) { uint8 i = 0; while (i < 32 && data[i] != 0) { i++; } bytes memory bytesArray = new bytes(i); for (i = 0; i < 32 && data[i] !...
// transferFrom(address,address,uint256)
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 388, 828 ] }
1,115
ALCXRewarder
contracts/libraries/boring/BoringERC20.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringERC20
library BoringERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) bytes4 private constant SIG_TR...
// solhint-disable avoid-low-level-calls
LineComment
safeSymbol
function safeSymbol(IERC20 token) internal view returns (string memory) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_SYMBOL)); return success ? returnDataToString(data) : "???"; }
/// @notice Provides a safe ERC20.symbol version which returns '???' as fallback string. /// @param token The address of the ERC-20 token contract. /// @return (string) Token symbol.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1016, 1247 ] }
1,116
ALCXRewarder
contracts/libraries/boring/BoringERC20.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringERC20
library BoringERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) bytes4 private constant SIG_TR...
// solhint-disable avoid-low-level-calls
LineComment
safeName
function safeName(IERC20 token) internal view returns (string memory) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_NAME)); return success ? returnDataToString(data) : "???"; }
/// @notice Provides a safe ERC20.name version which returns '???' as fallback string. /// @param token The address of the ERC-20 token contract. /// @return (string) Token name.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1431, 1658 ] }
1,117
ALCXRewarder
contracts/libraries/boring/BoringERC20.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringERC20
library BoringERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) bytes4 private constant SIG_TR...
// solhint-disable avoid-low-level-calls
LineComment
safeDecimals
function safeDecimals(IERC20 token) internal view returns (uint8) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_DECIMALS)); return success && data.length == 32 ? abi.decode(data, (uint8)) : 18; }
/// @notice Provides a safe ERC20.decimals version which returns '18' as fallback value. /// @param token The address of the ERC-20 token contract. /// @return (uint8) Token decimals.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1847, 2093 ] }
1,118
ALCXRewarder
contracts/libraries/boring/BoringERC20.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringERC20
library BoringERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) bytes4 private constant SIG_TR...
// solhint-disable avoid-low-level-calls
LineComment
safeTransfer
function safeTransfer( IERC20 token, address to, uint256 amount ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER, to, amount)); require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20::safeTransfer: transfer failed"); }
/// @notice Provides a safe ERC20.transfer version for different ERC-20 implementations. /// Reverts on a failed transfer. /// @param token The address of the ERC-20 token. /// @param to Transfer tokens to. /// @param amount The token amount.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2343, 2655 ] }
1,119
ALCXRewarder
contracts/libraries/boring/BoringERC20.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
BoringERC20
library BoringERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) bytes4 private constant SIG_TR...
// solhint-disable avoid-low-level-calls
LineComment
safeTransferFrom
function safeTransferFrom( IERC20 token, address from, address to, uint256 amount ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER_FROM, from, to, amount)); require( success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20::safeTransferF...
/// @notice Provides a safe ERC20.transferFrom version for different ERC-20 implementations. /// Reverts on a failed transfer. /// @param token The address of the ERC-20 token. /// @param from Transfer tokens from. /// @param to Transfer tokens to. /// @param amount The token amount.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2948, 3308 ] }
1,120
ALCXRewarder
contracts/libraries/Domain.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Domain
contract Domain { bytes32 private constant DOMAIN_SEPARATOR_SIGNATURE_HASH = keccak256("EIP712Domain(uint256 chainId,address verifyingContract)"); // See https://eips.ethereum.org/EIPS/eip-191 string private constant EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA = "\x19\x01"; // solhint-disable var-name-mixedcase by...
// solhint-disable no-inline-assembly
LineComment
_calculateDomainSeparator
function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) { return keccak256(abi.encode(DOMAIN_SEPARATOR_SIGNATURE_HASH, chainId, address(this))); }
/// @dev Calculate the DOMAIN_SEPARATOR
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 459, 636 ] }
1,121
ALCXRewarder
contracts/libraries/Domain.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Domain
contract Domain { bytes32 private constant DOMAIN_SEPARATOR_SIGNATURE_HASH = keccak256("EIP712Domain(uint256 chainId,address verifyingContract)"); // See https://eips.ethereum.org/EIPS/eip-191 string private constant EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA = "\x19\x01"; // solhint-disable var-name-mixedcase by...
// solhint-disable no-inline-assembly
LineComment
_domainSeparator
function _domainSeparator() internal view returns (bytes32) { uint256 chainId; assembly { chainId := chainid() } return chainId == DOMAIN_SEPARATOR_CHAIN_ID ? _DOMAIN_SEPARATOR : _calculateDomainSeparator(chainId); }
// It's named internal to allow making it public from the contract that uses it by creating a simple view function // with the desired public name, such as DOMAIN_SEPARATOR or domainSeparator. // solhint-disable-next-line func-name-mixedcase
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 1095, 1324 ] }
1,122
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
update
function update(Data storage _data, Context storage _ctx) internal { _data.accumulatedRewardWeight = _data.getUpdatedAccumulatedRewardWeight(_ctx); _data.lastUpdatedBlock = block.number; }
/// @dev Updates the pool. /// /// @param _ctx the pool context.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 493, 687 ] }
1,123
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
getRewardRate
function getRewardRate(Data storage _data, Context storage _ctx) internal view returns (uint256) { // console.log("get reward rate"); // console.log(uint(_data.rewardWeight)); // console.log(uint(_ctx.totalRewardWeight)); // console.log(uint(_ctx.rewardRate)); return _ctx.rewardRate.mul(_data.rewardWeight).div(_ct...
/// @dev Gets the rate at which the pool will distribute rewards to stakers. /// /// @param _ctx the pool context. /// /// @return the reward rate of the pool in tokens per block.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 874, 1224 ] }
1,124
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
getUpdatedAccumulatedRewardWeight
function getUpdatedAccumulatedRewardWeight(Data storage _data, Context storage _ctx) internal view returns (FixedPointMath.uq192x64 memory) { if (_data.totalDeposited == 0) { return _data.accumulatedRewardWeight; } uint256 _elapsedTime = block.number.sub(_data.lastUpdatedBlock); if (_elapsedTime == 0) { ret...
/// @dev Gets the accumulated reward weight of a pool. /// /// @param _ctx the pool context. /// /// @return the accumulated reward weight.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1371, 2116 ] }
1,125
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
push
function push(List storage _self, Data memory _element) internal { _self.elements.push(_element); }
/// @dev Adds an element to the list. /// /// @param _element the element to add.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2203, 2306 ] }
1,126
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
get
function get(List storage _self, uint256 _index) internal view returns (Data storage) { return _self.elements[_index]; }
/// @dev Gets an element from the list. /// /// @param _index the index in the list. /// /// @return the element at the specified index.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2450, 2574 ] }
1,127
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
last
function last(List storage _self) internal view returns (Data storage) { return _self.elements[_self.lastIndex()]; }
/// @dev Gets the last element in the list. /// /// This function will revert if there are no elements in the list. ///ck /// @return the last element in the list.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2745, 2865 ] }
1,128
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
lastIndex
function lastIndex(List storage _self) internal view returns (uint256) { uint256 _length = _self.length(); return _length.sub(1, "Pool.List: list is empty"); }
/// @dev Gets the index of the last element in the list. /// /// This function will revert if there are no elements in the list. /// /// @return the index of the last element.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3048, 3213 ] }
1,129
ALCXRewarder
contracts/libraries/pools/Pool.sol
0xd101479ce045b903ae14ec6afa7a11171afb5dfa
Solidity
Pool
library Pool { using FixedPointMath for FixedPointMath.uq192x64; using Pool for Pool.Data; using Pool for Pool.List; using SafeMath for uint256; struct Context { uint256 rewardRate; uint256 totalRewardWeight; } struct Data { IERC20 token; uint256 totalDeposited; uint256 rewardWeight; FixedPointMath...
/// @title Pool /// /// @dev A library which provides the Pool data struct and associated functions.
NatSpecSingleLine
length
function length(List storage _self) internal view returns (uint256) { return _self.elements.length; }
/// @dev Gets the number of elements in the list. /// /// @return the number of elements.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3308, 3413 ] }
1,130
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 180, 248 ] }
1,131
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { if (newOwner != address(0)) { owner = newOwner; } }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 592, 748 ] }
1,132
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
BasicToken
contract BasicToken is Ownable, ERC20Basic { using SafeMath for uint; mapping(address => uint) public balances; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; /** * @dev Fix for the ERC20 sho...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) { uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } uint sendAmount = _value.sub(fee); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] =...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 626, 1204 ] }
1,133
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
BasicToken
contract BasicToken is Ownable, ERC20Basic { using SafeMath for uint; mapping(address => uint) public balances; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; /** * @dev Fix for the ERC20 sho...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public constant returns (uint balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 1417, 1538 ] }
1,134
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @par...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint _value) public onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; uint fee = (_valu...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 451, 1357 ] }
1,135
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @par...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://git...
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 1599, 2177 ] }
1,136
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @par...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public constant returns (uint remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens than an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 2505, 2655 ] }
1,137
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 513, 604 ] }
1,138
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 688, 781 ] }
1,139
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
BlackList
contract BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) /////// function getBlackListStatus(address _maker) external constant returns (bool) { return isBlackListed[_maker]; } function getOwner...
getBlackListStatus
function getBlackListStatus(address _maker) external constant returns (bool) { return isBlackListed[_maker]; }
/////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) ///////
NatSpecSingleLine
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 167, 296 ] }
1,140
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
UpgradedStandardToken
contract UpgradedStandardToken is StandardToken{ // those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address function transferByLegacy(address from, address to, uint value) public; function transferFromByLegacy(address sender, address from, addres...
transferByLegacy
function transferByLegacy(address from, address to, uint value) public;
// those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 173, 249 ] }
1,141
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
QuintetToken
function QuintetToken(uint _initialSupply, string _name, string _symbol, uint _decimals) public { _totalSupply = _initialSupply; name = _name; symbol = _symbol; decimals = _decimals; balances[owner] = _initialSupply; deprecated = false; }
// The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the contract // @param _name Token Name // @param _symbol Token symbol // @param _decimals Token decimals
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 507, 809 ] }
1,142
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
transfer
function transfer(address _to, uint _value) public whenNotPaused { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 889, 1220 ] }
1,143
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
transferFrom
function transferFrom(address _from, address _to, uint _value) public whenNotPaused { require(!isBlackListed[_from]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value); } else { return super.transferFrom(_from, _to, _val...
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 1300, 1667 ] }
1,144
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
balanceOf
function balanceOf(address who) public constant returns (uint) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).balanceOf(who); } else { return super.balanceOf(who); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 1747, 1996 ] }
1,145
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
approve
function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 2076, 2383 ] }
1,146
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
allowance
function allowance(address _owner, address _spender) public constant returns (uint remaining) { if (deprecated) { return StandardToken(upgradedAddress).allowance(_owner, _spender); } else { return super.allowance(_owner, _spender); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 2463, 2761 ] }
1,147
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
deprecate
function deprecate(address _upgradedAddress) public onlyOwner { deprecated = true; upgradedAddress = _upgradedAddress; Deprecate(_upgradedAddress); }
// deprecate current contract in favour of a new one
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 2822, 3008 ] }
1,148
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
totalSupply
function totalSupply() public constant returns (uint) { if (deprecated) { return StandardToken(upgradedAddress).totalSupply(); } else { return _totalSupply; } }
// deprecate current contract if favour of a new one
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 3069, 3292 ] }
1,149
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
issue
function issue(uint amount) public onlyOwner { require(_totalSupply + amount > _totalSupply); require(balances[owner] + amount > balances[owner]); balances[owner] += amount; _totalSupply += amount; Issue(amount); }
// Issue a new amount of tokens // these tokens are deposited into the owner address // // @param _amount Number of tokens to be issued
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 3451, 3722 ] }
1,150
QuintetToken
QuintetToken.sol
0x542f7d4d402398728374a2a89173d5643a34eb60
Solidity
QuintetToken
contract QuintetToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the...
redeem
function redeem(uint amount) public onlyOwner { require(_totalSupply >= amount); require(balances[owner] >= amount); _totalSupply -= amount; balances[owner] -= amount; Redeem(amount); }
// Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued
LineComment
v0.4.17+commit.bdeb9e52
None
bzzr://0d66fb51e775e7cd8700c615abd34bfe72197c4153676569bcd7332a24a0826a
{ "func_code_index": [ 3948, 4190 ] }
1,151
KeeperIncentive
contracts/core/utils/ContractRegistryAccess.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ContractRegistryAccess
abstract contract ContractRegistryAccess { IContractRegistry internal _contractRegistry; constructor(IContractRegistry contractRegistry_) { _contractRegistry = contractRegistry_; } /** * @notice Get a contract address by bytes32 name * @param _name bytes32 contract name * @dev contract name sh...
/** * @notice Provides an internal `_getContract` helper function to access the `ContractRegistry` */
NatSpecMultiLine
_getContract
function _getContract(bytes32 _name) internal view virtual returns (address) { return _contractRegistry.getContract(_name); }
/** * @notice Get a contract address by bytes32 name * @param _name bytes32 contract name * @dev contract name should be a keccak256 hash of the name string, e.g. `keccak256("ContractName")` * @return contract address */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 435, 568 ] }
1,152
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; uint balanceOfParticipant; uint lockedAmount; uint allowedAmount; bool lockupIsActive = false; uint256 lockupStartTime; // balances for each address mapping(address => uint256) balances; struct Lockup { uint256 lockupAmount; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _amount) public override returns (bool success) { require(_to != msg.sender, "Cannot transfer to self"); require(_to != address(this), "Cannot transfer to Contract"); require(_to != address(0), "Cannot transfer to 0x0"); require( balances[msg.sender] >= _amount && _amo...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _amount The amount to be transferred. */
NatSpecMultiLine
v0.7.1+commit.f4a555be
{ "func_code_index": [ 1425, 2155 ] }
1,153
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; uint balanceOfParticipant; uint lockedAmount; uint allowedAmount; bool lockupIsActive = false; uint256 lockupStartTime; // balances for each address mapping(address => uint256) balances; struct Lockup { uint256 lockupAmount; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public override view returns (uint256 balance) { return balances[_owner]; }
/* * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
Comment
v0.7.1+commit.f4a555be
{ "func_code_index": [ 2354, 2472 ] }
1,154
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _amount) public override returns (bool success) { require(_from != msg.sender, "Cannot transfer from self, use transfer function instead"); require(_from != address(this) && _to != address(this), "Cannot transfer from or to Contract"); require(_to != addre...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _amount uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.7.1+commit.f4a555be
{ "func_code_index": [ 415, 1343 ] }
1,155
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _amount) public override returns (bool success) { require(_spender != msg.sender, "Cannot approve an allowance to self"); require(_spender != address(this), "Cannot approve contract an allowance"); require(_spender != address(0), "Cannot approve 0x0 an allowance"); all...
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race ...
NatSpecMultiLine
v0.7.1+commit.f4a555be
{ "func_code_index": [ 1956, 2394 ] }
1,156
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public override view returns (uint256 remaining) { return allowed[_owner][_spender]; }
/* * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
Comment
v0.7.1+commit.f4a555be
{ "func_code_index": [ 2705, 2852 ] }
1,157
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
BurnableToken
contract BurnableToken is StandardToken, Ownable { using SafeMath for uint256; event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public onlyOwner { require(_value <...
/** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */
NatSpecMultiLine
burn
function burn(uint256 _value) public onlyOwner { require(_value <= balances[msg.sender], "Not enough balance to burn"); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[msg.sender] = balan...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.7.1+commit.f4a555be
{ "func_code_index": [ 249, 689 ] }
1,158
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
StoboxToken
contract StoboxToken is BurnableToken { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals = 18; /** * @dev users sending ether to this contract will be reverted. Any ether sent to the contract will be sent back to the caller */ receive() external payable { ...
/** * @title Brainz * @dev Token representing Brainz. */
NatSpecMultiLine
/** * @dev users sending ether to this contract will be reverted. Any ether sent to the contract will be sent back to the caller */
NatSpecMultiLine
v0.7.1+commit.f4a555be
{ "func_code_index": [ 286, 370 ] }
1,159
NFT
/home/jenja/NFT_ERC-721/contracts/STBU_Token.sol
0x797e2b99d37d78d0fe16878618d98d9162cc785a
Solidity
StoboxToken
contract StoboxToken is BurnableToken { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals = 18; /** * @dev users sending ether to this contract will be reverted. Any ether sent to the contract will be sent back to the caller */ receive() external payable { ...
/** * @title Brainz * @dev Token representing Brainz. */
NatSpecMultiLine
getTokenDetail
function getTokenDetail() public view returns (string memory, string memory, uint256) { return (name, symbol, totalSupply); }
/** * @dev helper method to get token details, name, symbol and totalSupply in one go */
NatSpecMultiLine
v0.7.1+commit.f4a555be
{ "func_code_index": [ 1048, 1181 ] }
1,160
CubegoWood
CubegoWood.sol
0xadcd0aa5c36b51f44dff660b5c728054eba803ef
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://12e6c94fb9214d92300d08fce511de39dabcf50d69bd2714ff5ea67b527ddc57
{ "func_code_index": [ 89, 266 ] }
1,161
CubegoWood
CubegoWood.sol
0xadcd0aa5c36b51f44dff660b5c728054eba803ef
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://12e6c94fb9214d92300d08fce511de39dabcf50d69bd2714ff5ea67b527ddc57
{ "func_code_index": [ 350, 630 ] }
1,162
CubegoWood
CubegoWood.sol
0xadcd0aa5c36b51f44dff660b5c728054eba803ef
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://12e6c94fb9214d92300d08fce511de39dabcf50d69bd2714ff5ea67b527ddc57
{ "func_code_index": [ 744, 860 ] }
1,163
CubegoWood
CubegoWood.sol
0xadcd0aa5c36b51f44dff660b5c728054eba803ef
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://12e6c94fb9214d92300d08fce511de39dabcf50d69bd2714ff5ea67b527ddc57
{ "func_code_index": [ 924, 1054 ] }
1,164
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_hasRole
function _hasRole(bytes32 role, address account) internal view returns (bool) { return _aclRegistry().hasRole(role, account); }
/** * @notice Check whether a given account has been granted this bytes32 role * @param role bytes32 role ID * @param account address of account to check for role * @return Whether account has been granted specified role. */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 1740, 1875 ] }
1,165
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_requireRole
function _requireRole(bytes32 role) internal view { _requireRole(role, msg.sender); }
/** * @notice Require that `msg.sender` has given role * @param role bytes32 role ID */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 1978, 2071 ] }
1,166
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_requireRole
function _requireRole(bytes32 role, address account) internal view { _aclRegistry().requireRole(role, account); }
/** * @notice Require that given account has specified role * @param role bytes32 role ID * @param account address of account to check for role */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 2237, 2358 ] }
1,167
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_hasPermission
function _hasPermission(bytes32 permission, address account) internal view returns (bool) { return _aclRegistry().hasPermission(permission, account); }
/** * @notice Check whether a given account has been granted this bytes32 permission * @param permission bytes32 permission ID * @param account address of account to check for permission * @return Whether account has been granted specified permission. */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 2636, 2795 ] }
1,168
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_requirePermission
function _requirePermission(bytes32 permission) internal view { _requirePermission(permission, msg.sender); }
/** * @notice Require that `msg.sender` has specified permission * @param permission bytes32 permission ID */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 2920, 3037 ] }
1,169
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_requirePermission
function _requirePermission(bytes32 permission, address account) internal view { _aclRegistry().requirePermission(permission, account); }
/** * @notice Require that given account has specified permission * @param permission bytes32 permission ID * @param account address of account to check for permission */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 3227, 3372 ] }
1,170
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_requireApprovedContractOrEOA
function _requireApprovedContractOrEOA() internal view { _requireApprovedContractOrEOA(msg.sender); }
/** * @notice Require that `msg.sender` has the `ApprovedContract` role or is an EOA * @dev This EOA check requires that `tx.origin == msg.sender` if caller does not have the `ApprovedContract` role. * This limits compatibility with contract-based wallets for functions protected with this modifier. */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 3694, 3803 ] }
1,171
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_requireApprovedContractOrEOA
function _requireApprovedContractOrEOA(address account) internal view { _aclRegistry().requireApprovedContractOrEOA(account); }
/** * @notice Require that `account` has the `ApprovedContract` role or is an EOA * @param account address of account to check for role/EOA * @dev This EOA check requires that `tx.origin == msg.sender` if caller does not have the `ApprovedContract` role. * This limits compatibility with contract-based wallets f...
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 4184, 4319 ] }
1,172
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_aclRegistry
function _aclRegistry() internal view returns (IACLRegistry) { return IACLRegistry(_getContract(ACL_REGISTRY_ID)); }
/** * @notice Return an IACLRegistry interface to the registered ACLRegistry contract * @return IACLRegistry interface to ACLRegistry contract */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 4480, 4604 ] }
1,173
KeeperIncentive
contracts/core/utils/ACLAuth.sol
0xafaca2ad8dad766bcc274bf16039088a7ea493bf
Solidity
ACLAuth
abstract contract ACLAuth { /** * @dev Equal to keccak256("Keeper") */ bytes32 internal constant KEEPER_ROLE = 0x4f78afe9dfc9a0cb0441c27b9405070cd2a48b490636a7bdd09f355e33a5d7de; /** * @dev Equal to keccak256("DAO") */ bytes32 internal constant DAO_ROLE = 0xd0a4ad96d49edb1c33461cebc6fb2609190f32c...
/** * @notice Provides modifiers and internal functions for interacting with the `ACLRegistry` * @dev Derived contracts using `ACLAuth` must also inherit `ContractRegistryAccess` * and override `_getContract`. */
NatSpecMultiLine
_getContract
function _getContract(bytes32 _name) internal view virtual returns (address);
/** * @notice Get a contract address by name from the contract registry * @param _name bytes32 contract name * @return contract address * @dev Users of this abstract contract should also inherit from `ContractRegistryAccess` * and override `_getContract` in their implementation. */
NatSpecMultiLine
v0.8.1+commit.df193b15
GNU GPLv3
{ "func_code_index": [ 4915, 4994 ] }
1,174
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { address msgSender = _msgSende...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 496, 580 ] }
1,175
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { address msgSender = _msgSende...
/** * @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 onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 1138, 1283 ] }
1,176
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { address msgSender = _msgSende...
/** * @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 onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 1433, 1547 ] }
1,177
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { address msgSender = _msgSende...
/** * @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) internal { require(newOwner != address(0), 'Ownable: new owner is the zero address'); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 1648, 1882 ] }
1,178
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, 'SafeMath: addition overflow'); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 259, 445 ] }
1,179
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, 'SafeMath: subtraction overflow'); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 723, 864 ] }
1,180
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 1162, 1393 ] }
1,181
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 1647, 2123 ] }
1,182
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, 'SafeMath: division by zero'); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 2594, 2731 ] }
1,183
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 3222, 3539 ] }
1,184
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, 'SafeMath: modulo by zero'); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 3999, 4134 ] }
1,185
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 4614, 4819 ] }
1,186
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sqrt
function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } }
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
LineComment
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 5045, 5362 ] }
1,187
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 94, 154 ] }
1,188
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the token decimals. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 216, 271 ] }
1,189
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the token symbol. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 331, 392 ] }
1,190
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
name
function name() external view returns (string memory);
/** * @dev Returns the token name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 450, 509 ] }
1,191
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
getOwner
function getOwner() external view returns (address);
/** * @dev Returns the bep token owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 572, 629 ] }
1,192
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 712, 785 ] }
1,193
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 1009, 1091 ] }
1,194
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
allowance
function allowance(address _owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 1370, 1459 ] }
1,195
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 2123, 2202 ] }
1,196
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
IBEP20
interface IBEP20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol....
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 2515, 2651 ] }
1,197
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeBEP20
library SafeBEP20 { using SafeMath for uint256; using Address for address; function safeTransfer( IBEP20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function ...
/** * @title SafeBEP20 * @dev Wrappers around BEP20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove( IBEP20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IBEP20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 824, 1499 ] }
1,198
SmartChef
SmartChef.sol
0x2e79b43206ea1dbfd91519741a9d76c3195c9a85
Solidity
SafeBEP20
library SafeBEP20 { using SafeMath for uint256; using Address for address; function safeTransfer( IBEP20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function ...
/** * @title SafeBEP20 * @dev Wrappers around BEP20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IBEP20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://805fed17de5c1312a8e8b3dd05d8cf0577eb32703424cd6e7bb1f55ab91ac6dc
{ "func_code_index": [ 2623, 3402 ] }
1,199