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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | listTokensOfOwner | function listTokensOfOwner(address owner) public view override returns (uint256[] memory tokenIDs) {
require(owner != address(0x0), "zero address owner");
uint256 tokenCount = balanceOf(owner);
tokenIDs = new uint256[](tokenCount);
for(uint256 index = 0; index < tokenCount; index++) {
tokenIDs[i... | /**
* @notice Lists the tokens owned by `owner`.
* Order not specified.
* @dev This function is more useful off chain than on chain.
* @return tokenIDs The list of token IDs.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
6007,
6434
]
} | 22,200 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | exists | function exists(uint256 tokenID) external view override returns (bool status) {
return _exists(tokenID);
}
| /**
* @notice Determines if a token exists or not.
* @param tokenID The ID of the token to query.
* @return status True if the token exists, false if it doesn't.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
6625,
6747
]
} | 22,201 | ||
ELONMUSK1995 | ELONMUSK1995.sol | 0xf395aabb94f2923ff66b193de70aad11469831c0 | Solidity | ELONMUSK1995 | contract ELONMUSK1995 is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "ELON MUSK 1995";
string private constant _symbol = "ELONMUSK1995";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => ui... | setMinSwapTokensThreshold | function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
_swapTokensAtAmount = swapTokensAtAmount;
}
| //Set minimum tokens required to swap. | LineComment | v0.8.4+commit.c7e474f2 | Unlicense | ipfs://9b45de6f3ae0018a63a900526989c445632e2129d8e492f630b59ae710bce475 | {
"func_code_index": [
12833,
12977
]
} | 22,202 | ||
ELONMUSK1995 | ELONMUSK1995.sol | 0xf395aabb94f2923ff66b193de70aad11469831c0 | Solidity | ELONMUSK1995 | contract ELONMUSK1995 is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "ELON MUSK 1995";
string private constant _symbol = "ELONMUSK1995";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => ui... | toggleSwap | function toggleSwap(bool _swapEnabled) public onlyOwner {
swapEnabled = _swapEnabled;
}
| //Set minimum tokens required to swap. | LineComment | v0.8.4+commit.c7e474f2 | Unlicense | ipfs://9b45de6f3ae0018a63a900526989c445632e2129d8e492f630b59ae710bce475 | {
"func_code_index": [
13024,
13130
]
} | 22,203 | ||
ELONMUSK1995 | ELONMUSK1995.sol | 0xf395aabb94f2923ff66b193de70aad11469831c0 | Solidity | ELONMUSK1995 | contract ELONMUSK1995 is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "ELON MUSK 1995";
string private constant _symbol = "ELONMUSK1995";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => ui... | setMaxTxnAmount | function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner {
_maxTxAmount = maxTxAmount;
}
| //Set MAx transaction | LineComment | v0.8.4+commit.c7e474f2 | Unlicense | ipfs://9b45de6f3ae0018a63a900526989c445632e2129d8e492f630b59ae710bce475 | {
"func_code_index": [
13162,
13275
]
} | 22,204 | ||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | // Allow this contract to receive ether | LineComment | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
4862,
4895
]
} | 22,205 | ||||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | setIsFrozen | function setIsFrozen(bool _newState) external onlyAuthorized {
isFrozen = _newState;
}
| /// @notice Allows an authorized address to freeze or unfreeze this contract
/// @param _newState True for frozen and false for unfrozen | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
5042,
5144
]
} | 22,206 | ||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | _permitCall | function _permitCall(PermitData[] memory data) internal {
// Make the permit call to the token in the data field using
// the fields provided.
if (data.length != 0) {
// We make permit calls for each indicated call
for (uint256 i = 0; i < data.length; i++) {
data[i].tokenContract... | /// @notice Makes permit calls indicated by a struct
/// @param data the struct which has the permit calldata | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
5566,
6208
]
} | 22,207 | ||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | setApprovalsFor | function setApprovalsFor(
address[] memory tokens,
address[] memory spenders,
uint256[] memory amounts
) external onlyAuthorized {
require(tokens.length == spenders.length, "Incorrect length");
require(tokens.length == amounts.length, "Incorrect length");
for (uint256 i = 0; i < tokens.length; i... | /// @notice This function sets approvals on all ERC20 tokens.
/// @param tokens An array of token addresses which are to be approved
/// @param spenders An array of contract addresses, most likely curve and
/// balancer pool addresses
/// @param amounts An array of amounts for which at each index, the spender
/// from ... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
6698,
7357
]
} | 22,208 | ||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | zapIn | function zapIn(
ZapInInfo memory _info,
ZapCurveLpIn memory _zap,
ZapCurveLpIn memory _childZap,
PermitData[] memory _permitData
)
external
payable
nonReentrant
notFrozen
preApproval(_permitData)
returns (uint256 ptAmount)
{
// Instantiation of the context amount container wh... | /// @notice zapIn Exchanges a number of tokens which are used in a specific
/// curve pool(s) for a principal token.
/// @param _info See ZapInInfo struct
/// @param _zap See ZapCurveLpIn struct - This is the "main" or parent zap
/// which produces the lp token necessary to swap for the principal token
/// @param _chil... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
7910,
9875
]
} | 22,209 | ||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | _zapCurveLpIn | function _zapCurveLpIn(ZapCurveLpIn memory _zap, uint256[3] memory _ctx)
internal
returns (uint256)
{
// All curvePools have either 2 or 3 "root" tokens
require(
_zap.amounts.length == 2 || _zap.amounts.length == 3,
"!(2 >= amounts.length <= 3)"
);
// Flag to detect if a zap to ... | /// @notice This function will add liquidity to a target curve pool,
/// returning some amount of LP tokens as a result. This is effectively
/// swapping amounts of the dependent curve pool tokens for the LP token
/// which will be used elsewhere
/// @param _zap ZapCurveLpIn struct
/// @param _ctx fixed length array us... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
10449,
12981
]
} | 22,210 | ||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | zapOut | function zapOut(
ZapOutInfo memory _info,
ZapCurveLpOut memory _zap,
ZapCurveLpOut memory _childZap,
PermitData[] memory _permitData
)
external
payable
nonReentrant
notFrozen
preApproval(_permitData)
returns (uint256 amount)
{
// First, principalTokenAmount of principal token... | /// @notice zapOut Allows users sell their principalTokens and subsequently
/// swap the resultant curve LP token for one of its dependent "root tokens"
/// @param _info See ZapOutInfo
/// @param _zap See ZapCurveLpOut
/// @param _childZap See ZapCurveLpOut | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
13261,
15551
]
} | 22,211 | ||
ZapSwapCurve | contracts/zaps/ZapSwapCurve.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | ZapSwapCurve | contract ZapSwapCurve is Authorizable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
// Store the accessibility state of the contract
bool public isFrozen;
// A constant to represent ether
address internal constant _ETH_CONSTANT =
address(0xEeeeeEeeeEeEeeEeEe... | /// @title ZapCurveTokenToPrincipalToken
/// @notice Allows the user to buy and sell principal tokens using a wider
/// array of tokens
/// @dev This contract introduces the concept of "root tokens" which are the
/// set of constituent tokens for a given curve pool. Each principal token
/// is constructed by a yield-ge... | NatSpecSingleLine | _zapCurveLpOut | function _zapCurveLpOut(
ZapCurveLpOut memory _zap,
uint256 _lpTokenAmount,
uint256 _minRootTokenAmount,
address payable _recipient
) internal returns (uint256 rootAmount) {
// Flag to detect if we are sending to recipient
bool transferToRecipient = address(this) != _recipient;
uint256 befor... | /// @notice Swaps an amount of curve LP tokens for a single root token
/// @param _zap See ZapCurveLpOut
/// @param _lpTokenAmount This is the amount of lpTokens we are swapping
/// with
/// @param _minRootTokenAmount This is the minimum amount of "root" tokens
/// the user expects to swap for. Used only in the final z... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
16124,
17946
]
} | 22,212 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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 r... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
104,
168
]
} | 22,213 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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 r... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
261,
338
]
} | 22,214 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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 r... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
584,
670
]
} | 22,215 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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 r... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
971,
1063
]
} | 22,216 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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 r... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
1770,
1853
]
} | 22,217 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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 r... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
2194,
2300
]
} | 22,218 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
290,
496
]
} | 22,219 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
805,
958
]
} | 22,220 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
1287,
1504
]
} | 22,221 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
1789,
2309
]
} | 22,222 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
2817,
2966
]
} | 22,223 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
3494,
3801
]
} | 22,224 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
4298,
4445
]
} | 22,225 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | 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... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
4962,
5149
]
} | 22,226 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
658,
1322
]
} | 22,227 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
2301,
2727
]
} | 22,228 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
3538,
3726
]
} | 22,229 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
3970,
4183
]
} | 22,230 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
4587,
4830
]
} | 22,231 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
5100,
5437
]
} | 22,232 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
586,
682
]
} | 22,233 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
1288,
1457
]
} | 22,234 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
1620,
1889
]
} | 22,235 | ||
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | BEPRO | contract BEPRO is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
... | // Contract implementation | LineComment | manualSwap | function manualSwap() external onlyOwner() {
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
| // We are exposing these functions to be able to manual swap and send
// in case the token is highly valued and 5M becomes too much | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
12090,
12267
]
} | 22,236 |
BEPRO | BEPRO.sol | 0x23e8fdab3f2a8e709dc577eae8bb7b721a33a822 | Solidity | BEPRO | contract BEPRO is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
... | // Contract implementation | LineComment | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://9739fba99cd1504161e1e8c0dd3eccd7498ce1929c7dd47760fcfa9f95285d0e | {
"func_code_index": [
16638,
16676
]
} | 22,237 | ||
Crowdsale | Crowdsale.sol | 0xc2db3637b64503a821adb44bcf0f1a3a88823a4b | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 300;
token tokenReward;
// mapping (address => uint) public con... | function () payable {
buyTokens(msg.sender);
}
| // fallback function can be used to buy tokens | LineComment | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://a0d5332de2d63c7065b0ccd64bf5740038ef1b49e9a19a1acce57ad86286e60a | {
"func_code_index": [
1885,
1942
]
} | 22,238 | ||||
Crowdsale | Crowdsale.sol | 0xc2db3637b64503a821adb44bcf0f1a3a88823a4b | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 300;
token tokenReward;
// mapping (address => uint) public con... | buyTokens | function buyTokens(address beneficiary) payable {
require(beneficiary != 0x0);
require(validPurchase());
uint256 weiAmount = msg.value;
// calculate token amount to be sent
uint256 tokens = (weiAmount) * price;//weiamount * price
// uint256 tokens = (weiAmount/10**(18-decimals)) * price;//weiamou... | // low level token purchase function | LineComment | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://a0d5332de2d63c7065b0ccd64bf5740038ef1b49e9a19a1acce57ad86286e60a | {
"func_code_index": [
1985,
2691
]
} | 22,239 | |||
Crowdsale | Crowdsale.sol | 0xc2db3637b64503a821adb44bcf0f1a3a88823a4b | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 300;
token tokenReward;
// mapping (address => uint) public con... | forwardFunds | function forwardFunds() internal {
// wallet.transfer(msg.value);
if (!wallet.send(msg.value)) {
throw;
}
}
| // send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms | LineComment | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://a0d5332de2d63c7065b0ccd64bf5740038ef1b49e9a19a1acce57ad86286e60a | {
"func_code_index": [
2800,
2935
]
} | 22,240 | |||
Crowdsale | Crowdsale.sol | 0xc2db3637b64503a821adb44bcf0f1a3a88823a4b | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 300;
token tokenReward;
// mapping (address => uint) public con... | validPurchase | function validPurchase() internal constant returns (bool) {
bool withinPeriod = started;
bool nonZeroPurchase = msg.value != 0;
return withinPeriod && nonZeroPurchase;
}
| // @return true if the transaction can buy tokens | LineComment | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://a0d5332de2d63c7065b0ccd64bf5740038ef1b49e9a19a1acce57ad86286e60a | {
"func_code_index": [
2991,
3181
]
} | 22,241 | |||
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
605,
834
]
} | 22,242 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
| /**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
913,
1174
]
} | 22,243 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
1245,
1363
]
} | 22,244 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
| /**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
1435,
1673
]
} | 22,245 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnume... | /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
2281,
2875
]
} | 22,246 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _addTokenToOwnerEnumeration | function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
| /**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
3171,
3397
]
} | 22,247 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _addTokenToAllTokensEnumeration | function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
| /**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
3593,
3762
]
} | 22,248 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _removeTokenFromOwnerEnumeration | function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 ... | /**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
4384,
5377
]
} | 22,249 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | _removeTokenFromAllTokensEnumeration | function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allT... | /**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
5667,
6751
]
} | 22,250 |
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | DirtyPigs | contract DirtyPigs is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 5555;
uint256 public maxMintAmount = 1;
uint256 public nftPerAddressLimit = 120;
uint256 publ... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
637,
742
]
} | 22,251 | ||
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | DirtyPigs | contract DirtyPigs is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 5555;
uint256 public maxMintAmount = 1;
uint256 public nftPerAddressLimit = 120;
uint256 publ... | mint | function mint(uint256 _mintAmount) public payable {
require(!paused, "the contract is paused");
uint256 supply = totalSupply();
if (supply <FreeMintLimit) { //When 1000 have been minted alter price and nft per address limit and nft max amount mint
cost = 0 ether;
maxMintAmount = 1;
}
else {
cos... | // public | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
758,
1805
]
} | 22,252 | ||
DirtyPigs | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0xc27d4fe411069c798a1e18e125f241e9f2c2bcce | Solidity | DirtyPigs | contract DirtyPigs is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 5555;
uint256 public maxMintAmount = 1;
uint256 public nftPerAddressLimit = 120;
uint256 publ... | setNftPerAddressLimit | function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
nftPerAddressLimit = _limit;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://58a7fc1f74873d8819b65927ccaef18738b7efe71867559852887e7ebe86eba7 | {
"func_code_index": [
2611,
2720
]
} | 22,253 | ||
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | Play2liveICO | function Play2liveICO(
address _preSaleToken,
address _Company,
address _OperationsFund,
address _FoundersFund,
address _PartnersFund,
address _AdvisorsFund,
address _BountyFund,
address _Manager,
address _Controller_Address1,
address _Controller_Address2,
address ... | /**
* @dev Contract constructor function
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
2966,
3895
]
} | 22,254 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | setRate | function setRate(uint _rateEth) external oracleOnly {
rateEth = _rateEth;
tokenPrice = tokensPerDollar.mul(rateEth);
}
| /**
* @dev Function to set rate of ETH and update token price
* @param _rateEth current ETH rate
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
4027,
4173
]
} | 22,255 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | startPreIco | function startPreIco() external managerOnly {
require(statusICO == StatusICO.Created || statusICO == StatusICO.PreIcoPaused);
statusICO = StatusICO.PreIcoStarted;
LogStartPreICO();
}
| /**
* @dev Function to start PreICO
* Sets ICO status to PreIcoStarted
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
4273,
4492
]
} | 22,256 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | pausePreIco | function pausePreIco() external managerOnly {
require(statusICO == StatusICO.PreIcoStarted);
statusICO = StatusICO.PreIcoPaused;
LogPausePreICO();
}
| /**
* @dev Function to pause PreICO
* Sets ICO status to PreIcoPaused
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
4591,
4773
]
} | 22,257 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | finishPreIco | function finishPreIco() external managerOnly {
require(statusICO == StatusICO.PreIcoStarted || statusICO == StatusICO.PreIcoPaused);
statusICO = StatusICO.PreIcoFinished;
LogFinishPreICO();
}
| /**
* @dev Function to finish PreICO
* Sets ICO status to PreIcoFinished
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
4875,
5103
]
} | 22,258 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | startIco | function startIco() external managerOnly {
require(statusICO == StatusICO.PreIcoFinished || statusICO == StatusICO.IcoPaused);
statusICO = StatusICO.IcoStarted;
LogStartICO();
}
| /**
* @dev Function to start ICO
* Sets ICO status to IcoStarted
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
5197,
5411
]
} | 22,259 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | pauseIco | function pauseIco() external managerOnly {
require(statusICO == StatusICO.IcoStarted);
statusICO = StatusICO.IcoPaused;
LogPauseICO();
}
| /**
* @dev Function to pause ICO
* Sets ICO status to IcoPaused
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
5504,
5674
]
} | 22,260 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | finishIco | function finishIco() external managerOnly {
require(statusICO == StatusICO.IcoStarted || statusICO == StatusICO.IcoPaused);
uint alreadyMinted = LUC.totalSupply();
uint totalAmount = alreadyMinted.mul(1000).div(publicIcoPart);
LUC.mintTokens(OperationsFund, operationsPart.mul(totalAmount).div(1000))... | /**
* @dev Function to finish ICO
* Sets ICO status to IcoFinished and emits tokens for funds
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
5798,
6532
]
} | 22,261 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | unfreeze | function unfreeze() external managerOnly {
require(statusICO == StatusICO.IcoFinished);
LUC.defrost();
}
| /**
* @dev Unfreeze tokens(enable token transfers)
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
6605,
6737
]
} | 22,262 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | swapTokens | function swapTokens(address _investor) external managerOnly {
require(statusICO != StatusICO.IcoFinished);
require(!swaped[_investor]);
swaped[_investor] = true;
uint tokensToSwap = preSaleToken.balanceOf(_investor);
LUC.mintTokens(_investor, tokensToSwap);
soldAmount = soldAmount.ad... | /**
* @dev Function to swap tokens from pre-sale
* @param _investor pre-sale tokens holder address
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
6873,
7295
]
} | 22,263 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | function() external payable {
if (statusICO == StatusICO.PreIcoStarted) {
require(msg.value >= 100 finney);
}
buy(msg.sender, msg.value.mul(tokenPrice));
}
| /**
* @dev Fallback function calls buy(address _investor, uint _DTRCValue) function to issue tokens
* when investor sends ETH to address of ICO contract and then stores investment amount
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
7515,
7721
]
} | 22,264 | ||
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | buyForInvestor | function buyForInvestor(
address _investor,
uint _lucValue,
string _txHash
)
external
controllersOnly {
buy(_investor, _lucValue);
LogBuyForInvestor(_investor, _lucValue, _txHash);
}
| /**
* @dev Function to issues tokens for investors who made purchases in other cryptocurrencies
* @param _investor address the tokens will be issued to
* @param _txHash transaction hash of investor's payment
* @param _lucValue number of LUC tokens
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
8028,
8292
]
} | 22,265 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | buy | function buy(address _investor, uint _lucValue) internal {
require(statusICO == StatusICO.PreIcoStarted || statusICO == StatusICO.IcoStarted);
uint bonus = getBonus(_lucValue);
uint total = _lucValue.add(bonus);
require(soldAmount + _lucValue <= hardCap);
LUC.mintTokens(_investor, total);
... | /**
* @dev Function to issue tokens for investors who paid in ether
* @param _investor address which the tokens will be issued tokens
* @param _lucValue number of LUC tokens
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
8510,
8905
]
} | 22,266 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | getBonus | function getBonus(uint _value) public constant returns (uint) {
uint bonus = 0;
if (statusICO == StatusICO.PreIcoStarted) {
if (now < 1517356800) {
bonus = _value.mul(30).div(100);
return bonus;
} else {
bonus = _value.mul(25).div(100);
ret... | /**
* @dev Function to calculates bonuses
* @param _value amount of tokens
* @return bonus value
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
9063,
11044
]
} | 22,267 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | register | function register(string _key) public {
keys[msg.sender] = _key;
LogRegister(msg.sender, _key);
}
| /**
* @dev Allows invetsot to register thier Level Up Chain address
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
11134,
11259
]
} | 22,268 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | Play2liveICO | contract Play2liveICO {
// LUC - Level Up Coin token contract
using SafeMath for uint;
LucToken public LUC = new LucToken(this);
Presale public preSaleToken;
// Token price parameters
// These parametes can be changed only by manager of contract
uint public tokensPerDollar = 20;
... | /**
* @title Play2liveICO contract - takes funds from users and issues tokens
*/ | NatSpecMultiLine | withdrawEther | function withdrawEther() external managerOnly {
Company.transfer(this.balance);
}
| /**
* @dev Allows Company withdraw investments
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
11328,
11428
]
} | 22,269 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | LucToken | function LucToken(address _ico) public {
ico = _ico;
}
| /**
* @dev Contract constructor function sets Ico address
* @param _ico ico address
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
561,
633
]
} | 22,270 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | mintTokens | function mintTokens(address _holder, uint _value) external icoOnly {
require(_value > 0);
balances[_holder] = balances[_holder].add(_value);
totalSupply = totalSupply.add(_value);
Transfer(0x0, _holder, _value);
}
| /**
* @dev Function to mint tokens
* @param _holder beneficiary address the tokens will be issued to
* @param _value number of tokens to issue
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
825,
1080
]
} | 22,271 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | defrost | function defrost() external icoOnly {
tokensAreFrozen = false;
}
| /**
* @dev Function to enable token transfers
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
1150,
1232
]
} | 22,272 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _holder) constant returns (uint256) {
return balances[_holder];
}
| /**
* @dev Get balance of tokens holder
* @param _holder holder's address
* @return balance of investor
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
1393,
1505
]
} | 22,273 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _amount) public returns (bool) {
require(!tokensAreFrozen);
balances[msg.sender] = balances[msg.sender].sub(_amount);
balances[_to] = balances[_to].add(_amount);
Transfer(msg.sender, _to, _amount);
return true;
}
| /**
* @dev Send coins
* throws on any error rather then return a false flag to minimize
* user errors
* @param _to target address
* @param _amount transfer amount
*
* @return true if the transfer was successful
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
1794,
2100
]
} | 22,274 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _amount) public returns (bool) {
require(!tokensAreFrozen);
balances[_from] = balances[_from].sub(_amount);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount);
balances[_to] = balances[_to].add(_amount);
Transfer(_from,... | /**
* @dev An account/contract attempts to get the coins
* throws on any error rather then return a false flag to minimize user errors
*
* @param _from source address
* @param _to target address
* @param _amount transfer amount
*
* @return true if the transfer was suc... | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
2467,
2857
]
} | 22,275 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _amount) public returns (bool) {
require((_amount == 0) || (allowed[msg.sender][_spender] == 0));
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
| /**
* @dev Allows another account/contract to spend some tokens on its behalf
* throws on any error rather then return a false flag to minimize user errors
*
* also, to minimize the risk of the approve/transferFrom attack vector
* approve has to be called twice in 2 separate transactions - once to
*... | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
3464,
3747
]
} | 22,276 | |
Play2liveICO | Play2liveICO.sol | 0x4f6be59d4203db1e231b66d426531eae4b283dfb | Solidity | LucToken | contract LucToken is ERC20 {
using SafeMath for uint;
string public name = "Level Up Coin";
string public symbol = "LUC";
uint public decimals = 18;
// Ico contract address
address public ico;
// Tokens transfer ability status
bool public tokensAreFrozen = true;
//... | /**
* @title LucToken
* @dev Luc token contract
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) constant returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
*
* @param _owner the address which owns the funds
* @param _spender the address which will spend the funds
*
* @return the amount of tokens still avaible for the spender
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.25+commit.e7afde95 | bzzr://bf9215428e27debd3dff5b578f025c8c09f76d08ed9ff4246814e8d7c488eb26 | {
"func_code_index": [
4082,
4218
]
} | 22,277 | |
AnimusRegnumArtifacts | /contracts/Polygon/MaticERC1155.sol | 0x12cee5e9fa7c2e6fc2b3097622d40e5038573aad | Solidity | MaticERC1155 | abstract contract MaticERC1155 is ERC1155, ContextMixin, NativeMetaTransaction {
constructor (string memory name_, string memory uri_)
ERC1155(uri_) {
_initializeEIP712(name_);
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by ... | _msgSender | function _msgSender() internal virtual override view returns (address sender){
return ContextMixin.msgSender();
}
| /**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
337,
466
]
} | 22,278 | ||||
AnimusRegnumArtifacts | /contracts/Polygon/MaticERC1155.sol | 0x12cee5e9fa7c2e6fc2b3097622d40e5038573aad | Solidity | MaticERC1155 | abstract contract MaticERC1155 is ERC1155, ContextMixin, NativeMetaTransaction {
constructor (string memory name_, string memory uri_)
ERC1155(uri_) {
_initializeEIP712(name_);
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by ... | isApprovedForAll | function isApprovedForAll( address _owner, address _operator ) public virtual override view returns (bool isOperator) {
if (_operator == address(0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101)) {
return true;
}
return ERC1155.isApprovedForAll(_owner, _operator);
}
| /**
* As another option for supporting trading without requiring meta transactions, override isApprovedForAll to whitelist OpenSea proxy accounts on Matic
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
638,
951
]
} | 22,279 | ||||
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
251,
437
]
} | 22,280 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
707,
848
]
} | 22,281 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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, 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.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
1180,
1377
]
} | 22,282 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
1623,
2099
]
} | 22,283 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
2562,
2699
]
} | 22,284 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
3224,
3574
]
} | 22,285 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
4026,
4161
]
} | 22,286 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
4675,
4846
]
} | 22,287 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
606,
1230
]
} | 22,288 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
2160,
2562
]
} | 22,289 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
3318,
3496
]
} | 22,290 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
3721,
3922
]
} | 22,291 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
4292,
4523
]
} | 22,292 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
4774,
5095
]
} | 22,293 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
94,
154
]
} | 22,294 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
237,
310
]
} | 22,295 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
534,
616
]
} | 22,296 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
895,
983
]
} | 22,297 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
1647,
1726
]
} | 22,298 |
CLV | CLV.sol | 0xb9bc2635eaf45c13229cc1a0ce64cb5f071a7b07 | 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.6.12+commit.27d51765 | None | ipfs://6fb9b1f5020cda15ba29486f0f77d2c159100e46eff59e6b5fceb77c1778eea2 | {
"func_code_index": [
2039,
2141
]
} | 22,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.