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
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // returns a uq112x112 which represents the ratio of the numerator to the denominator // equivalent to encode(numerator).div(denominator) function fraction(uint112 nume...
// Based on code from https://github.com/Uniswap/uniswap-v2-periphery // a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
decode112with18
function decode112with18(uq112x112 memory self) internal pure returns (uint) { // we only have 256 - 224 = 32 bits to spare, so scaling up by ~60 bits is dangerous // instead, get close to: // (x * 1e18) >> 112 // without risk of overflowing, e.g.: // (x) / 2 ** (112 - lg(1e18)) return u...
// decode a uq112x112 into a uint with 18 decimals of precision
LineComment
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 602, 990 ] }
24,200
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapV2OracleLibrary
library UniswapV2OracleLibrary { using FixedPoint for *; // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1] function currentBlockTimestamp() internal view returns (uint32) { return uint32(block.timestamp % 2 ** 32); } // prod...
// library with helper methods for oracles that are concerned with computing average prices
LineComment
currentBlockTimestamp
function currentBlockTimestamp() internal view returns (uint32) { return uint32(block.timestamp % 2 ** 32); }
// helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
LineComment
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 178, 306 ] }
24,201
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapV2OracleLibrary
library UniswapV2OracleLibrary { using FixedPoint for *; // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1] function currentBlockTimestamp() internal view returns (uint32) { return uint32(block.timestamp % 2 ** 32); } // prod...
// library with helper methods for oracles that are concerned with computing average prices
LineComment
currentCumulativePrices
function currentCumulativePrices( address pair ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) { blockTimestamp = currentBlockTimestamp(); price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast(); price1Cumulative = IUniswapV2Pair(pair).price1Cumu...
// produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
LineComment
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 407, 1470 ] }
24,202
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
price
function price(string memory symbol) external view returns (uint) { TokenConfig memory config = getTokenConfigBySymbol(symbol); return priceInternal(config); }
/** * @notice Get the official price for a symbol * @param symbol The symbol to fetch the price of * @return Price denominated in USD, with 6 decimals */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 4992, 5179 ] }
24,203
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
getUnderlyingPrice
function getUnderlyingPrice(address cToken) external view returns (uint) { TokenConfig memory config = getTokenConfigByCToken(cToken); // Comptroller needs prices in the format: ${raw price} * 1e(36 - baseUnit) // Since the prices in this view have 6 decimals, we must scale them by 1e(36 - 6 - baseUnit...
/** * @notice Get the underlying price of a cToken * @dev Implements the PriceOracle interface for Compound v2. * @param cToken The cToken address for price retrieval * @return Price denominated in USD, with 18 decimals, for the given cToken address */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 6012, 6425 ] }
24,204
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
postPrices
function postPrices(bytes[] calldata messages, bytes[] calldata signatures, string[] calldata symbols) external { require(messages.length == signatures.length, "messages and signatures must be 1:1"); // Save the prices for (uint i = 0; i < messages.length; i++) { priceData.put(messages[i], sig...
/** * @notice Post open oracle reporter prices, and recalculate stored price by comparing to anchor * @dev We let anyone pay to post anything, but only prices from configured reporter will be stored in the view. * @param messages The messages to post to the oracle * @param signatures The signatures for the corr...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 6879, 7457 ] }
24,205
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
currentCumulativePrice
function currentCumulativePrice(TokenConfig memory config) internal view returns (uint) { (uint cumulativePrice0, uint cumulativePrice1,) = UniswapV2OracleLibrary.currentCumulativePrices(config.uniswapMarket); if (config.isUniswapReversed) { return cumulativePrice1; } else { return cumu...
/** * @dev Fetches the current token/eth price accumulator from uniswap. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 8899, 9275 ] }
24,206
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
fetchEthPrice
function fetchEthPrice() internal returns (uint) { return fetchAnchorPrice("ETH", getTokenConfigBySymbolHash(ethHash), ethBaseUnit); }
/** * @dev Fetches the current eth/usd price from uniswap, with 6 decimals of precision. * Conversion factor is 1e18 for eth/usdc market, since we decode uniswap price statically with 18 decimals. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 9502, 9655 ] }
24,207
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
fetchAnchorPrice
function fetchAnchorPrice(string memory symbol, TokenConfig memory config, uint conversionFactor) internal virtual returns (uint) { (uint nowCumulativePrice, uint oldCumulativePrice, uint oldTimestamp) = pokeWindowValues(config); // This should be impossible, but better safe than sorry require(block.ti...
/** * @dev Fetches the current token/usd price from uniswap, with 6 decimals of precision. * @param conversionFactor 1e18 if seeking the ETH price, and a 6 decimal ETH-USDC price in the case of other assets */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 9891, 11515 ] }
24,208
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
pokeWindowValues
function pokeWindowValues(TokenConfig memory config) internal returns (uint, uint, uint) { bytes32 symbolHash = config.symbolHash; uint cumulativePrice = currentCumulativePrice(config); Observation memory newObservation = newObservations[symbolHash]; // Update new and old observations if elapsed...
/** * @dev Get time-weighted average prices for a token at the current timestamp. * Update new and old observations of lagging window if period elapsed. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 11698, 12748 ] }
24,209
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
invalidateReporter
function invalidateReporter(bytes memory message, bytes memory signature) external { (string memory decodedMessage, ) = abi.decode(message, (string, address)); require(keccak256(abi.encodePacked(decodedMessage)) == rotateHash, "invalid message must be 'rotate'"); require(source(message, signature) == rep...
/** * @notice Invalidate the reporter, and fall back to using anchor directly in all cases * @dev Only the reporter may sign a message which allows it to invalidate itself. * To be used in cases of emergency, if the reporter thinks their key may be compromised. * @param message The data that was presumably sig...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 13172, 13657 ] }
24,210
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
source
function source(bytes memory message, bytes memory signature) public pure returns (address) { (bytes32 r, bytes32 s, uint8 v) = abi.decode(signature, (bytes32, bytes32, uint8)); bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(message))); return ecrecover(hash, v, r...
/** * @notice Recovers the source address which signed a message * @dev Comparing to a claimed address would add nothing, * as the caller could simply perform the recover and claim that address. * @param message The data that was presumably signed * @param signature The fingerprint of the data + private key ...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 14086, 14435 ] }
24,211
UniswapAnchoredView
UniswapAnchoredView.sol
0x77ec19642c3f296fe0f58da4de070894babb5327
Solidity
UniswapAnchoredView
contract UniswapAnchoredView is UniswapConfig { using FixedPoint for *; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The number of wei in 1 ETH uint public constant ethBaseUnit = 1e18; /// @notice A common scaling factor ...
mul
function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) return 0; uint c = a * b; require(c / a == b, "multiplication overflow"); return c; }
/// @dev Overflow proof multiplication
NatSpecSingleLine
v0.6.10+commit.00c0fcaf
GNU GPLv3
ipfs://8c2a73bb54dfe5f38570c033928b1040c23a175021e768c6af478edcf88cf761
{ "func_code_index": [ 14482, 14685 ] }
24,212
EnergisToken
contracts/EnergisToken.sol
0x2169cce281717d204fa0ecf846a6171e96234d72
Solidity
EnergisToken
contract EnergisToken is StandardToken, Claimable, BurnableToken { using SafeMath for uint256; string public constant name = "Energis Token"; // solium-disable-line uppercase string public constant symbol = "NRG"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line...
/** * @title EnergisToken * * Symbol : ERG * Name : Energis Token * Total supply: 240,000,000.000000000000000000 * Decimals : 18 * * (c) Philip Louw / Zero Carbon Project 2018. The MIT Licence. */
NatSpecMultiLine
EnergisToken
function EnergisToken() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY); }
/** * @dev Constructor that gives msg.sender all of existing tokens. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://1c2b12b2acd995405d1ed97bd791c989f92feeed37607ebb32e1e2232dac632c
{ "func_code_index": [ 502, 675 ] }
24,213
EnergisToken
contracts/EnergisToken.sol
0x2169cce281717d204fa0ecf846a6171e96234d72
Solidity
EnergisToken
contract EnergisToken is StandardToken, Claimable, BurnableToken { using SafeMath for uint256; string public constant name = "Energis Token"; // solium-disable-line uppercase string public constant symbol = "NRG"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line...
/** * @title EnergisToken * * Symbol : ERG * Name : Energis Token * Total supply: 240,000,000.000000000000000000 * Decimals : 18 * * (c) Philip Louw / Zero Carbon Project 2018. The MIT Licence. */
NatSpecMultiLine
function () public payable { // Revert will return unused gass throw will not revert(); }
/** * @dev Reject all ETH sent to token contract */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://1c2b12b2acd995405d1ed97bd791c989f92feeed37607ebb32e1e2232dac632c
{ "func_code_index": [ 739, 844 ] }
24,214
EnergisToken
contracts/EnergisToken.sol
0x2169cce281717d204fa0ecf846a6171e96234d72
Solidity
EnergisToken
contract EnergisToken is StandardToken, Claimable, BurnableToken { using SafeMath for uint256; string public constant name = "Energis Token"; // solium-disable-line uppercase string public constant symbol = "NRG"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line...
/** * @title EnergisToken * * Symbol : ERG * Name : Energis Token * Total supply: 240,000,000.000000000000000000 * Decimals : 18 * * (c) Philip Louw / Zero Carbon Project 2018. The MIT Licence. */
NatSpecMultiLine
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Basic(tokenAddress).transfer(owner, tokens); }
/** * @dev Owner can transfer out any accidentally sent ERC20 tokens */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://1c2b12b2acd995405d1ed97bd791c989f92feeed37607ebb32e1e2232dac632c
{ "func_code_index": [ 930, 1109 ] }
24,215
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
add
function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; }
/** * @dev give an account access to this role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 141, 316 ] }
24,216
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
remove
function remove(Role storage role, address account) internal { require(account != address(0)); require(has(role, account)); role.bearer[account] = false; }
/** * @dev remove an account's access to this role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 384, 562 ] }
24,217
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; }
/** * @dev check if an account has this role * @return bool */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 643, 819 ] }
24,218
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 90, 486 ] }
24,219
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 598, 877 ] }
24,220
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 992, 1131 ] }
24,221
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1196, 1335 ] }
24,222
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1470, 1587 ] }
24,223
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 281, 369 ] }
24,224
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
balanceOf
function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; }
/** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 570, 673 ] }
24,225
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
allowance
function allowance( address owner, address spender ) public view returns (uint256) { return _allowed[owner][spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 995, 1157 ] }
24,226
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
transfer
function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; }
/** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1313, 1446 ] }
24,227
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
approve
function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2070, 2299 ] }
24,228
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
transferFrom
function transferFrom( address from, address to, uint256 value ) public returns (bool) { require(value <= _allowed[from][msg.sender]); _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); return true; }
/** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2576, 2880 ] }
24,229
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
increaseAllowance
function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].add(addedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } ...
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 3339, 3685 ] }
24,230
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
decreaseAllowance
function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].sub(subtractedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 4149, 4505 ] }
24,231
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_transfer
function _transfer(address from, address to, uint256 value) internal { require(value <= _balances[from]); require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); }
/** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 4710, 4997 ] }
24,232
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_mint
function _mint(address account, uint256 value) internal { require(account != 0); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); }
/** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 5330, 5573 ] }
24,233
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_burn
function _burn(address account, uint256 value) internal { require(account != 0); require(value <= _balances[account]); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 5790, 6078 ] }
24,234
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_burnFrom
function _burnFrom(address account, uint256 value) internal { require(value <= _allowed[account][msg.sender]); // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. _allowed[account][msg.sender] = _allowed[acc...
/** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 6390, 6791 ] }
24,235
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
ERC20Mintable
contract ERC20Mintable is ERC20, MinterRole { /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address to, ...
mint
function mint( address to, uint256 value ) public onlyMinter returns (bool) { _mint(to, value); return true; }
/** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 282, 439 ] }
24,236
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
disableMinting
function disableMinting() public onlyMinter { mintingDisabled = true; emit DisableMinting(); }
/** * @notice Disable further minting * @dev This operation can not be undone */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 510, 649 ] }
24,237
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
mint
function mint(address to, uint256 value) public onlyMinter returns (bool) { require(!mintingDisabled); // Call super's mint, including event emission bool minted = super.mint(to, value); if (minted) { // Adjust balance blocks addBalanceBlocks(to); // Add to the t...
/** * @notice Mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 890, 1446 ] }
24,238
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
transfer
function transfer(address to, uint256 value) public returns (bool) { // Call super's transfer, including event emission bool transferred = super.transfer(to, value); if (transferred) { // Adjust balance blocks addBalanceBlocks(msg.sender); addBalanceBlocks(to); ...
/** * @notice Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1693, 2265 ] }
24,239
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
approve
function approve(address spender, uint256 value) public returns (bool) { // Prevent the update of non-zero allowance require(0 == value || 0 == allowance(msg.sender, spender)); // Call super's approve, including event emission return super.approve(spender, value); }
/** * @notice Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @dev Beware that 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...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2817, 3146 ] }
24,240
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
transferFrom
function transferFrom(address from, address to, uint256 value) public returns (bool) { // Call super's transferFrom, including event emission bool transferred = super.transferFrom(from, to, value); if (transferred) { // Adjust balance blocks addBalanceBlocks(from); addBala...
/** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred * @return A boolean that indicates if the operation was succes...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 3509, 4107 ] }
24,241
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
balanceBlocksIn
function balanceBlocksIn(address account, uint256 startBlock, uint256 endBlock) public view returns (uint256) { require(startBlock < endBlock); require(account != address(0)); if (balanceBlockNumbers[account].length == 0 || endBlock < balanceBlockNumbers[account][0]) return 0; uint2...
/** * @notice Calculate the amount of balance blocks, i.e. the area under the curve (AUC) of * balance as function of block number * @dev The AUC is used as weight for the share of revenue that a token holder may claim * @param account The account address for which calculation is done * @param startBlock The ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 4585, 6618 ] }
24,242
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
balanceUpdatesCount
function balanceUpdatesCount(address account) public view returns (uint256) { return balanceBlocks[account].length; }
/** * @notice Get the count of balance updates for the given account * @return The count of balance updates */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 6755, 6911 ] }
24,243
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
holdersCount
function holdersCount() public view returns (uint256) { return holders.length; }
/** * @notice Get the count of holders * @return The count of holders */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 7010, 7129 ] }
24,244
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueToken
contract RevenueToken is ERC20Mintable { using SafeMath for uint256; bool public mintingDisabled; address[] public holders; mapping(address => bool) public holdersMap; mapping(address => uint256[]) public balances; mapping(address => uint256[]) public balanceBlocks; mappin...
holdersByIndices
function holdersByIndices(uint256 low, uint256 up, bool posOnly) public view returns (address[]) { require(low <= up); up = up > holders.length - 1 ? holders.length - 1 : up; uint256 length = 0; if (posOnly) { for (uint256 i = low; i <= up; i++) if (0 < balanceOf(holder...
/** * @notice Get the subset of holders (optionally with positive balance only) in the given 0 based index range * @param low The lower inclusive index * @param up The upper inclusive index * @param posOnly List only positive balance holders * @return The subset of positive balance registered holders in the g...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 7497, 8212 ] }
24,245
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SafeMathUintLib
library SafeMathUintLib { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { //...
clamp
function clamp(uint256 a, uint256 min, uint256 max) public pure returns (uint256) { return (a > max) ? max : ((a < min) ? min : a); }
// //Clamping functions. //
LineComment
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 901, 1073 ] }
24,246
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SelfDestructible
contract SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- bool public selfDestructionDisabled; // // Events // ---------------------------------------------------------------------...
destructor
function destructor() public view returns (address);
/// @notice Get the address of the destructor role
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 685, 757 ] }
24,247
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SelfDestructible
contract SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- bool public selfDestructionDisabled; // // Events // ---------------------------------------------------------------------...
disableSelfDestruction
function disableSelfDestruction() public { // Require that sender is the assigned destructor require(destructor() == msg.sender); // Disable self-destruction selfDestructionDisabled = true; // Emit event emit SelfDestructionDisabledEvent(msg.sender); }
/// @notice Disable self-destruction of this contract /// @dev This operation can not be undone
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 866, 1196 ] }
24,248
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
SelfDestructible
contract SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- bool public selfDestructionDisabled; // // Events // ---------------------------------------------------------------------...
triggerSelfDestruction
function triggerSelfDestruction() public { // Require that sender is the assigned destructor require(destructor() == msg.sender); // Require that self-destruction has not been disabled require(!selfDestructionDisabled); // Emit event emit TriggerSelfDestructionEvent(msg.sender); ...
/// @notice Destroy this contract
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1238, 1682 ] }
24,249
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Ownable
contract Ownable is Modifiable, SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- address public deployer; address public operator; // // Events // ----------------------------...
destructor
function destructor() public view returns (address) { return deployer; }
/// @notice Return the address that is able to initiate self-destruction
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1077, 1188 ] }
24,250
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Ownable
contract Ownable is Modifiable, SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- address public deployer; address public operator; // // Events // ----------------------------...
setDeployer
function setDeployer(address newDeployer) public onlyDeployer notNullOrThisAddress(newDeployer) { if (newDeployer != deployer) { // Set new deployer address oldDeployer = deployer; deployer = newDeployer; // Emit event emit SetDeployerEvent(oldDeployer, newDeploye...
/// @notice Set the deployer of this contract /// @param newDeployer The address of the new deployer
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1302, 1688 ] }
24,251
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Ownable
contract Ownable is Modifiable, SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- address public deployer; address public operator; // // Events // ----------------------------...
setOperator
function setOperator(address newOperator) public onlyOperator notNullOrThisAddress(newOperator) { if (newOperator != operator) { // Set new operator address oldOperator = operator; operator = newOperator; // Emit event emit SetOperatorEvent(oldOperator, newOperato...
/// @notice Set the operator of this contract /// @param newOperator The address of the new operator
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1802, 2188 ] }
24,252
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Ownable
contract Ownable is Modifiable, SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- address public deployer; address public operator; // // Events // ----------------------------...
isDeployer
function isDeployer() internal view returns (bool) { return msg.sender == deployer; }
/// @notice Gauge whether message sender is deployer or not /// @return true if msg.sender is deployer, else false
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2316, 2440 ] }
24,253
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Ownable
contract Ownable is Modifiable, SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- address public deployer; address public operator; // // Events // ----------------------------...
isOperator
function isOperator() internal view returns (bool) { return msg.sender == operator; }
/// @notice Gauge whether message sender is operator or not /// @return true if msg.sender is operator, else false
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2568, 2692 ] }
24,254
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
Ownable
contract Ownable is Modifiable, SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- address public deployer; address public operator; // // Events // ----------------------------...
isDeployerOrOperator
function isDeployerOrOperator() internal view returns (bool) { return isDeployer() || isOperator(); }
/// @notice Gauge whether message sender is operator or deployer on the one hand, or none of these on these on /// on the other hand /// @return true if msg.sender is operator, else false
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2898, 3038 ] }
24,255
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
TokenMultiTimelock
contract TokenMultiTimelock is Ownable { using SafeERC20 for IERC20; // // Structures // ----------------------------------------------------------------------------------------------------------------- struct Release { uint256 earliestReleaseTime; uint256 amount; u...
setToken
function setToken(IERC20 _token) public onlyOperator notNullOrThisAddress(_token) { // Require that the token has not previously been set require(address(token) == address(0)); // Update beneficiary token = _token; // Emit event emit SetTokenEvent(token); }
/// @notice Set the address of token /// @param _token The address of token
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1719, 2064 ] }
24,256
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
TokenMultiTimelock
contract TokenMultiTimelock is Ownable { using SafeERC20 for IERC20; // // Structures // ----------------------------------------------------------------------------------------------------------------- struct Release { uint256 earliestReleaseTime; uint256 amount; u...
setBeneficiary
function setBeneficiary(address _beneficiary) public onlyOperator notNullAddress(_beneficiary) { // Update beneficiary beneficiary = _beneficiary; // Emit event emit SetBeneficiaryEvent(beneficiary); }
/// @notice Set the address of beneficiary /// @param _beneficiary The new address of beneficiary
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2175, 2444 ] }
24,257
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
TokenMultiTimelock
contract TokenMultiTimelock is Ownable { using SafeERC20 for IERC20; // // Structures // ----------------------------------------------------------------------------------------------------------------- struct Release { uint256 earliestReleaseTime; uint256 amount; u...
defineReleases
function defineReleases(uint256[] earliestReleaseTimes, uint256[] amounts, uint256[] releaseBlockNumbers) onlyOperator public { require(earliestReleaseTimes.length == amounts.length); require(earliestReleaseTimes.length >= releaseBlockNumbers.length); // Require that token address has been set ...
/// @notice Define a set of new releases /// @param earliestReleaseTimes The timestamp after which the corresponding amount may be released /// @param amounts The amounts to be released /// @param releaseBlockNumbers The set release block numbers for releases whose earliest release time /// is in the past
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 2779, 3973 ] }
24,258
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
TokenMultiTimelock
contract TokenMultiTimelock is Ownable { using SafeERC20 for IERC20; // // Structures // ----------------------------------------------------------------------------------------------------------------- struct Release { uint256 earliestReleaseTime; uint256 amount; u...
releasesCount
function releasesCount() public view returns (uint256) { return releases.length; }
/// @notice Get the count of releases /// @return The number of defined releases
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 4067, 4188 ] }
24,259
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
TokenMultiTimelock
contract TokenMultiTimelock is Ownable { using SafeERC20 for IERC20; // // Structures // ----------------------------------------------------------------------------------------------------------------- struct Release { uint256 earliestReleaseTime; uint256 amount; u...
setReleaseBlockNumber
function setReleaseBlockNumber(uint256 index, uint256 blockNumber) public onlyBeneficiary { // Require that the release is not done require(!releases[index].done); // Update the release block number releases[index].blockNumber = blockNumber; // Emit event emit SetReleaseBlockNumberE...
/// @notice Set the block number of a release that is not done /// @param index The index of the release /// @param blockNumber The updated block number
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 4359, 4752 ] }
24,260
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
TokenMultiTimelock
contract TokenMultiTimelock is Ownable { using SafeERC20 for IERC20; // // Structures // ----------------------------------------------------------------------------------------------------------------- struct Release { uint256 earliestReleaseTime; uint256 amount; u...
release
function release(uint256 index) public onlyBeneficiary { // Get the release object Release storage _release = releases[index]; // Require that this release has been properly defined by having non-zero amount require(0 < _release.amount); // Require that this release has not already been ...
/// @notice Transfers tokens held in the indicated release to beneficiary. /// @param index The index of the release
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 4882, 6064 ] }
24,261
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueTokenManager
contract RevenueTokenManager is TokenMultiTimelock { using SafeMathUintLib for uint256; // // Variables // ----------------------------------------------------------------------------------------------------------------- uint256[] public totalReleasedAmounts; uint256[] public totalReleas...
release
function release(uint256 index) public onlyBeneficiary { // Call release of multi timelock super.release(index); // Add amount blocks _addAmountBlocks(index); }
/// @notice Transfers tokens held in the indicated release to beneficiary /// and update amount blocks /// @param index The index of the release
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 894, 1117 ] }
24,262
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueTokenManager
contract RevenueTokenManager is TokenMultiTimelock { using SafeMathUintLib for uint256; // // Variables // ----------------------------------------------------------------------------------------------------------------- uint256[] public totalReleasedAmounts; uint256[] public totalReleas...
releasedAmountBlocksIn
function releasedAmountBlocksIn(uint256 startBlock, uint256 endBlock) public view returns (uint256) { require(startBlock < endBlock); if (executedReleasesCount == 0 || endBlock < releases[0].blockNumber) return 0; uint256 i = 0; while (i < executedReleasesCount && releases[i].blockN...
/// @notice Calculate the released amount blocks, i.e. the area under the curve (AUC) of /// release amount as function of block number /// @param startBlock The start block number considered /// @param endBlock The end block number considered /// @return The calculated AUC
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 1420, 3217 ] }
24,263
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueTokenManager
contract RevenueTokenManager is TokenMultiTimelock { using SafeMathUintLib for uint256; // // Variables // ----------------------------------------------------------------------------------------------------------------- uint256[] public totalReleasedAmounts; uint256[] public totalReleas...
releaseBlockNumbers
function releaseBlockNumbers(uint256 index) public view returns (uint256) { return releases[index].blockNumber; }
/// @notice Get the block number of the release /// @param index The index of the release /// @return The block number of the release;
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 3370, 3522 ] }
24,264
RevenueTokenManager
RevenueTokenManager.sol
0xe3f2158610b7145c04ae03a6356038ad2404a9a6
Solidity
RevenueTokenManager
contract RevenueTokenManager is TokenMultiTimelock { using SafeMathUintLib for uint256; // // Variables // ----------------------------------------------------------------------------------------------------------------- uint256[] public totalReleasedAmounts; uint256[] public totalReleas...
_addAmountBlocks
function _addAmountBlocks(uint256 index) private { // Push total amount released and total released amount blocks if (0 < index) { totalReleasedAmounts.push( totalReleasedAmounts[index - 1] + releases[index].amount ); totalReleasedAmountBlocks.push( total...
// // Private functions // -----------------------------------------------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://232d378df1231808d1f3a1af1a77e186260a320c1b9fb7ab4e2051d9ec2213eb
{ "func_code_index": [ 3681, 4344 ] }
24,265
JPEXNFT
JPEXFlashPokerNFT.sol
0x1f5ae4c52ce2cc0e8ec59e17e2ae6334d6bc9323
Solidity
JPEXNFT
contract JPEXNFT is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, AccessControl, ERC721Burnable { bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); string private mBaseURI = ""; constructor() ERC721("JPEX NFT", "JPEX...
_burn
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { super._burn(tokenId); }
// The following functions are overrides required by Solidity.
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1411, 1528 ] }
24,266
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != address(0x0)); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanc...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 1661, 2517 ] }
24,267
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { _transfer(msg.sender, _to, _value); return true; }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 2723, 2880 ] }
24,268
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 3155, 3456 ] }
24,269
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 3720, 3950 ] }
24,270
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, address(this), _extraData); return true...
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 4344, 4712 ] }
24,271
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender,...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 4882, 5261 ] }
24,272
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 5519, 6135 ] }
24,273
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
QuatrefoilToken
contract QuatrefoilToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initi...
/******************************************/
NatSpecMultiLine
_transfer
function _transfer(address _from, address _to, uint _value) internal { require (_to != address(0x0)); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value ...
/* Internal transfer, only can be called by this contract */
Comment
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 652, 1467 ] }
24,274
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
QuatrefoilToken
contract QuatrefoilToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initi...
/******************************************/
NatSpecMultiLine
mintToken
function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; emit Transfer(address(0), address(this), mintedAmount); emit Transfer(address(this), target, mintedAmount); }
/// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive
NatSpecSingleLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 1659, 1954 ] }
24,275
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
QuatrefoilToken
contract QuatrefoilToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initi...
/******************************************/
NatSpecMultiLine
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); }
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not
NatSpecSingleLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 2135, 2301 ] }
24,276
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
QuatrefoilToken
contract QuatrefoilToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initi...
/******************************************/
NatSpecMultiLine
setPrices
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; }
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract
NatSpecSingleLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 2544, 2704 ] }
24,277
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
QuatrefoilToken
contract QuatrefoilToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initi...
/******************************************/
NatSpecMultiLine
buy
function buy() payable public { uint amount = msg.value / buyPrice; // calculates the amount _transfer(address(this), msg.sender, amount); // makes the transfers }
/// @notice Buy tokens from contract by sending ether
NatSpecSingleLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 2766, 2979 ] }
24,278
QuatrefoilToken
QuatrefoilToken.sol
0xe0627ac9963ae43cf1aab9bbd758a6479bd50836
Solidity
QuatrefoilToken
contract QuatrefoilToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initi...
/******************************************/
NatSpecMultiLine
sell
function sell(uint256 amount) public { address myAddress = address(this); require(myAddress.balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, address(this), amount); // makes the transfers msg.sender.transfer(amount * sellPrice); ...
/// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold
NatSpecSingleLine
v0.5.17+commit.d19bba13
MIT
bzzr://b1798c9f904ecdda69f1e1631399c9a09ba41d4e1c4707ab56be1a2d46d82eef
{ "func_code_index": [ 3083, 3521 ] }
24,279
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @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) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 89, 476 ] }
24,280
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @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.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 560, 840 ] }
24,281
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @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.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 954, 1070 ] }
24,282
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @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.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 1134, 1264 ] }
24,283
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 199, 287 ] }
24,284
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 445, 777 ] }
24,285
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 983, 1087 ] }
24,286
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_v...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 401, 891 ] }
24,287
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 1523, 1718 ] }
24,288
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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 view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 2042, 2207 ] }
24,289
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 2673, 2980 ] }
24,290
YKCToken
YKCToken.sol
0x1b47e2c6d7a5da06698ef0d978b8fb0ae178d255
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
decreaseApproval
function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://d962a1e7fd316d9287d2e49a588e686ccd6e3b4eb429efa62c18d6a3c7cb0112
{ "func_code_index": [ 3451, 3894 ] }
24,291
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
verify
function verify(bytes32[] memory proof, bytes32 leaf) public view returns (bool) { return MerkleProof.verify(proof, merkleRoot, leaf); }
/** * @dev Verify whether an address is on the whitelist * @param proof The required proof * @param leaf The leaf to verify, which has been created off-chain */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1121, 1301 ] }
24,292
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
setContractState
function setContractState(string memory _contractState) public onlyOwner { contractState = _contractState; }
/** * @dev Set the contract's state * @param _contractState The new desired contract state */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1416, 1540 ] }
24,293
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
setBaseURI
function setBaseURI(string memory baseURI_) public onlyOwner { currentBaseURI = baseURI_; }
/** @dev Update the base URI * @param baseURI_ New value of the base URI */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1632, 1739 ] }
24,294
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return currentBaseURI; }
/** @dev Get the current base URI * @return currentBaseURI */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1817, 1934 ] }
24,295
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
setPresale1Address
function setPresale1Address(address presale1Address_) public onlyOwner { presale1address = presale1Address_; }
/** @dev Sets the presale1 address * @param presale1Address_ the address */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2026, 2152 ] }
24,296
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
setMerkleRoot
function setMerkleRoot(bytes32 merkleRoot_) public onlyOwner { merkleRoot = merkleRoot_; }
/** @dev Set the merkle root for address verification * @param merkleRoot_ the merkle root to set */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2269, 2375 ] }
24,297
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
setPresaleGuaranteedTokens
function setPresaleGuaranteedTokens(uint256 qty) public onlyOwner { presaleGuaranteedTokens = qty; }
/** @dev Set number of tokens guaranteed to whitelisted addresses * @param qty the number of tokens to guarantee */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2507, 2623 ] }
24,298
Vortex
contracts/Vortex.sol
0x01a9f037d4cd7da318ab097a47acd4dea3abc083
Solidity
Vortex
contract Vortex is ERC721Enumerable, Ownable { string public contractState; // "presale_1", "presale_2" or "public_mint" bytes32 presale1State = keccak256(abi.encodePacked("presale_1")); bytes32 presale2State = keccak256(abi.encodePacked("presale_2")); bytes32 publicMintState = keccak256(abi.encodePacke...
/** @title Vortex */
NatSpecMultiLine
setNWhitelisted
function setNWhitelisted(uint256 qty) public onlyOwner { nWhitelisted = qty; }
/** @dev Set number of addresses whitelisted * @param qty the number of whitelisted addresses */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2736, 2830 ] }
24,299