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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GmStudioMindTheGap | contracts/collections/MindTheGap/MindTheGap.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | GmStudioMindTheGap | contract GmStudioMindTheGap is
ERC721Common,
ReentrancyGuard,
ERC2981SinglePercentual
{
using EnumerableSet for EnumerableSet.AddressSet;
using SignatureChecker for EnumerableSet.AddressSet;
using Address for address payable;
/// @notice Price for minting
uint256 public constant MINT_PR... | // __ __ __
// | \ | \ \
// ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______
// / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \
// | ▓▓▓▓... | LineComment | storeCode | function storeCode(bytes calldata) external {
if (
codeStoreLocked ||
(mintConfig.signedMintOpeningTimestamp > 0 &&
block.timestamp > mintConfig.signedMintOpeningTimestamp)
) revert CodeStoreLocked();
codeStoreLocked = true;
}
| // calldata. | LineComment | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
8679,
8977
]
} | 2,107 | |
GmStudioMindTheGap | contracts/collections/MindTheGap/MindTheGap.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | GmStudioMindTheGap | contract GmStudioMindTheGap is
ERC721Common,
ReentrancyGuard,
ERC2981SinglePercentual
{
using EnumerableSet for EnumerableSet.AddressSet;
using SignatureChecker for EnumerableSet.AddressSet;
using Address for address payable;
/// @notice Price for minting
uint256 public constant MINT_PR... | // __ __ __
// | \ | \ \
// ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______
// / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \
// | ▓▓▓▓... | LineComment | setBaseTokenURI | function setBaseTokenURI(string calldata uri) external onlyOwner {
_baseTokenURI = uri;
}
| /// @notice Change tokenURI() base path.
/// @param uri The new base path (must not contain trailing slash) | NatSpecSingleLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
9095,
9200
]
} | 2,108 | |
GmStudioMindTheGap | contracts/collections/MindTheGap/MindTheGap.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | GmStudioMindTheGap | contract GmStudioMindTheGap is
ERC721Common,
ReentrancyGuard,
ERC2981SinglePercentual
{
using EnumerableSet for EnumerableSet.AddressSet;
using SignatureChecker for EnumerableSet.AddressSet;
using Address for address payable;
/// @notice Price for minting
uint256 public constant MINT_PR... | // __ __ __
// | \ | \ \
// ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______
// / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \
// | ▓▓▓▓... | LineComment | tokenURI | function tokenURI(uint256 tokenId)
public
view
override
tokenExists(tokenId)
returns (string memory)
{
return
string(
abi.encodePacked(
_baseTokenURI,
"/",
Strings.toString(tokenId),
".json"
)
... | /// @notice Returns the URI for token metadata. | NatSpecSingleLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
9254,
9647
]
} | 2,109 | |
GmStudioMindTheGap | contracts/collections/MindTheGap/MindTheGap.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | GmStudioMindTheGap | contract GmStudioMindTheGap is
ERC721Common,
ReentrancyGuard,
ERC2981SinglePercentual
{
using EnumerableSet for EnumerableSet.AddressSet;
using SignatureChecker for EnumerableSet.AddressSet;
using Address for address payable;
/// @notice Price for minting
uint256 public constant MINT_PR... | // __ __ __
// | \ | \ \
// ______ ______ ____ _______ _| ▓▓_ __ __ ____| ▓▓\▓▓ ______
// / \| \ \ / \ ▓▓ \ | \ | \/ ▓▓ \/ \
// | ▓▓▓▓... | LineComment | supportsInterface | function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Common, ERC2981)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
| /// @dev See {IERC165-supportsInterface}. | NatSpecSingleLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
9890,
10112
]
} | 2,110 | |
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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);
/**
... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
94,
154
]
} | 2,111 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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);
/**
... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
235,
308
]
} | 2,112 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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);
/**
... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
530,
612
]
} | 2,113 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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);
/**
... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
889,
977
]
} | 2,114 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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);
/**
... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
1639,
1718
]
} | 2,115 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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);
/**
... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
2029,
2131
]
} | 2,116 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
259,
445
]
} | 2,117 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
721,
862
]
} | 2,118 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
1158,
1353
]
} | 2,119 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
1605,
2077
]
} | 2,120 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
2546,
2683
]
} | 2,121 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
3172,
3453
]
} | 2,122 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
3911,
4046
]
} | 2,123 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
4524,
4695
]
} | 2,124 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
606,
1230
]
} | 2,125 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
2158,
2560
]
} | 2,126 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
3314,
3492
]
} | 2,127 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
3715,
3916
]
} | 2,128 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
4284,
4515
]
} | 2,129 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | 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 ... | 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://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
4764,
5085
]
} | 2,130 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
493,
577
]
} | 2,131 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender... | 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 | None | ipfs://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
1131,
1284
]
} | 2,132 | ||
GFARM | GFARM.sol | 0x05504f48e8093ce95f2092372cbbe09980365789 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender... | 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 | None | ipfs://a0e8dd6059356d1f673d5edb7d22995f9793cc4a04b9256ca283cffda7f1ca23 | {
"func_code_index": [
1432,
1681
]
} | 2,133 | ||
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
64,
128
]
} | 2,134 | |||
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
242,
319
]
} | 2,135 | |||
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
566,
643
]
} | 2,136 | |||
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
978,
1074
]
} | 2,137 | |||
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
1368,
1449
]
} | 2,138 | |||
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
1665,
1762
]
} | 2,139 | |||
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | TokenDevs | contract TokenDevs is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They ... | //name this contract whatever you'd like | LineComment | TokenDevs | function TokenDevs(
) {
balances[msg.sender] = 100000000; // Give the creator all initial tokens (100000 for example)
totalSupply = 100000000; // Update total supply (100000 for example)
name = "TokenDevs"; // Set the name... | //human 0.1 standard. Just an arbitrary versioning scheme.
//
// CHANGE THESE VALUES FOR YOUR TOKEN
//
//make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token | LineComment | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
1198,
1761
]
} | 2,140 | |
TokenDevs | TokenDevs.sol | 0x01aec44dd1be1bf86f4fe4f768fc8fd46008b166 | Solidity | TokenDevs | contract TokenDevs is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They ... | //name this contract whatever you'd like | LineComment | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manu... | /* Approves and then calls the receiving contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://f359f058ab0d0682f60297a3de328fe4217fb07f450fb4442f54863f8e0fee3c | {
"func_code_index": [
1826,
2647
]
} | 2,141 | |
Defix_POOLX_Core | @openzeppelin/contracts/access/Ownable.sol | 0x2b597f81eafdaae44a74a681992ae9026547a8e8 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
addr... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://acdab1d57408f507d9a2bb2c3890e5d0826c6b0ec5d087d425b69239d1921208 | {
"func_code_index": [
521,
605
]
} | 2,142 |
Defix_POOLX_Core | @openzeppelin/contracts/access/Ownable.sol | 0x2b597f81eafdaae44a74a681992ae9026547a8e8 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
addr... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://acdab1d57408f507d9a2bb2c3890e5d0826c6b0ec5d087d425b69239d1921208 | {
"func_code_index": [
1163,
1316
]
} | 2,143 |
Defix_POOLX_Core | @openzeppelin/contracts/access/Ownable.sol | 0x2b597f81eafdaae44a74a681992ae9026547a8e8 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
addr... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://acdab1d57408f507d9a2bb2c3890e5d0826c6b0ec5d087d425b69239d1921208 | {
"func_code_index": [
1466,
1752
]
} | 2,144 |
TCOREv1Router | contracts/libraries/Math.sol | 0xd4519f1f00e977f72ea74bc2755dd2596fe678da | Solidity | Math | library Math {
function min(uint x, uint y) internal pure returns (uint z) {
z = x < y ? x : y;
}
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
... | // a library for performing various math operations | LineComment | sqrt | function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
z = y;
uint x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
| // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://9e6544b8527264a083bc57b954d307b6b5a4b0563563a80a6099de7e3762e3db | {
"func_code_index": [
230,
538
]
} | 2,145 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
642,
823
]
} | 2,146 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address =>... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public override returns (bool trans1) {
require(_to != address(0));
require(canTransfer(msg.sender));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].ad... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
1216,
1627
]
} | 2,147 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address =>... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view override returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
1760,
1881
]
} | 2,148 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address =>... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) {
require(_to != address(0));
require(canTransfer(msg.sender));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condit... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
2229,
2837
]
} | 2,149 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address =>... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public override returns (bool hello) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
3469,
3679
]
} | 2,150 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address =>... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view override returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
3919,
4070
]
} | 2,151 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address =>... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
4315,
4593
]
} | 2,152 |
CHAINBLOCK | CHAINBLOCK.sol | 0xf9472dcab9efa21dd01d5b7e9d1a40c7f96bd57e | Solidity | BurnableToken | contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value > 0);
require(_valu... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
require(_value > 0);
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://7b08035e5ea6dcfe9c7f6965cf517485d520f560a369ba65c34042e03ca20d7f | {
"func_code_index": [
225,
770
]
} | 2,153 |
TCOREv1Router | @openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol | 0xd4519f1f00e977f72ea74bc2755dd2596fe678da | Solidity | OwnableUpgradeSafe | contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init(... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | __Ownable_init | function __Ownable_init() internal initializer {
__Context_init_unchained();
__Ownable_init_unchained();
}
| /**
* @dev Initializes the contract setting the deployer as the initial owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9e6544b8527264a083bc57b954d307b6b5a4b0563563a80a6099de7e3762e3db | {
"func_code_index": [
292,
426
]
} | 2,154 |
TCOREv1Router | @openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol | 0xd4519f1f00e977f72ea74bc2755dd2596fe678da | Solidity | OwnableUpgradeSafe | contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init(... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9e6544b8527264a083bc57b954d307b6b5a4b0563563a80a6099de7e3762e3db | {
"func_code_index": [
714,
798
]
} | 2,155 |
TCOREv1Router | @openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol | 0xd4519f1f00e977f72ea74bc2755dd2596fe678da | Solidity | OwnableUpgradeSafe | contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init(... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9e6544b8527264a083bc57b954d307b6b5a4b0563563a80a6099de7e3762e3db | {
"func_code_index": [
1356,
1509
]
} | 2,156 |
TCOREv1Router | @openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol | 0xd4519f1f00e977f72ea74bc2755dd2596fe678da | Solidity | OwnableUpgradeSafe | contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init(... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://9e6544b8527264a083bc57b954d307b6b5a4b0563563a80a6099de7e3762e3db | {
"func_code_index": [
1659,
1908
]
} | 2,157 |
BECToken | BECToken.sol | 0x54facff15cf83dbcac3350ba1a00b3d4edf48359 | Solidity | BECToken | contract BECToken is StandardToken {
string public name = "BECoin";
string public symbol = "BEC";
uint public decimals = 3;
function BECToken (address _bank, uint _totalSupply) {
balances[_bank] += _totalSupply;
totalSupply += _totalSupply;
}
// Transfer amount of tokens from sender accoun... | transfer | function transfer(address _recipient, uint _amount)
returns (bool o_success)
{
return super.transfer(_recipient, _amount);
}
| // Transfer amount of tokens from sender account to recipient. | LineComment | v0.4.15+commit.bbb8e64f | bzzr://297030f766a938a97171a74048eaa85e976f553e471186d21dfd6f559a789840 | {
"func_code_index": [
337,
473
]
} | 2,158 | |||
BECToken | BECToken.sol | 0x54facff15cf83dbcac3350ba1a00b3d4edf48359 | Solidity | BECToken | contract BECToken is StandardToken {
string public name = "BECoin";
string public symbol = "BEC";
uint public decimals = 3;
function BECToken (address _bank, uint _totalSupply) {
balances[_bank] += _totalSupply;
totalSupply += _totalSupply;
}
// Transfer amount of tokens from sender accoun... | transferFrom | function transferFrom(address _from, address _recipient, uint _amount)
returns (bool o_success)
{
return super.transferFrom(_from, _recipient, _amount);
}
| // Transfer amount of tokens from a specified address to a recipient. | LineComment | v0.4.15+commit.bbb8e64f | bzzr://297030f766a938a97171a74048eaa85e976f553e471186d21dfd6f559a789840 | {
"func_code_index": [
548,
714
]
} | 2,159 | |||
YFPIPresaleRoundTwo | @openzeppelin/contracts/utils/Address.sol | 0xfaa1e3390f452d98a8fc4dd92aaad55a5e831dd9 | 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.5.17+commit.d19bba13 | MIT | bzzr://008b35a2ff710804b9dfcc06dff11aaa52f28fd3f624dbef8829f38aeaf90c26 | {
"func_code_index": [
607,
1231
]
} | 2,160 |
YFPIPresaleRoundTwo | @openzeppelin/contracts/utils/Address.sol | 0xfaa1e3390f452d98a8fc4dd92aaad55a5e831dd9 | 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 | toPayable | function toPayable(address account) internal pure returns (address payable) {
return address(uint160(account));
}
| /**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://008b35a2ff710804b9dfcc06dff11aaa52f28fd3f624dbef8829f38aeaf90c26 | {
"func_code_index": [
1443,
1575
]
} | 2,161 |
YFPIPresaleRoundTwo | @openzeppelin/contracts/utils/Address.sol | 0xfaa1e3390f452d98a8fc4dd92aaad55a5e831dd9 | 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-call-value
(bool success, ) = recipient.call.value(amount)("");
require(success, "Address: unable to send value, re... | /**
* @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.5.17+commit.d19bba13 | MIT | bzzr://008b35a2ff710804b9dfcc06dff11aaa52f28fd3f624dbef8829f38aeaf90c26 | {
"func_code_index": [
2547,
2923
]
} | 2,162 |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | Proxy | contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
function () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal view returns (address);
... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | function () payable external {
_fallback();
}
| /**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
113,
177
]
} | 2,163 | ||
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | Proxy | contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
function () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal view returns (address);
... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _implementation | function _implementation() internal view returns (address);
| /**
* @return The Address of the implementation.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
249,
313
]
} | 2,164 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | Proxy | contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
function () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal view returns (address);
... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _delegate | function _delegate(address implementation) internal {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize)
... | /**
* @dev Delegates execution to an implementation contract.
* This is a low level function that doesn't return to its internal call site.
* It will return to the external caller whatever the implementation returns.
* @param implementation Address to delegate.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
616,
1435
]
} | 2,165 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | Proxy | contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
function () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal view returns (address);
... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _willFallback | function _willFallback() internal {
}
| /**
* @dev Function that is run as the first thing in the fallback function.
* Can be redefined in derived contracts to add functionality.
* Redefinitions must call super._willFallback().
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
1658,
1705
]
} | 2,166 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | Proxy | contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
function () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal view returns (address);
... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _fallback | function _fallback() internal {
_willFallback();
_delegate(_implementation());
}
| /**
* @dev fallback implementation.
* Extracted to enable manual triggering.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
1811,
1919
]
} | 2,167 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
... | /**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _implementation | function _implementation() internal view returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
| /**
* @dev Returns the current implementation.
* @return Address of the current implementation
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
1576,
1762
]
} | 2,168 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
... | /**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _upgradeTo | function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
| /**
* @dev Upgrades the proxy to a new implementation.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
1908,
2068
]
} | 2,169 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
... | /**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _setImplementation | function _setImplementation(address newImplementation) private {
require(isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
| /**
* @dev Sets the implementation address of the proxy.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
2216,
2529
]
} | 2,170 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
... | /**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
uint256 size;
// XXX Currently there is no better way to check if there is a contract in an address
// than to check the size of the code at that address.
// See https://ethereum.stackexchange.com/a/14016/36603
// for more deta... | /**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a ... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
2895,
3530
]
} | 2,171 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | admin | function admin() external view ifAdmin returns (address) {
return _admin();
}
| /**
* @return The address of the proxy admin.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
1879,
1975
]
} | 2,172 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | implementation | function implementation() external view ifAdmin returns (address) {
return _implementation();
}
| /**
* @return The address of the implementation.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
2047,
2161
]
} | 2,173 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | changeAdmin | function changeAdmin(address newAdmin) external ifAdmin {
require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
emit AdminChanged(_admin(), newAdmin);
_setAdmin(newAdmin);
}
| /**
* @dev Changes the admin of the proxy.
* Only the current admin can call this function.
* @param newAdmin Address to transfer proxy administration to.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
2351,
2598
]
} | 2,174 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | upgradeTo | function upgradeTo(address newImplementation) external ifAdmin {
_upgradeTo(newImplementation);
}
| /**
* @dev Upgrade the backing implementation of the proxy.
* Only the admin can call this function.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
2796,
2912
]
} | 2,175 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | upgradeToAndCall | function upgradeToAndCall(address newImplementation, bytes data) payable external ifAdmin {
_upgradeTo(newImplementation);
require(newImplementation.delegatecall(data));
}
| /**
* @dev Upgrade the backing implementation of the proxy and call a function
* on the new implementation.
* This is useful to initialize the proxied contract.
* @param newImplementation Address of the new implementation.
* @param data Data to send as msg.data in the low level call.
* It should include the... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
3455,
3654
]
} | 2,176 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | _admin | function _admin() internal view returns (address adm) {
bytes32 slot = ADMIN_SLOT;
assembly {
adm := sload(slot)
}
}
| /**
* @return The admin slot.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
3707,
3873
]
} | 2,177 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | _setAdmin | function _setAdmin(address newAdmin) internal {
bytes32 slot = ADMIN_SLOT;
assembly {
sstore(slot, newAdmin)
}
}
| /**
* @dev Sets the address of the proxy admin.
* @param newAdmin Address of the new proxy admin.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
4000,
4164
]
} | 2,178 | |
MedicalCoinProxy | MedicalCoinProxy.sol | 0x33bb3221e512c812e7036c260a6c240b2c0bc317 | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | _willFallback | function _willFallback() internal {
require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
super._willFallback();
}
| /**
* @dev Only fall back when the sender is not the admin.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://ec9335c22150829534e4959c0cd41265cf570076a191f2aa747348825af814fc | {
"func_code_index": [
4247,
4422
]
} | 2,179 | |
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | Token | contract Token {
/* Public variables of the token */
string public standard;
string public name;
string public symbol;
uint8 public decimals;
uint256 public _totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (... | Token | function Token(uint256 initialSupply, string _standard, string _name, string _symbol, uint8 _decimals) {
_totalSupply = initialSupply;
balanceOf[this] = initialSupply;
standard = _standard;
name = _name;
symbol = _symbol;
decimals = _decimals;
}
| /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
659,
968
]
} | 2,180 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | Token | contract Token {
/* Public variables of the token */
string public standard;
string public name;
string public symbol;
uint8 public decimals;
uint256 public _totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (... | totalSupply | function totalSupply() constant returns(uint256 supply) {
return _totalSupply;
}
| /* Get burnable total supply */ | Comment | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
1008,
1107
]
} | 2,181 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | Token | contract Token {
/* Public variables of the token */
string public standard;
string public name;
string public symbol;
uint8 public decimals;
uint256 public _totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (... | transferInternal | function transferInternal(address _from, address _to, uint256 _value) internal returns (bool success) {
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balanceOf[_to]);
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
Transfer(_fr... | /**
* Transfer token logic
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
1307,
1704
]
} | 2,182 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | Token | contract Token {
/* Public variables of the token */
string public standard;
string public name;
string public symbol;
uint8 public decimals;
uint256 public _totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (... | approve | function approve(address _spender, uint256 _value) returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
1944,
2106
]
} | 2,183 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | Token | contract Token {
/* Public variables of the token */
string public standard;
string public name;
string public symbol;
uint8 public decimals;
uint256 public _totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (... | transferFromInternal | function transferFromInternal(address _from, address _to, uint256 _value) internal returns (bool success) {
require(_value >= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
return transferInternal(_from, _to, _value);
}
| /**
* Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
2391,
2696
]
} | 2,184 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | ICO | contract ICO {
uint256 public PRE_ICO_SINCE = 1500303600; // 07/17/2017 @ 15:00 (UTC)
uint256 public PRE_ICO_TILL = 1500476400; // 07/19/2017 @ 15:00 (UTC)
uint256 public constant PRE_ICO_BONUS_RATE = 70;
uint256 public constant PRE_ICO_SLGN_LESS = 5000 ether... | calculateBonus | function calculateBonus(uint8 icoStep, uint256 totalSoldSlogns, uint256 soldSlogns) returns (uint256) {
if(icoStep == 1) {
// pre ico
return soldSlogns / 100 * PRE_ICO_BONUS_RATE;
}
else if(icoStep == 2) {
// ico
if(totalSoldSlogns > ICO_BONUS1_SLGN_LESS + ICO_BONUS2_S... | /**
* Calculate amount of premium bonuses
* @param icoStep identifies is it pre-ico (equals 0) or ico (equals 1)
* @param totalSoldSlogns total amount of already sold slogn tokens.
* @param soldSlogns total amount sold slogns in current transaction.
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
1525,
2977
]
} | 2,185 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | EscrowICO | contract EscrowICO is Token, ICO {
uint256 public constant MIN_PRE_ICO_SLOGN_COLLECTED = 1000 ether; // PRE ICO is successful only if sold 10.000.000 slogns
uint256 public constant MIN_ICO_SLOGN_COLLECTED = 1000 ether; // ICO is successful only if sold 100.000.000 slogns
bool public isTr... | icoFinishInternal | function icoFinishInternal(uint256 time) internal returns (bool) {
if(time <= ICO_TILL) {
return false;
}
if(totalSoldSlogns >= MIN_ICO_SLOGN_COLLECTED) {
// burn tokens assigned to smart contract
_totalSupply = _totalSupply - balanceOf[this];
balanceOf[this] = 0... | /**
* officially finish ICO, only allowed after ICO is ended
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
1182,
1730
]
} | 2,186 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | EscrowICO | contract EscrowICO is Token, ICO {
uint256 public constant MIN_PRE_ICO_SLOGN_COLLECTED = 1000 ether; // PRE ICO is successful only if sold 10.000.000 slogns
uint256 public constant MIN_ICO_SLOGN_COLLECTED = 1000 ether; // ICO is successful only if sold 100.000.000 slogns
bool public isTr... | refundInternal | function refundInternal(uint256 time) internal returns (bool) {
if(time <= PRE_ICO_TILL) {
return false;
}
if(totalSoldSlogns >= MIN_PRE_ICO_SLOGN_COLLECTED) {
return false;
}
uint256 transferedEthers;
transferedEthers = preIcoEthers[msg.sender];
if(transfere... | /**
* refund ico method
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
1777,
2418
]
} | 2,187 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | SlognToken | contract SlognToken is Token, EscrowICO {
string public constant STANDARD = 'Slogn v0.1';
string public constant NAME = 'SLOGN';
string public constant SYMBOL = 'SLGN';
uint8 public constant PRECISION = 14;
uint256 public constant TOTAL_SUPPLY = 800000 ether; // initial total supply equals to... | SlognToken | function SlognToken(
address [] coreTeam,
address _advisoryBoardFundManager,
address _opensourceFundManager,
address _reserveFundManager,
address _bountyFundManager,
address _ethFundManager
)
Token (TOTAL_SUPPLY, STANDARD, NAME, SYMBOL, PRECISION)
EscrowICO()
{
owner = msg.sender;
advisoryBoardFun... | /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
1374,
2649
]
} | 2,188 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | SlognToken | contract SlognToken is Token, EscrowICO {
string public constant STANDARD = 'Slogn v0.1';
string public constant NAME = 'SLOGN';
string public constant SYMBOL = 'SLGN';
uint8 public constant PRECISION = 14;
uint256 public constant TOTAL_SUPPLY = 800000 ether; // initial total supply equals to... | buy | function buy() payable {
buyFor(msg.sender, msg.value, block.timestamp);
}
| /**
* Buy Slogn tokens
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
3828,
3921
]
} | 2,189 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | SlognToken | contract SlognToken is Token, EscrowICO {
string public constant STANDARD = 'Slogn v0.1';
string public constant NAME = 'SLOGN';
string public constant SYMBOL = 'SLGN';
uint8 public constant PRECISION = 14;
uint256 public constant TOTAL_SUPPLY = 800000 ether; // initial total supply equals to... | transferEther | function transferEther(address to, uint256 value) returns (bool success) {
if(msg.sender != ethFundManager) {
return false;
}
if(totalSoldSlogns < MIN_PRE_ICO_SLOGN_COLLECTED) {
return false;
}
if(this.balance < value) {
return false;
}
to.transfer(val... | /**
* Manage ethereum balance
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
4071,
4471
]
} | 2,190 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | SlognToken | contract SlognToken is Token, EscrowICO {
string public constant STANDARD = 'Slogn v0.1';
string public constant NAME = 'SLOGN';
string public constant SYMBOL = 'SLGN';
uint8 public constant PRECISION = 14;
uint256 public constant TOTAL_SUPPLY = 800000 ether; // initial total supply equals to... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {
if(isTransactionsAllowed == false) {
if(msg.sender != bountyFundManager) {
return false;
}
}
return transferInternal(msg.sender, _to, _value);
}
| /**
* Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
4638,
4936
]
} | 2,191 | |||
SlognToken | SlognToken.sol | 0xc0506ceb264b057182a4c3ab8a0b910a545479f0 | Solidity | SlognToken | contract SlognToken is Token, EscrowICO {
string public constant STANDARD = 'Slogn v0.1';
string public constant NAME = 'SLOGN';
string public constant SYMBOL = 'SLGN';
uint8 public constant PRECISION = 14;
uint256 public constant TOTAL_SUPPLY = 800000 ether; // initial total supply equals to... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if(isTransactionsAllowed == false) {
if(_from != bountyFundManager) {
return false;
}
}
return transferFromInternal(_from, _to, _value);
}
| /**
* Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/ | NatSpecMultiLine | v0.4.11+commit.68ef5810 | bzzr://520b39c434969b3452207146d6707e4c87a166a43c7bf277f368ab5aa6b45faf | {
"func_code_index": [
5221,
5532
]
} | 2,192 | |||
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | addReward | function addReward(
address _rewardsToken,
address _distributor,
bool _useBoost
) public onlyOwner {
require(rewardData[_rewardsToken].lastUpdateTime == 0);
rewardTokens.push(_rewardsToken);
rewardData[_rewardsToken].lastUpdateTime = uint40(block.timestamp);
rewardData[_rewardsToken].periodFinish = uint40... | // Add a new reward token to be distributed to stakers | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
3150,
3622
]
} | 2,193 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | approveRewardDistributor | function approveRewardDistributor(
address _rewardsToken,
address _distributor,
bool _approved
) external onlyOwner {
require(rewardData[_rewardsToken].lastUpdateTime > 0, "rewards token does not exist");
rewardDistributors[_rewardsToken][_distributor] = _approved;
}
| // Modify approval for an address to call notifyRewardAmount | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
3687,
3980
]
} | 2,194 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | setBoost | function setBoost(
uint256 _max,
uint256 _rate,
address _receivingAddress
) external onlyOwner {
require(_max < 1500, "over max payment"); //max 15%
require(_rate < 30000, "over max rate"); //max 3x
require(_receivingAddress != address(0), "invalid address"); //must point somewhere valid
nextMaximumBoostP... | //set boost parameters | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
4007,
4428
]
} | 2,195 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | setKickIncentive | function setKickIncentive(uint256 _rate, uint256 _delay) external onlyOwner {
require(_rate <= 500, "over max rate"); //max 5% per epoch
require(_delay >= 2, "min delay"); //minimum 2 epochs of grace
kickRewardPerEpoch = _rate;
kickRewardEpochDelay = _delay;
}
| //set kick incentive | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
4615,
4895
]
} | 2,196 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | shutdown | function shutdown() external onlyOwner {
isShutdown = true;
}
| //shutdown the contract. | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
4924,
4993
]
} | 2,197 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | setApprovals | function setApprovals() external {
IERC20(stakingToken).safeApprove(address(rewardsEscrow), 0);
IERC20(stakingToken).safeApprove(address(rewardsEscrow), uint256(-1));
}
| //set approvals for rewards escrow | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
5032,
5212
]
} | 2,198 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | _rewardPerToken | function _rewardPerToken(address _rewardsToken) internal view returns (uint256) {
if (boostedSupply == 0) {
return rewardData[_rewardsToken].rewardPerTokenStored;
}
return
uint256(rewardData[_rewardsToken].rewardPerTokenStored).add(
_lastTimeRewardApplicable(rewardData[_rewardsToken].periodFinish)
... | /* ========== VIEWS ========== */ | Comment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
5251,
5809
]
} | 2,199 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | claimableRewards | function claimableRewards(address _account) external view returns (EarnedData[] memory userRewards) {
userRewards = new EarnedData[](rewardTokens.length);
Balances storage userBalance = balances[_account];
uint256 boostedBal = userBalance.boosted;
for (uint256 i = 0; i < userRewards.length; i++) {
address t... | // Address and claimable amount of all reward tokens for the given account | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
6818,
7361
]
} | 2,200 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | rewardWeightOf | function rewardWeightOf(address _user) external view returns (uint256 amount) {
return balances[_user].boosted;
}
| // Total BOOSTED balance of an account, including unlocked but not withdrawn tokens | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
7449,
7570
]
} | 2,201 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | lockedBalanceOf | function lockedBalanceOf(address _user) external view returns (uint256 amount) {
return balances[_user].locked;
}
| // total token balance of an account, including unlocked but not withdrawn tokens | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
7656,
7777
]
} | 2,202 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | balanceOf | function balanceOf(address _user) external view returns (uint256 amount) {
LockedBalance[] storage locks = userLocks[_user];
Balances storage userBalance = balances[_user];
uint256 nextUnlockIndex = userBalance.nextUnlockIndex;
//start with current boosted amount
amount = balances[_user].boosted;
uint256 ... | //BOOSTED balance of an account which only includes properly locked tokens as of the most recent eligible epoch | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
7893,
8909
]
} | 2,203 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | balanceAtEpochOf | function balanceAtEpochOf(uint256 _epoch, address _user) external view returns (uint256 amount) {
LockedBalance[] storage locks = userLocks[_user];
//get timestamp of given epoch index
uint256 epochTime = epochs[_epoch].date;
//get timestamp of first non-inclusive epoch
uint256 cutoffEpoch = epochTime.sub(lo... | //BOOSTED balance of an account which only includes properly locked tokens at the given epoch | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
9007,
10147
]
} | 2,204 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | totalSupply | function totalSupply() external view returns (uint256 supply) {
uint256 currentEpoch = block.timestamp.div(rewardsDuration).mul(rewardsDuration);
uint256 cutoffEpoch = currentEpoch.sub(lockDuration);
uint256 epochindex = epochs.length;
//do not include current epoch's supply
if (uint256(epochs[epochindex - 1... | //supply of all properly locked BOOSTED balances at most recent eligible epoch | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
10230,
10913
]
} | 2,205 | |
PopLocker | contracts/core/dao/PopLocker.sol | 0x429902c1f43b583e099a0aa5b5c8e0fd40c54435 | Solidity | PopLocker | contract PopLocker is ReentrancyGuard, Ownable {
using BoringMath for uint256;
using BoringMath224 for uint224;
using BoringMath112 for uint112;
using BoringMath32 for uint32;
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
bool useBoost;
uint40 periodFini... | // POP locked in this contract will be entitled to voting rights for popcorn.network
// Based on CVX Locking contract for https://www.convexfinance.com/
// Based on EPS Staking contract for http://ellipsis.finance/
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-reward... | LineComment | totalSupplyAtEpoch | function totalSupplyAtEpoch(uint256 _epoch) external view returns (uint256 supply) {
uint256 epochStart = uint256(epochs[_epoch].date).div(rewardsDuration).mul(rewardsDuration);
uint256 cutoffEpoch = epochStart.sub(lockDuration);
uint256 currentEpoch = block.timestamp.div(rewardsDuration).mul(rewardsDuration);
... | //supply of all properly locked BOOSTED balances at the given epoch | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
10985,
11732
]
} | 2,206 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.