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
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line ...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 747, 1374 ] }
1,700
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2393, 3159 ] }
1,701
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
IModule
interface IModule { /** * Called by a SetToken to notify that this module was removed from the Set token. Any logic can be included * in case checks need to be made or state needs to be cleared. */ function removeModule() external; }
/** * @title IModule * @author Set Protocol * * Interface for interacting with Modules. */
NatSpecMultiLine
removeModule
function removeModule() external;
/** * Called by a SetToken to notify that this module was removed from the Set token. Any logic can be included * in case checks need to be made or state needs to be cleared. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 222, 260 ] }
1,702
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
ExplicitERC20
library ExplicitERC20 { using SafeMath for uint256; /** * When given allowance, transfers a token from the "_from" to the "_to" of quantity "_quantity". * Ensures that the recipient has received the correct quantity (ie no fees taken on transfer) * * @param _token ERC20 tok...
/** * @title ExplicitERC20 * @author Set Protocol * * Utility functions for ERC20 transfers that require the explicit amount to be transferred. */
NatSpecMultiLine
transferFrom
function transferFrom( IERC20 _token, address _from, address _to, uint256 _quantity ) internal { // Call specified ERC20 contract to transfer tokens (via proxy). if (_quantity > 0) { uint256 existingBalance = _token.balanceOf(_to); SafeERC20.safeTransferFrom( ...
/** * When given allowance, transfers a token from the "_from" to the "_to" of quantity "_quantity". * Ensures that the recipient has received the correct quantity (ie no fees taken on transfer) * * @param _token ERC20 token to approve * @param _from The account to transfer tokens from ...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 535, 1308 ] }
1,703
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseUnit
function preciseUnit() internal pure returns (uint256) { return PRECISE_UNIT; }
/** * @dev Getter function since constants can't be read directly from libraries. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 627, 725 ] }
1,704
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseUnitInt
function preciseUnitInt() internal pure returns (int256) { return PRECISE_UNIT_INT; }
/** * @dev Getter function since constants can't be read directly from libraries. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 830, 934 ] }
1,705
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
maxUint256
function maxUint256() internal pure returns (uint256) { return MAX_UINT_256; }
/** * @dev Getter function since constants can't be read directly from libraries. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1039, 1136 ] }
1,706
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
maxInt256
function maxInt256() internal pure returns (int256) { return MAX_INT_256; }
/** * @dev Getter function since constants can't be read directly from libraries. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1241, 1335 ] }
1,707
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
minInt256
function minInt256() internal pure returns (int256) { return MIN_INT_256; }
/** * @dev Getter function since constants can't be read directly from libraries. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1440, 1534 ] }
1,708
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseMul
function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) { return a.mul(b).div(PRECISE_UNIT); }
/** * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand * of a number with 18 decimals precision. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1721, 1852 ] }
1,709
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseMul
function preciseMul(int256 a, int256 b) internal pure returns (int256) { return a.mul(b).div(PRECISE_UNIT_INT); }
/** * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the * significand of a number with 18 decimals precision. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2047, 2179 ] }
1,710
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseMulCeil
function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0 || b == 0) { return 0; } return a.mul(b).sub(1).div(PRECISE_UNIT).add(1); }
/** * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand * of a number with 18 decimals precision. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2364, 2580 ] }
1,711
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseDiv
function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) { return a.mul(PRECISE_UNIT).div(b); }
/** * @dev Divides value a by value b (result is rounded down). */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2667, 2798 ] }
1,712
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseDiv
function preciseDiv(int256 a, int256 b) internal pure returns (int256) { return a.mul(PRECISE_UNIT_INT).div(b); }
/** * @dev Divides value a by value b (result is rounded towards 0). */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2892, 3024 ] }
1,713
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
preciseDivCeil
function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "Cant divide by 0"); return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0; }
/** * @dev Divides value a by value b (result is rounded up or away from 0). */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 3124, 3333 ] }
1,714
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
divDown
function divDown(int256 a, int256 b) internal pure returns (int256) { require(b != 0, "Cant divide by 0"); require(a != MIN_INT_256 || b != -1, "Invalid input"); int256 result = a.div(b); if (a ^ b < 0 && a % b != 0) { result = result.sub(1); } return result; }
/** * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0). */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 3473, 3815 ] }
1,715
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
conservativePreciseMul
function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) { return divDown(a.mul(b), PRECISE_UNIT_INT); }
/** * @dev Multiplies value a by value b where rounding is towards the lesser number. * (positive values are rounded towards zero and negative values are rounded away from 0). */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 4022, 4171 ] }
1,716
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
PreciseUnitMath
library PreciseUnitMath { using SafeMath for uint256; using SignedSafeMath for int256; // The number One in precise units. uint256 constant internal PRECISE_UNIT = 10 ** 18; int256 constant internal PRECISE_UNIT_INT = 10 ** 18; // Max unsigned integer value uint256 constant intern...
/** * @title PreciseUnitMath * @author Set Protocol * * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from * dYdX's BaseMath library. */
NatSpecMultiLine
conservativePreciseDiv
function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) { return divDown(a.mul(PRECISE_UNIT_INT), b); }
/** * @dev Divides value a by value b where rounding is towards the lesser number. * (positive values are rounded towards zero and negative values are rounded away from 0). */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 4375, 4524 ] }
1,717
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
ModuleBase
abstract contract ModuleBase is IModule { /* ============ State Variables ============ */ // Address of the controller IController public controller; /* ============ Modifiers ============ */ modifier onlySetManager(ISetToken _setToken, address _caller) { require(isSetManager(_...
/** * @title ModuleBase * @author Set Protocol * * Abstract class that houses common Module-related state and functions. */
NatSpecMultiLine
transferFrom
function transferFrom(IERC20 _token, address _from, address _to, uint256 _quantity) internal { ExplicitERC20.transferFrom(_token, _from, _to, _quantity); }
/** * Transfers tokens from an address (that has set allowance on the module). * * @param _token The address of the ERC20 token * @param _from The address to transfer from * @param _to The address to transfer to * @param _quantity The number of tokens to transfer *...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2174, 2348 ] }
1,718
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
ModuleBase
abstract contract ModuleBase is IModule { /* ============ State Variables ============ */ // Address of the controller IController public controller; /* ============ Modifiers ============ */ modifier onlySetManager(ISetToken _setToken, address _caller) { require(isSetManager(_...
/** * @title ModuleBase * @author Set Protocol * * Abstract class that houses common Module-related state and functions. */
NatSpecMultiLine
isSetPendingInitialization
function isSetPendingInitialization(ISetToken _setToken) internal view returns(bool) { return _setToken.isPendingModule(address(this)); }
/** * Returns true if the module is in process of initialization on the SetToken */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2452, 2608 ] }
1,719
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
ModuleBase
abstract contract ModuleBase is IModule { /* ============ State Variables ============ */ // Address of the controller IController public controller; /* ============ Modifiers ============ */ modifier onlySetManager(ISetToken _setToken, address _caller) { require(isSetManager(_...
/** * @title ModuleBase * @author Set Protocol * * Abstract class that houses common Module-related state and functions. */
NatSpecMultiLine
isSetManager
function isSetManager(ISetToken _setToken, address _toCheck) internal view returns(bool) { return _setToken.manager() == _toCheck; }
/** * Returns true if the address is the SetToken's manager */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2691, 2842 ] }
1,720
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
ModuleBase
abstract contract ModuleBase is IModule { /* ============ State Variables ============ */ // Address of the controller IController public controller; /* ============ Modifiers ============ */ modifier onlySetManager(ISetToken _setToken, address _caller) { require(isSetManager(_...
/** * @title ModuleBase * @author Set Protocol * * Abstract class that houses common Module-related state and functions. */
NatSpecMultiLine
isSetValidAndInitialized
function isSetValidAndInitialized(ISetToken _setToken) internal view returns(bool) { return controller.isSet(address(_setToken)) && _setToken.isInitializedModule(address(this)); }
/** * Returns true if SetToken must be enabled on the controller * and module is registered on the SetToken */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2980, 3191 ] }
1,721
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 94, 154 ] }
1,722
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 237, 310 ] }
1,723
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 534, 616 ] }
1,724
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 895, 983 ] }
1,725
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * // importANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortuna...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1650, 1729 ] }
1,726
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2042, 2144 ] }
1,727
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
ISetToken
interface ISetToken is IERC20 { /* ============ Enums ============ */ enum ModuleState { NONE, PENDING, INITIALIZED } /* ============ Structs ============ */ /** * The base definition of a SetToken Position * * @param component Addres...
/** * @title ISetToken * @author Set Protocol * * Interface for operating with SetTokens. */
NatSpecMultiLine
addComponent
function addComponent(address _component) external;
/* ============ Functions ============ */
Comment
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2326, 2382 ] }
1,728
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SignedSafeMath
library SignedSafeMath { int256 constant private _INT256_MIN = -2**255; /** * @dev Returns the multiplication of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflo...
/** * @title SignedSafeMath * @dev Signed math operations with safety checks that revert on error. */
NatSpecMultiLine
mul
function mul(int256 a, int256 b) internal pure returns (int256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } ...
/** * @dev Returns the multiplication of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 333, 906 ] }
1,729
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SignedSafeMath
library SignedSafeMath { int256 constant private _INT256_MIN = -2**255; /** * @dev Returns the multiplication of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflo...
/** * @title SignedSafeMath * @dev Signed math operations with safety checks that revert on error. */
NatSpecMultiLine
div
function div(int256 a, int256 b) internal pure returns (int256) { require(b != 0, "SignedSafeMath: division by zero"); require(!(b == -1 && a == _INT256_MIN), "SignedSafeMath: division overflow"); int256 c = a / b; return c; }
/** * @dev Returns the integer division of two signed integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1375, 1651 ] }
1,730
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SignedSafeMath
library SignedSafeMath { int256 constant private _INT256_MIN = -2**255; /** * @dev Returns the multiplication of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflo...
/** * @title SignedSafeMath * @dev Signed math operations with safety checks that revert on error. */
NatSpecMultiLine
sub
function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a), "SignedSafeMath: subtraction overflow"); return c; }
/** * @dev Returns the subtraction of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1897, 2120 ] }
1,731
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SignedSafeMath
library SignedSafeMath { int256 constant private _INT256_MIN = -2**255; /** * @dev Returns the multiplication of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflo...
/** * @title SignedSafeMath * @dev Signed math operations with safety checks that revert on error. */
NatSpecMultiLine
add
function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a), "SignedSafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2360, 2580 ] }
1,732
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 259, 445 ] }
1,733
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 723, 864 ] }
1,734
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1162, 1359 ] }
1,735
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1613, 2089 ] }
1,736
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2560, 2697 ] }
1,737
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 3188, 3471 ] }
1,738
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 3931, 4066 ] }
1,739
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 4546, 4717 ] }
1,740
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toUint128
function toUint128(uint256 value) internal pure returns (uint128) { require(value < 2**128, "SafeCast: value doesn\'t fit in 128 bits"); return uint128(value); }
/** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 317, 506 ] }
1,741
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toUint64
function toUint64(uint256 value) internal pure returns (uint64) { require(value < 2**64, "SafeCast: value doesn\'t fit in 64 bits"); return uint64(value); }
/** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 800, 984 ] }
1,742
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toUint32
function toUint32(uint256 value) internal pure returns (uint32) { require(value < 2**32, "SafeCast: value doesn\'t fit in 32 bits"); return uint32(value); }
/** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1278, 1462 ] }
1,743
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toUint16
function toUint16(uint256 value) internal pure returns (uint16) { require(value < 2**16, "SafeCast: value doesn\'t fit in 16 bits"); return uint16(value); }
/** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1756, 1940 ] }
1,744
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toUint8
function toUint8(uint256 value) internal pure returns (uint8) { require(value < 2**8, "SafeCast: value doesn\'t fit in 8 bits"); return uint8(value); }
/** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2231, 2410 ] }
1,745
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toUint256
function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); }
/** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 2585, 2761 ] }
1,746
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toInt128
function toInt128(int256 value) internal pure returns (int128) { require(value >= -2**127 && value < 2**127, "SafeCast: value doesn\'t fit in 128 bits"); return int128(value); }
/** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 3132, 3337 ] }
1,747
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toInt64
function toInt64(int256 value) internal pure returns (int64) { require(value >= -2**63 && value < 2**63, "SafeCast: value doesn\'t fit in 64 bits"); return int64(value); }
/** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 3703, 3902 ] }
1,748
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toInt32
function toInt32(int256 value) internal pure returns (int32) { require(value >= -2**31 && value < 2**31, "SafeCast: value doesn\'t fit in 32 bits"); return int32(value); }
/** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 4268, 4467 ] }
1,749
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toInt16
function toInt16(int256 value) internal pure returns (int16) { require(value >= -2**15 && value < 2**15, "SafeCast: value doesn\'t fit in 16 bits"); return int16(value); }
/** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 4833, 5032 ] }
1,750
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toInt8
function toInt8(int256 value) internal pure returns (int8) { require(value >= -2**7 && value < 2**7, "SafeCast: value doesn\'t fit in 8 bits"); return int8(value); }
/** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 5394, 5587 ] }
1,751
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
SafeCast
library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ ...
/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` ...
NatSpecMultiLine
toInt256
function toInt256(uint256 value) internal pure returns (int256) { require(value < 2**255, "SafeCast: value doesn't fit in an int256"); return int256(value); }
/** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 5767, 5953 ] }
1,752
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
accrueFee
function accrueFee(ISetToken _setToken) public nonReentrant onlyValidAndInitializedSet(_setToken) { uint256 managerFee; uint256 protocolFee; if (_streamingFeePercentage(_setToken) > 0) { uint256 inflationFeePercentage = _calculateStreamingFee(_setToken); // Calculate incentiveFee in...
/* * Calculates total inflation percentage then mints new Sets to the fee recipient. Position units are * then adjusted down (in magnitude) in order to ensure full collateralization. Callable by anyone. * * @param _setToken Address of SetToken */
Comment
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 1855, 2754 ] }
1,753
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
initialize
function initialize( ISetToken _setToken, FeeState memory _settings ) external onlySetManager(_setToken, msg.sender) onlyValidAndPendingSet(_setToken) { require(_settings.feeRecipient != address(0), "Fee Recipient must be non-zero address."); require(_settings.maxStreamingFeePercent...
/** * SET MANAGER ONLY. Initialize module with SetToken and set the fee state for the SetToken. Passed * _settings will have lastStreamingFeeTimestamp over-written. * * @param _setToken Address of SetToken * @param _settings FeeState struct defining fee parameters */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 3098, 3794 ] }
1,754
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
removeModule
function removeModule() external override { delete feeStates[ISetToken(msg.sender)]; }
/** * Removes this module from the SetToken, via call by the SetToken. Manager's feeState is deleted. Fees * are not accrued in case reason for removing module is related to fee accrual. */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 4010, 4115 ] }
1,755
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
updateStreamingFee
function updateStreamingFee( ISetToken _setToken, uint256 _newFee ) external onlySetManager(_setToken, msg.sender) onlyValidAndInitializedSet(_setToken) { require(_newFee < _maxStreamingFeePercentage(_setToken), "Fee must be less than max"); accrueFee(_setToken); feeStates[_s...
/* * Set new streaming fee. Fees accrue at current rate then new rate is set. * Fees are accrued to prevent the manager from unfairly accruing a larger percentage. * * @param _setToken Address of SetToken * @param _newFee New streaming fee 18 decimal precision */
Comment
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 4437, 4917 ] }
1,756
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
updateFeeRecipient
function updateFeeRecipient(ISetToken _setToken, address _newFeeRecipient) external onlySetManager(_setToken, msg.sender) onlyValidAndInitializedSet(_setToken) { require(_newFeeRecipient != address(0), "Fee Recipient must be non-zero address."); feeStates[_setToken].feeRecipient = _newFeeRec...
/* * Set new fee recipient. * * @param _setToken Address of SetToken * @param _newFeeRecipient New fee recipient */
Comment
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 5088, 5526 ] }
1,757
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
getFee
function getFee(ISetToken _setToken) external view returns (uint256) { return _calculateStreamingFee(_setToken); }
/* * Calculates total inflation percentage in order to accrue fees to manager. * * @param _setToken Address of SetToken * @return uint256 Percent inflation of supply */
Comment
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 5746, 5879 ] }
1,758
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
_calculateStreamingFee
function _calculateStreamingFee(ISetToken _setToken) internal view returns(uint256) { uint256 timeSinceLastFee = block.timestamp.sub(_lastStreamingFeeTimestamp(_setToken)); // Streaming fee is streaming fee times years since last fee return timeSinceLastFee.mul(_streamingFeePercentage(_setToken)).div(O...
/** * Calculates streaming fee by multiplying streamingFeePercentage by the elapsed amount of time since the last fee * was collected divided by one year in seconds, since the fee is a yearly fee. * * @param _setToken Address of Set to have feeState updated * @return uint256 Streaming fee...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 6336, 6700 ] }
1,759
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
_calculateStreamingFeeInflation
function _calculateStreamingFeeInflation( ISetToken _setToken, uint256 _feePercentage ) internal view returns (uint256) { uint256 totalSupply = _setToken.totalSupply(); // fee * totalSupply uint256 a = _feePercentage.mul(totalSupply); // ScaleFactor (10e18) - fee ...
/** * Returns the new incentive fee denominated in the number of SetTokens to mint. The calculation for the fee involves * implying mint quantity so that the feeRecipient owns the fee percentage of the entire supply of the Set. * * The formula to solve for fee is: * (feeQuantity / feeQuantity) + totalSupply =...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 7406, 7876 ] }
1,760
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
_mintManagerAndProtocolFee
function _mintManagerAndProtocolFee(ISetToken _setToken, uint256 _feeQuantity) internal returns (uint256, uint256) { address protocolFeeRecipient = controller.feeRecipient(); uint256 protocolFee = controller.getModuleFee(address(this), PROTOCOL_STREAMING_FEE_INDEX); uint256 protocolFeeAmount = _feeQuan...
/** * Mints sets to both the manager and the protocol. Protocol takes a percentage fee of the total amount of Sets * minted to manager. * * @param _setToken SetToken instance * @param _feeQuantity Amount of Sets to be minted as fees * @return uint256 Amount of S...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 8350, 9045 ] }
1,761
StreamingFeeModule
StreamingFeeModule.sol
0x3d8d14b7efb8e342189ee14c3d40dce005eb901b
Solidity
StreamingFeeModule
contract StreamingFeeModule is ModuleBase, ReentrancyGuard { using SafeMath for uint256; using PreciseUnitMath for uint256; using SafeCast for uint256; using SignedSafeMath for int256; using PreciseUnitMath for int256; using SafeCast for int256; /* ============ Structs =========...
/** * @title StreamingFeeModule * @author Set Protocol * * Smart contract that accrues streaming fees for Set managers. Streaming fees are denominated as percent * per year and realized as Set inflation rewarded to the manager. */
NatSpecMultiLine
_editPositionMultiplier
function _editPositionMultiplier(ISetToken _setToken, uint256 _inflationFee) internal { int256 currentMultipler = _setToken.positionMultiplier(); int256 newMultiplier = currentMultipler.preciseMul(PreciseUnitMath.preciseUnit().sub(_inflationFee).toInt256()); _setToken.editPositionMultiplier(newMultipli...
/** * Calculates new position multiplier according to following formula: * * newMultiplier = oldMultiplier * (1-inflationFee) * * This reduces position sizes to offset increase in supply due to fee collection. * * @param _setToken SetToken instance * @param _inflationFee Fee ...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
Apache-2.0
ipfs://ba7667045a62821576f45f97bfd8b1cc568441fd88b75e911a09cd56a86503c4
{ "func_code_index": [ 9429, 9777 ] }
1,762
DarkCountryBase
contracts/DarkCountryBase.sol
0xff15b5f18889704cf4a05026858e299596c4793b
Solidity
DarkCountryBase
contract DarkCountryBase is ERC1155Tradable { constructor(address _proxyRegistryAddress) ERC1155Tradable( "Dark Country Base", "DCB", _proxyRegistryAddress ) public { } /** * @notice Will update the base URL of token's URI * @param _newBaseMetadataURI New base URL of token's URI ...
/** * @title Dark Country Main */
NatSpecMultiLine
setBaseMetadataURI
function setBaseMetadataURI(string memory _newBaseMetadataURI) public onlyOwner { _setBaseMetadataURI(_newBaseMetadataURI); }
/** * @notice Will update the base URL of token's URI * @param _newBaseMetadataURI New base URL of token's URI */
NatSpecMultiLine
v0.5.12+commit.7709ece9
MIT
bzzr://d56ea4e300f172a12c6375dae457da4338ecb0d1475b1bcd5513d2a3df7d4851
{ "func_code_index": [ 325, 463 ] }
1,763
PlayerBook
contracts/library/MSFun.sol
0x1a7badbc3a718aacd2723a73d01f34daf5b69dab
Solidity
MSFun
library MSFun { //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // DATA SETS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // contact data setup struct Data { mapping (bytes32 => ProposalData) proposal_; } struct ProposalData ...
/** @title -MSFun- v0.2.4 * ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ * │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ * ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ * _____ _____ * (, / /) /)...
NatSpecMultiLine
multiSig
function multiSig(Data storage self, uint256 _requiredSignatures, bytes32 _whatFunction) internal returns(bool) { // our proposal key will be a hash of our function name + our contracts address // by adding our contracts address to this, we prevent anyone trying to circumvent // the proposal...
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // MULTI SIG FUNCTIONS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LineComment
v0.4.24+commit.e67f0147
bzzr://311231953993e7a42a5e78aab27d6665fd916188dd691c3c56f0b76d8ed9daa3
{ "func_code_index": [ 804, 4806 ] }
1,764
PlayerBook
contracts/library/MSFun.sol
0x1a7badbc3a718aacd2723a73d01f34daf5b69dab
Solidity
MSFun
library MSFun { //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // DATA SETS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // contact data setup struct Data { mapping (bytes32 => ProposalData) proposal_; } struct ProposalData ...
/** @title -MSFun- v0.2.4 * ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ * │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ * ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ * _____ _____ * (, / /) /)...
NatSpecMultiLine
deleteProposal
function deleteProposal(Data storage self, bytes32 _whatFunction) internal { //done for readability sake bytes32 _whatProposal = whatProposal(_whatFunction); address _whichAdmin; //delete the admins votes & log. i know for loops are terrible. but we have to do this //for our...
// deletes proposal signature data after successfully executing a multiSig function
LineComment
v0.4.24+commit.e67f0147
bzzr://311231953993e7a42a5e78aab27d6665fd916188dd691c3c56f0b76d8ed9daa3
{ "func_code_index": [ 4908, 5735 ] }
1,765
PlayerBook
contracts/library/MSFun.sol
0x1a7badbc3a718aacd2723a73d01f34daf5b69dab
Solidity
MSFun
library MSFun { //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // DATA SETS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // contact data setup struct Data { mapping (bytes32 => ProposalData) proposal_; } struct ProposalData ...
/** @title -MSFun- v0.2.4 * ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ * │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ * ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ * _____ _____ * (, / /) /)...
NatSpecMultiLine
whatProposal
function whatProposal(bytes32 _whatFunction) private view returns(bytes32) { return(keccak256(abi.encodePacked(_whatFunction,this))); }
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // HELPER FUNCTIONS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LineComment
v0.4.24+commit.e67f0147
bzzr://311231953993e7a42a5e78aab27d6665fd916188dd691c3c56f0b76d8ed9daa3
{ "func_code_index": [ 5915, 6101 ] }
1,766
PlayerBook
contracts/library/MSFun.sol
0x1a7badbc3a718aacd2723a73d01f34daf5b69dab
Solidity
MSFun
library MSFun { //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // DATA SETS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // contact data setup struct Data { mapping (bytes32 => ProposalData) proposal_; } struct ProposalData ...
/** @title -MSFun- v0.2.4 * ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ * │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ * ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ * _____ _____ * (, / /) /)...
NatSpecMultiLine
checkMsgData
function checkMsgData (Data storage self, bytes32 _whatFunction) internal view returns (bytes32 msg_data) { bytes32 _whatProposal = whatProposal(_whatFunction); return (self.proposal_[_whatProposal].msgData); }
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // VANITY FUNCTIONS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // returns a hashed version of msg.data sent by original signer for any given function
LineComment
v0.4.24+commit.e67f0147
bzzr://311231953993e7a42a5e78aab27d6665fd916188dd691c3c56f0b76d8ed9daa3
{ "func_code_index": [ 6371, 6641 ] }
1,767
PlayerBook
contracts/library/MSFun.sol
0x1a7badbc3a718aacd2723a73d01f34daf5b69dab
Solidity
MSFun
library MSFun { //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // DATA SETS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // contact data setup struct Data { mapping (bytes32 => ProposalData) proposal_; } struct ProposalData ...
/** @title -MSFun- v0.2.4 * ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ * │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ * ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ * _____ _____ * (, / /) /)...
NatSpecMultiLine
checkCount
function checkCount (Data storage self, bytes32 _whatFunction) internal view returns (uint256 signature_count) { bytes32 _whatProposal = whatProposal(_whatFunction); return (self.proposal_[_whatProposal].count); }
// returns number of signers for any given function
LineComment
v0.4.24+commit.e67f0147
bzzr://311231953993e7a42a5e78aab27d6665fd916188dd691c3c56f0b76d8ed9daa3
{ "func_code_index": [ 6705, 6978 ] }
1,768
PlayerBook
contracts/library/MSFun.sol
0x1a7badbc3a718aacd2723a73d01f34daf5b69dab
Solidity
MSFun
library MSFun { //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // DATA SETS //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // contact data setup struct Data { mapping (bytes32 => ProposalData) proposal_; } struct ProposalData ...
/** @title -MSFun- v0.2.4 * ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ * │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ * ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ * _____ _____ * (, / /) /)...
NatSpecMultiLine
checkSigner
function checkSigner (Data storage self, bytes32 _whatFunction, uint256 _signer) internal view returns (address signer) { require(_signer > 0, "MSFun checkSigner failed - 0 not allowed"); bytes32 _whatProposal = whatProposal(_whatFunction); return (self.proposal_[_whatProposal].log[_signe...
// returns address of an admin who signed for any given function
LineComment
v0.4.24+commit.e67f0147
bzzr://311231953993e7a42a5e78aab27d6665fd916188dd691c3c56f0b76d8ed9daa3
{ "func_code_index": [ 7055, 7423 ] }
1,769
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
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(!has(role, account), "Roles: account already has role"); role.bearer[accoun...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
add
function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; }
/** * @dev Give an account access to this role. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 155, 338 ] }
1,770
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
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(!has(role, account), "Roles: account already has role"); role.bearer[accoun...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
remove
function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; }
/** * @dev Remove an account's access to this role. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 413, 601 ] }
1,771
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
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(!has(role, account), "Roles: account already has role"); role.bearer[accoun...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; }
/** * @dev Check if an account has this role. * @return bool */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 691, 899 ] }
1,772
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 94, 154 ] }
1,773
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 237, 310 ] }
1,774
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 534, 616 ] }
1,775
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through `transferFrom`. This is * zero by default. * * This value changes when `approve` or `transferFrom` are called. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 895, 983 ] }
1,776
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * > Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * trans...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 1638, 1717 ] }
1,777
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 2030, 2132 ] }
1,778
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 251, 437 ] }
1,779
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 707, 896 ] }
1,780
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 1142, 1617 ] }
1,781
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 2080, 2418 ] }
1,782
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 2870, 3027 ] }
1,783
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See `IERC20.totalSupply`. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 287, 383 ] }
1,784
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See `IERC20.balanceOf`. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 441, 556 ] }
1,785
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(msg.sender, recipient, amount); return true; }
/** * @dev See `IERC20.transfer`. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 764, 925 ] }
1,786
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See `IERC20.allowance`. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 983, 1122 ] }
1,787
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
approve
function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; }
/** * @dev See `IERC20.approve`. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 1264, 1417 ] }
1,788
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; }
/** * @dev See `IERC20.transferFrom`. * * Emits an `Approval` event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of `ERC20`; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `valu...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 1883, 2144 ] }
1,789
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to `approve` that can be used as a mitigation for * problems described in `IERC20.approve`. * * Emits an `Approval` event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 2548, 2759 ] }
1,790
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to `approve` that can be used as a mitigation for * problems described in `IERC20.approve`. * * Emits an `Approval` event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 3257, 3478 ] }
1,791
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] ...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to `transfer`, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a `Transfer` event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 3963, 4397 ] }
1,792
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a `Transfer` event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 4673, 4986 ] }
1,793
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_burn
function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Destoys `amount` tokens from `account`, reducing the * total supply. * * Emits a `Transfer` event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 5302, 5613 ] }
1,794
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); }
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an `Approval` event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 6048, 6388 ] }
1,795
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); }
/** * @dev Destoys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See `_burn` and `_approve`. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 6568, 6761 ] }
1,796
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
Pausable
contract Pausable is PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
paused
function paused() public view returns (bool) { return _paused; }
/** * @dev Returns true if the contract is paused, and false otherwise. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 605, 688 ] }
1,797
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
Pausable
contract Pausable is PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
pause
function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); }
/** * @dev Called by a pauser to pause, triggers stopped state. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 1185, 1306 ] }
1,798
SuperOneToken
SuperOneToken.sol
0xb149d8c556d888785ad13adb67ed29dc64edcd71
Solidity
Pausable
contract Pausable is PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; ...
/** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your co...
NatSpecMultiLine
unpause
function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(msg.sender); }
/** * @dev Called by a pauser to unpause, returns to normal state. */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
bzzr://a67ac69edad8d6af51988e6bce78ab9ce8b6a6981c9fe5cea4eec75c4815d904
{ "func_code_index": [ 1396, 1519 ] }
1,799