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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
2562,
2699
]
} | 6,107 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
3224,
3574
]
} | 6,108 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
4026,
4161
]
} | 6,109 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
4675,
4846
]
} | 6,110 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | 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 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
607,
1231
]
} | 6,111 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | 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 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
1443,
1575
]
} | 6,112 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | 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 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
2547,
2923
]
} | 6,113 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, addr... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | callOptionalReturn | function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checke... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
2127,
3246
]
} | 6,114 |
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | StrategyCurveLINKVoterProxy | contract StrategyCurveLINKVoterProxy {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public constant want = address(0xcee60cFa923170e4f8204AE08B4fA6A3F5656F3a);
address public constant crv = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
... | withdraw | function withdraw(IERC20 _asset) external returns (uint256 balance) {
require(msg.sender == controller, "!controller");
require(want != address(_asset), "want");
require(crv != address(_asset), "crv");
require(link != address(_asset), "link");
balance = _asset.balanceOf(address(this));
_as... | // Controller only function for creating additional rewards from dust | LineComment | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
3757,
4151
]
} | 6,115 | ||
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | StrategyCurveLINKVoterProxy | contract StrategyCurveLINKVoterProxy {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public constant want = address(0xcee60cFa923170e4f8204AE08B4fA6A3F5656F3a);
address public constant crv = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
... | withdraw | function withdraw(uint256 _amount) external {
require(msg.sender == controller, "!controller");
uint256 _balance = IERC20(want).balanceOf(address(this));
if (_balance < _amount) {
_amount = _withdrawSome(_amount.sub(_balance));
_amount = _amount.add(_balance);
}
uint256 _fee... | // Withdraw partial funds, normally used with a vault withdrawal | LineComment | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
4224,
4952
]
} | 6,116 | ||
StrategyCurveLINKVoterProxy | StrategyCurveLINKVoterProxy.sol | 0x153fe8894a76f14bc8c8b02dd81efbb6d24e909f | Solidity | StrategyCurveLINKVoterProxy | contract StrategyCurveLINKVoterProxy {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public constant want = address(0xcee60cFa923170e4f8204AE08B4fA6A3F5656F3a);
address public constant crv = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
... | withdrawAll | function withdrawAll() external returns (uint256 balance) {
require(msg.sender == controller, "!controller");
_withdrawAll();
balance = IERC20(want).balanceOf(address(this));
address _vault = IController(controller).vaults(address(want));
require(_vault != address(0), "!vault"); // addition... | // Withdraw all funds, normally used when migrating strategies | LineComment | v0.5.17+commit.d19bba13 | Unknown | bzzr://daf0a5f408826bee6b9553d7574de4a6d1cb04c31aa2a20140dd8677e59a2f31 | {
"func_code_index": [
5172,
5617
]
} | 6,117 | ||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | totalSupply | function totalSupply() public view override returns (uint256) {
// Overflow is impossible as _owners.length is initialized to 1.
unchecked {
return _owners.length - 1;
}
}
| /// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1039,
1221
]
} | 6,118 | ||||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < balanceOf(owner), "INVALID_INDEX");
// Both of the counters cannot overflow because the loop breaks before that.
unchecked {
uint256 count;
uint256 _currentIndex = _owners.length; // == to... | /// @dev O(totalSupply), it is discouraged to call this function from other contracts
/// as it can become very expensive, especially with higher total collection sizes.
/// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1419,
1958
]
} | 6,119 | ||||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | tokenByIndex | function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(_exists(index), "INVALID_INDEX");
return index;
}
| /// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1984,
2133
]
} | 6,120 | ||||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | balanceOf | function balanceOf(address owner) public view virtual override returns (uint256 balance) {
require(owner != address(0), "INVALID_OWNER");
unchecked {
// Start at 1 since token 0 does not exist
uint256 _currentIndex = _owners.length; // == totalSupply() + 1 == _owners.length - 1 + 1
for (uint256 i = 1; i < _cur... | /// @dev O(totalSupply), it is discouraged to call this function from other contracts
/// as it can become very expensive, especially with higher total collection sizes.
/// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
2578,
2986
]
} | 6,121 | ||||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | ownerOf | function ownerOf(uint256 id) public view virtual override returns (address owner) {
require(_exists(id), "NONEXISTENT_TOKEN");
for (uint256 i = id; ; i++) {
owner = _owners[i];
if (owner != address(0)) {
return owner;
}
}
}
| /// @dev O(MAX_TX), gradually moves to O(1) as more tokens get transferred and
/// the owners are explicitly set.
/// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
3128,
3373
]
} | 6,122 | ||||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | _mint | function _mint(address to, uint256 amount) internal virtual override {
require(to != address(0), "INVALID_RECIPIENT");
require(amount != 0, "INVALID_AMOUNT");
unchecked {
uint256 _currentIndex = _owners.length; // == totalSupply() + 1 == _owners.length - 1 + 1
for (uint256 i; i < amount - 1; i++) {
// stori... | /// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
3646,
4223
]
} | 6,123 | ||||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | _exists | function _exists(uint256 id) internal view virtual override returns (bool) {
return id != 0 && id < _owners.length;
}
| /// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
4249,
4370
]
} | 6,124 | ||||
Mingoes | contracts/src/ERC721/ERC721M.sol | 0xe6f475c11ad693e48455fcaf7bca33fe84ce71b0 | Solidity | ERC721M | abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID... | _transfer | function _transfer(
address from,
address to,
uint256 id
) internal virtual override {
require(ownerOf(id) == from, "WRONG_FROM");
require(to != address(0), "INVALID_RECIPIENT");
require(msg.sender == from || getApproved(id) == msg.sender || isApprovedForAll(from, msg.sender), "NOT_AUTHORIZED");
delete _tokenAp... | /// @inheritdoc ERC721 | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
4396,
4913
]
} | 6,125 | ||||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | CryptoLiveLeak | function CryptoLiveLeak(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
... | /**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
844,
1393
]
} | 6,126 | |||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to])... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
1477,
2319
]
} | 6,127 | |||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
2525,
2637
]
} | 6,128 | |||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
2912,
3213
]
} | 6,129 | |||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
3477,
3653
]
} | 6,130 | |||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
4047,
4399
]
} | 6,131 | |||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
Burn(msg.sender, _val... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
4569,
4943
]
} | 6,132 | |||
CryptoLiveLeak | CryptoLiveLeak.sol | 0x3dc9a42fa7afe57be03c58fd7f4411b1e466c508 | Solidity | CryptoLiveLeak | contract CryptoLiveLeak {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (a... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://ef4c25d09c0a1e32b2086741c6a65c050647c694a483ca7bdd869cd30f23175a | {
"func_code_index": [
5201,
5812
]
} | 6,133 | |||
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
1003,
1124
]
} | 6,134 |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
1344,
1473
]
} | 6,135 |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
1817,
2099
]
} | 6,136 |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
2607,
2820
]
} | 6,137 |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
3351,
3714
]
} | 6,138 |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
3997,
4153
]
} | 6,139 |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
4508,
4830
]
} | 6,140 |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
5022,
5081
]
} | 6,141 | |
EtherDigitalFinance | EtherDigitalFinance.sol | 0xed72fbfaf9c6b24d1d77bb69be3371c2593d0a3e | Solidity | EtherDigitalFinance | contract EtherDigitalFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://b0cfa19ecffa2fba524b64130f022ed2182f98cbc15164730363b8f97cf9fbe6 | {
"func_code_index": [
5314,
5503
]
} | 6,142 |
ExchangeAgent | ExchangeAgent.sol | 0x5365fd7770c795e82869c57b5b254ccaae91d07a | Solidity | ExchangeAgent | contract ExchangeAgent is Ownable, IExchangeAgent, ReentrancyGuard {
event AddGateway(address _sender, address _gateway);
event RemoveGateway(address _sender, address _gateway);
event AddAvailableCurrency(address _sender, address _currency);
event RemoveAvailableCurrency(address _sender, address _cu... | /**
* @dev This smart contract is for getting CVR_ETH, CVR_USDT price
*/ | NatSpecMultiLine | setDiscountPercentage | function setDiscountPercentage(uint256 _discountPercentage) external onlyOwner {
require(_discountPercentage <= 100, "Exceeded value");
discountPercentage = _discountPercentage;
}
| /**
* @dev If users use CVR, they will pay _discountPercentage % of cost.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://18e7d105c94bc6c221d6e9b10b345a4c9585e62afb8ac1269b8df2b7047de27c | {
"func_code_index": [
2079,
2286
]
} | 6,143 |
ExchangeAgent | ExchangeAgent.sol | 0x5365fd7770c795e82869c57b5b254ccaae91d07a | Solidity | ExchangeAgent | contract ExchangeAgent is Ownable, IExchangeAgent, ReentrancyGuard {
event AddGateway(address _sender, address _gateway);
event RemoveGateway(address _sender, address _gateway);
event AddAvailableCurrency(address _sender, address _currency);
event RemoveAvailableCurrency(address _sender, address _cu... | /**
* @dev This smart contract is for getting CVR_ETH, CVR_USDT price
*/ | NatSpecMultiLine | _getNeededTokenAmount | function _getNeededTokenAmount(
address _token0,
address _token1,
uint256 _desiredAmount
) private view returns (uint256) {
address pair = IUniswapV2Factory(UNISWAP_FACTORY).getPair(_token0, _token1);
require(pair != address(0), "There's no pair");
address twapOraclePriceFeed = ITwapOra... | /**
* @dev Get needed _token0 amount for _desiredAmount of _token1
* _desiredAmount should consider decimals based on _token1
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://18e7d105c94bc6c221d6e9b10b345a4c9585e62afb8ac1269b8df2b7047de27c | {
"func_code_index": [
2441,
3289
]
} | 6,144 |
ExchangeAgent | ExchangeAgent.sol | 0x5365fd7770c795e82869c57b5b254ccaae91d07a | Solidity | ExchangeAgent | contract ExchangeAgent is Ownable, IExchangeAgent, ReentrancyGuard {
event AddGateway(address _sender, address _gateway);
event RemoveGateway(address _sender, address _gateway);
event AddAvailableCurrency(address _sender, address _currency);
event RemoveAvailableCurrency(address _sender, address _cu... | /**
* @dev This smart contract is for getting CVR_ETH, CVR_USDT price
*/ | NatSpecMultiLine | getNeededTokenAmount | function getNeededTokenAmount(
address _token0,
address _token1,
uint256 _desiredAmount
) external view override returns (uint256) {
return _getNeededTokenAmount(_token0, _token1, _desiredAmount);
}
| /**
* @dev Get needed _token0 amount for _desiredAmount of _token1
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://18e7d105c94bc6c221d6e9b10b345a4c9585e62afb8ac1269b8df2b7047de27c | {
"func_code_index": [
3379,
3628
]
} | 6,145 |
ExchangeAgent | ExchangeAgent.sol | 0x5365fd7770c795e82869c57b5b254ccaae91d07a | Solidity | ExchangeAgent | contract ExchangeAgent is Ownable, IExchangeAgent, ReentrancyGuard {
event AddGateway(address _sender, address _gateway);
event RemoveGateway(address _sender, address _gateway);
event AddAvailableCurrency(address _sender, address _currency);
event RemoveAvailableCurrency(address _sender, address _cu... | /**
* @dev This smart contract is for getting CVR_ETH, CVR_USDT price
*/ | NatSpecMultiLine | getTokenAmountForUSDC | function getTokenAmountForUSDC(address _token, uint256 _desiredAmount) external view override returns (uint256) {
return _getNeededTokenAmount(_token, USDC_ADDRESS, _desiredAmount);
}
| /**
* get needed _token amount for _desiredAmount of USDC
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://18e7d105c94bc6c221d6e9b10b345a4c9585e62afb8ac1269b8df2b7047de27c | {
"func_code_index": [
3894,
4096
]
} | 6,146 |
ExchangeAgent | ExchangeAgent.sol | 0x5365fd7770c795e82869c57b5b254ccaae91d07a | Solidity | ExchangeAgent | contract ExchangeAgent is Ownable, IExchangeAgent, ReentrancyGuard {
event AddGateway(address _sender, address _gateway);
event RemoveGateway(address _sender, address _gateway);
event AddAvailableCurrency(address _sender, address _currency);
event RemoveAvailableCurrency(address _sender, address _cu... | /**
* @dev This smart contract is for getting CVR_ETH, CVR_USDT price
*/ | NatSpecMultiLine | getTokenAmountForETH | function getTokenAmountForETH(address _token, uint256 _desiredAmount) external view override returns (uint256) {
return _getNeededTokenAmount(_token, WETH, _desiredAmount);
}
| /**
* get needed _token amount for _desiredAmount of ETH
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://18e7d105c94bc6c221d6e9b10b345a4c9585e62afb8ac1269b8df2b7047de27c | {
"func_code_index": [
4176,
4369
]
} | 6,147 |
ExchangeAgent | ExchangeAgent.sol | 0x5365fd7770c795e82869c57b5b254ccaae91d07a | Solidity | ExchangeAgent | contract ExchangeAgent is Ownable, IExchangeAgent, ReentrancyGuard {
event AddGateway(address _sender, address _gateway);
event RemoveGateway(address _sender, address _gateway);
event AddAvailableCurrency(address _sender, address _currency);
event RemoveAvailableCurrency(address _sender, address _cu... | /**
* @dev This smart contract is for getting CVR_ETH, CVR_USDT price
*/ | NatSpecMultiLine | swapTokenWithETH | function swapTokenWithETH(
address _token,
uint256 _amount,
uint256 _desiredAmount
) external override onlyWhiteListed(msg.sender) nonReentrant {
// store CVR in this exchagne contract
// send eth to buy gateway based on the uniswap price
require(availableCurrencies[_token], "Token should... | /**
* @param _amount: this one is the value with decimals
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://18e7d105c94bc6c221d6e9b10b345a4c9585e62afb8ac1269b8df2b7047de27c | {
"func_code_index": [
4450,
4909
]
} | 6,148 |
ExchangeAgent | ExchangeAgent.sol | 0x5365fd7770c795e82869c57b5b254ccaae91d07a | Solidity | ExchangeAgent | contract ExchangeAgent is Ownable, IExchangeAgent, ReentrancyGuard {
event AddGateway(address _sender, address _gateway);
event RemoveGateway(address _sender, address _gateway);
event AddAvailableCurrency(address _sender, address _currency);
event RemoveAvailableCurrency(address _sender, address _cu... | /**
* @dev This smart contract is for getting CVR_ETH, CVR_USDT price
*/ | NatSpecMultiLine | _swapTokenWithToken | function _swapTokenWithToken(
address _token0,
address _token1,
uint256 _amount,
uint256 _desiredAmount
) private {
address twapOraclePriceFeed = ITwapOraclePriceFeedFactory(TWAP_ORACLE_PRICE_FEED_FACTORY).getTwapOraclePriceFeed(
_token0,
_token1
);
uint256 swapAm... | /**
* @dev exchange _amount of _token0 with _token1 by twap oracle price
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://18e7d105c94bc6c221d6e9b10b345a4c9585e62afb8ac1269b8df2b7047de27c | {
"func_code_index": [
5390,
6439
]
} | 6,149 |
MiuRescueTeam | /contracts/MiuRescueTeam.sol | 0xbd3c6af08f193e52d7e897c66ad7de4237369dbb | Solidity | MiuRescueTeam | contract MiuRescueTeam is ERC721, Ownable {
string public baseURI;
uint256 public supply = 10000;
uint256 public totalSupply;
address miuDevTeam = 0x2d0F4bcD4D2f08FAbD5a9e6Ed7c7eE86aFC3B73f;
address miuFounder = 0xeC35A4F27f5163e3035510E13a227fA518c4906d;
address miuFounder1 = 0x9aFaAaE1FE850CD71324930Fa399... | mint | function mint(uint256 _mintAmount) public payable{
require(publicDate <= block.timestamp, "Not yet");
require(totalSupply + _mintAmount + 1 <= supply, "0" );
require(msg.value >= getPrice(_mintAmount));
for (uint256 i; i < _mintAmount; i++) {
_safeMint(msg.sender, totalSupply + 1 + i);
}
totalSupply += _mintAmount;
}
| // public | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1619,
1955
]
} | 6,150 | ||||
MiuRescueTeam | /contracts/MiuRescueTeam.sol | 0xbd3c6af08f193e52d7e897c66ad7de4237369dbb | Solidity | MiuRescueTeam | contract MiuRescueTeam is ERC721, Ownable {
string public baseURI;
uint256 public supply = 10000;
uint256 public totalSupply;
address miuDevTeam = 0x2d0F4bcD4D2f08FAbD5a9e6Ed7c7eE86aFC3B73f;
address miuFounder = 0xeC35A4F27f5163e3035510E13a227fA518c4906d;
address miuFounder1 = 0x9aFaAaE1FE850CD71324930Fa399... | gift | function gift(uint[] calldata quantity, address[] calldata recipient) public onlyOwner{
require(quantity.length == recipient.length, "Provide quantities and recipients" );
uint totalQuantity = 0;
for(uint i = 0; i < quantity.length; ++i){
totalQuantity += quantity[i];
}
require(totalSupply + totalQuantity + 1 <= supply... | //only owner | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
2263,
2764
]
} | 6,151 | ||||
MiuRescueTeam | /contracts/MiuRescueTeam.sol | 0xbd3c6af08f193e52d7e897c66ad7de4237369dbb | Solidity | MiuRescueTeam | contract MiuRescueTeam is ERC721, Ownable {
string public baseURI;
uint256 public supply = 10000;
uint256 public totalSupply;
address miuDevTeam = 0x2d0F4bcD4D2f08FAbD5a9e6Ed7c7eE86aFC3B73f;
address miuFounder = 0xeC35A4F27f5163e3035510E13a227fA518c4906d;
address miuFounder1 = 0x9aFaAaE1FE850CD71324930Fa399... | mintVault | function mintVault() internal {
for (uint256 i; i < 130; i++) {
_safeMint(miuFounder, totalSupply + 1 + i);
}
totalSupply = 130;
}
| //internal | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
3680,
3822
]
} | 6,152 | ||||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoopTraits.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoopTraits | contract CryptoPoopTraits is ERC721, Ownable {
using SafeMath for uint;
using SafeMath for uint8;
using SafeMath for uint32;
using SafeMath for uint64;
using SafeMath for uint256;
// Levels of rarity
uint8 internal constant COMMON = 0;
uint8 internal constant UNCOMMON = 1;
uint8 internal constant RAR... | randomLevel | function randomLevel() internal returns(uint8) {
uint highestLevel = COMMON;
uint randomNumber = uint(keccak256(abi.encodePacked(
block.timestamp, msg.sender, block.number, traitNonce))) % 100;
while ((highestLevel < NUM_LEVELS) &&
(randomNumber >= levelProbabilities[highestLevel])) {
highestLeve... | /*
* Choose a random rarity level
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
1956,
2354
]
} | 6,153 | ||||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoopTraits.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoopTraits | contract CryptoPoopTraits is ERC721, Ownable {
using SafeMath for uint;
using SafeMath for uint8;
using SafeMath for uint32;
using SafeMath for uint64;
using SafeMath for uint256;
// Levels of rarity
uint8 internal constant COMMON = 0;
uint8 internal constant UNCOMMON = 1;
uint8 internal constant RAR... | randomTrait | function randomTrait(uint8 _level, uint8 _category) internal returns(uint8) {
uint numOptions = traitLookup[_category][_level].length;
require(numOptions >= 1, "Category/level traits not set yet");
uint randomNumber = uint(keccak256(abi.encodePacked(
block.timestamp, msg.sender, block.number, traitNonce))) %... | /*
* Choose a random trait from the specified category and rarity level
* @dev traitLookup[_category][_level] contains an array of IDs for this level and category
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
2533,
3003
]
} | 6,154 | ||||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoopTraits.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoopTraits | contract CryptoPoopTraits is ERC721, Ownable {
using SafeMath for uint;
using SafeMath for uint8;
using SafeMath for uint32;
using SafeMath for uint64;
using SafeMath for uint256;
// Levels of rarity
uint8 internal constant COMMON = 0;
uint8 internal constant UNCOMMON = 1;
uint8 internal constant RAR... | encodeTraits | function encodeTraits(uint8[NUM_CATEGORIES] memory _traits) internal pure returns(uint64) {
uint64 encodedTraits= 0;
for (uint8 i; i < NUM_CATEGORIES; i++) {
encodedTraits |= (uint64(_traits[i]) << (8 * i));
}
return encodedTraits;
}
| /*
* Encode traits into a single uint
*
* @dev an encoded uint64 that can store up to 8 distinct categories of max 32 options each
* The structure is the following:
* | unused byte | unused byte | unused byte | front acc | faces | bodies | back acc | backgrounds |
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
3293,
3552
]
} | 6,155 | ||||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoopTraits.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoopTraits | contract CryptoPoopTraits is ERC721, Ownable {
using SafeMath for uint;
using SafeMath for uint8;
using SafeMath for uint32;
using SafeMath for uint64;
using SafeMath for uint256;
// Levels of rarity
uint8 internal constant COMMON = 0;
uint8 internal constant UNCOMMON = 1;
uint8 internal constant RAR... | setLevelProbabilities | function setLevelProbabilities(uint8[] calldata _levelProbabilities) external onlyOwner {
require(_levelProbabilities.length == NUM_LEVELS,
"Array length doesn't match number of levels");
levelProbabilities = _levelProbabilities;
}
| /*
* Set the rarity level options for the trait encoding
*
* @dev This allows for lower gas in contract deploy and avoids potential gaslimit overruns
* MUST SET THESE AT LEAST ONCE BEFORE STARTING THE SALE
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
3780,
4035
]
} | 6,156 | ||||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoopTraits.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoopTraits | contract CryptoPoopTraits is ERC721, Ownable {
using SafeMath for uint;
using SafeMath for uint8;
using SafeMath for uint32;
using SafeMath for uint64;
using SafeMath for uint256;
// Levels of rarity
uint8 internal constant COMMON = 0;
uint8 internal constant UNCOMMON = 1;
uint8 internal constant RAR... | setCategoryOptions | function setCategoryOptions(uint8[] calldata _commonOptions, uint8[] calldata _uncommonOptions,
uint8[] calldata _rareOptions, uint8[] calldata _epicOptions, uint8[] calldata _legendaryOptions,
uint8 _categoryNumber) external onlyOwner {
require(_categoryNumber < NUM_CATEGORIES, "Category doesn't exist");
... | /*
* Set the trait options for the trait encoding for a given category, by rarity level
*
* @dev This allows for lower gas in contract deploy and avoids potential gaslimit overruns
* MUST SET THESE AT LEAST ONCE BEFORE STARTING THE SALE
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
4294,
4920
]
} | 6,157 | ||||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoopTraits.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoopTraits | contract CryptoPoopTraits is ERC721, Ownable {
using SafeMath for uint;
using SafeMath for uint8;
using SafeMath for uint32;
using SafeMath for uint64;
using SafeMath for uint256;
// Levels of rarity
uint8 internal constant COMMON = 0;
uint8 internal constant UNCOMMON = 1;
uint8 internal constant RAR... | getCategoryOptions | function getCategoryOptions(uint8 _categoryNumber, uint8 _rarityLevel) external view returns(uint8[] memory) {
require(_categoryNumber < NUM_CATEGORIES, "Category number doesn't exist");
require(_rarityLevel < NUM_LEVELS, "Rarity level doesn't exist");
uint numOptions = traitLookup[_categoryNumber][_rarityLevel]... | /*
* Get the trait options for a given category and rarity combination
*
* @dev Useful in testing and may be useful for a contract ecosystem
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
5080,
5608
]
} | 6,158 | ||||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | PskERC20 | function PskERC20() public {
uint256 initialSupply = 68072143;
totalSupply = initialSupply * 10 ** uint256(decimals);
name = 'Pool of Stake Master Token';
symbol = 'PSK';
balanceOf[address(this)] = totalSupply;
emit Transfer(address(this), address(this), totalSupply);
// Launch Transf... | /**
* Constructor function
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
918,
15951
]
} | 6,159 | |||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// assert locked addresses
assert( lockedUntil[_from] == 0 || (lockedUntil[_from] != 0 && block.timestamp >= lockedUntil[_from]) );
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if t... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
16035,
17036
]
} | 6,160 | |||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
17242,
17399
]
} | 6,161 | |||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
17674,
17975
]
} | 6,162 | |||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
18239,
18465
]
} | 6,163 | |||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
18859,
19203
]
} | 6,164 | |||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender,... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
19373,
19752
]
} | 6,165 | |||
PskERC20 | PskERC20.sol | 0x1c5f43710a1776b0ea7191b7ead75d4b98d69858 | Solidity | PskERC20 | contract PskERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// Locked address mapping
mapping (address => uint256) public lockedUntil;
// This creates an array with all balances
mappin... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://5681bef5b7069969382467230c99089b7aa7b48f3d2ef2f28159bfa657aeac40 | {
"func_code_index": [
20010,
20626
]
} | 6,166 | |||
Zhoan | Zhoan.sol | 0x4efd3bf84f40eda370e52df162eccc394cfc8834 | Solidity | Zhoan | contract Zhoan {
string public name;
string public symbol;
//the circulation limit of token
uint256 public totalSupply;
//decimal setting
uint8 public decimals = 18;
//contract admin's address
address private admin_add;
//new user can get money when first registe... | setPresentMoney | function setPresentMoney (uint money) public{
address opt_user=msg.sender;
if(opt_user == admin_add){
present_money = money;
}
}
| //for admin user to change present_money | LineComment | v0.4.24+commit.e67f0147 | bzzr://d16e317eb63001dc704d184c6cf10eab4e273f25e6b061ab12890bb3858b2658 | {
"func_code_index": [
1043,
1221
]
} | 6,167 | |||
Zhoan | Zhoan.sol | 0x4efd3bf84f40eda370e52df162eccc394cfc8834 | Solidity | Zhoan | contract Zhoan {
string public name;
string public symbol;
//the circulation limit of token
uint256 public totalSupply;
//decimal setting
uint8 public decimals = 18;
//contract admin's address
address private admin_add;
//new user can get money when first registe... | approve | function approve(address _spender, uint256 value) public returns (bool success){
allowances[msg.sender][_spender] = value;
return true;
}
| //add new user to contract | LineComment | v0.4.24+commit.e67f0147 | bzzr://d16e317eb63001dc704d184c6cf10eab4e273f25e6b061ab12890bb3858b2658 | {
"func_code_index": [
1260,
1425
]
} | 6,168 | |||
Zhoan | Zhoan.sol | 0x4efd3bf84f40eda370e52df162eccc394cfc8834 | Solidity | Zhoan | contract Zhoan {
string public name;
string public symbol;
//the circulation limit of token
uint256 public totalSupply;
//decimal setting
uint8 public decimals = 18;
//contract admin's address
address private admin_add;
//new user can get money when first registe... | adminSendMoneyToUser | function adminSendMoneyToUser(address to,uint256 value) public{
address opt_add=msg.sender;
if(opt_add == admin_add){
transferFrom(admin_add,to,value);
}
}
| //admin account transfer money to users | LineComment | v0.4.24+commit.e67f0147 | bzzr://d16e317eb63001dc704d184c6cf10eab4e273f25e6b061ab12890bb3858b2658 | {
"func_code_index": [
1639,
1844
]
} | 6,169 | |||
Zhoan | Zhoan.sol | 0x4efd3bf84f40eda370e52df162eccc394cfc8834 | Solidity | Zhoan | contract Zhoan {
string public name;
string public symbol;
//the circulation limit of token
uint256 public totalSupply;
//decimal setting
uint8 public decimals = 18;
//contract admin's address
address private admin_add;
//new user can get money when first registe... | burnAccountMoeny | function burnAccountMoeny(address add,uint256 value) public{
address opt_add=msg.sender;
require(opt_add == admin_add);
require(balanceOf[add]>value);
balanceOf[add]-=value;
totalSupply -=value;
}
| //burn account hold money | LineComment | v0.4.24+commit.e67f0147 | bzzr://d16e317eb63001dc704d184c6cf10eab4e273f25e6b061ab12890bb3858b2658 | {
"func_code_index": [
1882,
2143
]
} | 6,170 | |||
Zhoan | Zhoan.sol | 0x4efd3bf84f40eda370e52df162eccc394cfc8834 | Solidity | Zhoan | contract Zhoan {
string public name;
string public symbol;
//the circulation limit of token
uint256 public totalSupply;
//decimal setting
uint8 public decimals = 18;
//contract admin's address
address private admin_add;
//new user can get money when first registe... | transferFrom | function transferFrom(address from,address to,uint256 value) public returns (bool success){
require(value <= allowances[from][msg.sender]); // Check allowance
allowances[from][msg.sender] -= value;
//sure target no be 0x0
require(to != 0x0);
//check balance of sender
require(... | //transfer action between users | LineComment | v0.4.24+commit.e67f0147 | bzzr://d16e317eb63001dc704d184c6cf10eab4e273f25e6b061ab12890bb3858b2658 | {
"func_code_index": [
2343,
3139
]
} | 6,171 | |||
Zhoan | Zhoan.sol | 0x4efd3bf84f40eda370e52df162eccc394cfc8834 | Solidity | Zhoan | contract Zhoan {
string public name;
string public symbol;
//the circulation limit of token
uint256 public totalSupply;
//decimal setting
uint8 public decimals = 18;
//contract admin's address
address private admin_add;
//new user can get money when first registe... | balanceOf | function balanceOf(address _owner) public view returns(uint256 balance){
return balanceOf[_owner];
}
| //view balance | LineComment | v0.4.24+commit.e67f0147 | bzzr://d16e317eb63001dc704d184c6cf10eab4e273f25e6b061ab12890bb3858b2658 | {
"func_code_index": [
3166,
3285
]
} | 6,172 | |||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | tokensOfOwner | function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
uint256 tokenCount = balanceOf(_owner);
if (tokenCount == 0) {
// Return an empty array
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](tokenCount);
uint256 index;
for (index = 0; index ... | /*
* Get the tokens owned by _owner
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
1885,
2346
]
} | 6,173 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | calculatePrice | function calculatePrice() public view returns (uint256) {
require(hasSaleStarted == true, "Sale hasn't started");
require(totalSupply() < MAX_POOPS,
"We are at max supply. Burn some in a paper bag...?");
uint currentSupply = totalSupply();
if (currentSupply >= 1338) {
return 69000000000000000; ... | /*
* Calculate price for the immediate next NFT minted
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
2414,
2868
]
} | 6,174 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | dropPoops | function dropPoops(uint256 numCryptoPoops, uint8 boost) external payable nonReentrant {
require(totalSupply() < MAX_POOPS,
"We are at max supply. Burn some in a paper bag...?");
require(numCryptoPoops > 0 && numCryptoPoops <= 20, "You can drop minimum 1, maximum 20 CryptoPoops");
require(totalSupply().ad... | /*
* Main function for the NFT sale
*
* Prerequisites
* - Not at max supply
* - Sale has started
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
2992,
3840
]
} | 6,175 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | _safeMintWithTraits | function _safeMintWithTraits(address _to, uint256 _mintId, uint8 _boost) internal {
_safeMint(_to, _mintId);
uint64 encodedTraits = _assignTraits(_mintId, _boost);
emit TraitAssigned(_to, _mintId, encodedTraits);
}
| /*
* Combines minting and trait generation in one place, so all CryptoPoops
* get assigned traits correctly.
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
3965,
4196
]
} | 6,176 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | _assignTraits | function _assignTraits(uint256 _tokenId, uint8 _boost) internal returns (uint64) {
uint8[NUM_CATEGORIES] memory assignedTraits;
uint8 rarityLevel;
for (uint8 i = 0; i < NUM_CATEGORIES; i++) {
rarityLevel = randomLevel() + _boost;
if (rarityLevel >= NUM_LEVELS) {
rarityLevel = NUM_LEVELS - 1;
}
... | /*
* Performs the random number generation for trait assignment
* and stores the result in the contract
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
4316,
4844
]
} | 6,177 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | reRollTraits | function reRollTraits(uint256 _tokenId, uint8 _boost) public payable nonReentrant {
require(_exists(_tokenId), "Token doesn't exist");
require(msg.sender == ERC721.ownerOf(_tokenId), "Only token owner can re-roll");
require(hasRole(REROLLER_ROLE, msg.sender),
"If you'd like a contract to be whitelisted for re... | /*
* Allows a smart contract to re-roll traits if it's been approved as a reroller.
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
4941,
5429
]
} | 6,178 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | burnToken | function burnToken(uint256 _tokenId) public payable nonReentrant {
require(hasRole(BURNER_ROLE, msg.sender), "Not approved for burning");
require(_exists(_tokenId), "Token doesn't exist");
require(msg.sender == ERC721.ownerOf(_tokenId), "Only token owner can burn");
// Burn token via ERC-721
_burn(_tokenId);... | /*
* Allows approved third party smart contracts to burn CryptoPoops
*
* Emits an ERC-721 {Transfer} event
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
5555,
5964
]
} | 6,179 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | traitsOf | function traitsOf(uint256 _tokenId) external view returns (uint64) {
require(_exists(_tokenId), "Traits query for nonexistent token");
return _tokenTraits[_tokenId];
}
| /*
* Get traits of an individual token. Might come in handy
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
6037,
6216
]
} | 6,180 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | reserveGiveaway | function reserveGiveaway(uint256 numCryptoPoops) public onlyOwner {
uint currentSupply = totalSupply();
require(totalSupply().add(numCryptoPoops) <= 70, "Exceeded giveaway supply");
require(hasSaleStarted == false, "Sale has already started");
uint256 index;
// Reserved for people who helped this project and ... | /*
* Only valid before the sales starts, for giveaways/team thank you's
*/ | Comment | v0.7.6+commit.7338295f | {
"func_code_index": [
6301,
6777
]
} | 6,181 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | supportsInterface | function supportsInterface(bytes4 interfaceId) public view override(ERC165, AccessControl) returns (bool) {
return AccessControl.supportsInterface(interfaceId) ||
ERC165.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
6834,
7060
]
} | 6,182 | ||
CryptoPoops | /Users/jon/Code/cp-contracts/contracts/CryptoPoops.sol | 0xb8a15c37af224c9ae5bccf84bc4cb46707ace3a3 | Solidity | CryptoPoops | contract CryptoPoops is CryptoPoopTraits, AccessControl, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
using Strings for string;
// Max NFTs total. Due to burning this won't be the max tokenId
uint public constant MAX_POOPS = 6006;
// Allow for starting/pausing sale
bool public... | // Inspired/built on top of open source BGANPUNKS V2
// and the lovable justice-filled Chubbies | LineComment | setBaseURI | function setBaseURI(string memory baseURI) public onlyOwner {
_baseTokenURI = baseURI;
}
| // God Mode | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
7076,
7172
]
} | 6,183 | ||
KranteriumERC20Token | contracts\ERC20\KranteriumERC20Token.sol | 0x64f06d87d7dbfefbc71829a6891bbd18d2f33259 | Solidity | KranteriumERC20Token | contract KranteriumERC20Token is ERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
_name = name;
_symbol = symbol;
_... | /**
* @title KranteriumERC20Token
* @author Kranterium (visit https://Kranterium.me)
*
* @dev Standard ERC20 token with optional functions implemented.
* For full specification of ERC-20 standard see:
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @return the name of the token.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | Unlicense | bzzr://94638546b79aa897381f61a2e6480d87dc8051d2f83c0372437ce94cc83ce7d1 | {
"func_code_index": [
610,
682
]
} | 6,184 |
KranteriumERC20Token | contracts\ERC20\KranteriumERC20Token.sol | 0x64f06d87d7dbfefbc71829a6891bbd18d2f33259 | Solidity | KranteriumERC20Token | contract KranteriumERC20Token is ERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
_name = name;
_symbol = symbol;
_... | /**
* @title KranteriumERC20Token
* @author Kranterium (visit https://Kranterium.me)
*
* @dev Standard ERC20 token with optional functions implemented.
* For full specification of ERC-20 standard see:
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @return the symbol of the token.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | Unlicense | bzzr://94638546b79aa897381f61a2e6480d87dc8051d2f83c0372437ce94cc83ce7d1 | {
"func_code_index": [
730,
806
]
} | 6,185 |
KranteriumERC20Token | contracts\ERC20\KranteriumERC20Token.sol | 0x64f06d87d7dbfefbc71829a6891bbd18d2f33259 | Solidity | KranteriumERC20Token | contract KranteriumERC20Token is ERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
_name = name;
_symbol = symbol;
_... | /**
* @title KranteriumERC20Token
* @author Kranterium (visit https://Kranterium.me)
*
* @dev Standard ERC20 token with optional functions implemented.
* For full specification of ERC-20 standard see:
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/ | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @return the number of decimals of the token.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | Unlicense | bzzr://94638546b79aa897381f61a2e6480d87dc8051d2f83c0372437ce94cc83ce7d1 | {
"func_code_index": [
866,
938
]
} | 6,186 |
MachineFinanceSystem | MachineFinanceSystem.sol | 0xc64f6dfcc4452de6407e12afa9c02123c6796136 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | None | bzzr://27848e3362c93688b20f9abe2aad9fb6b479a51736207217dc4e5c688a87b0a5 | {
"func_code_index": [
268,
659
]
} | 6,187 | ||
MachineFinanceSystem | MachineFinanceSystem.sol | 0xc64f6dfcc4452de6407e12afa9c02123c6796136 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | None | bzzr://27848e3362c93688b20f9abe2aad9fb6b479a51736207217dc4e5c688a87b0a5 | {
"func_code_index": [
865,
977
]
} | 6,188 | ||
MachineFinanceSystem | MachineFinanceSystem.sol | 0xc64f6dfcc4452de6407e12afa9c02123c6796136 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | None | bzzr://27848e3362c93688b20f9abe2aad9fb6b479a51736207217dc4e5c688a87b0a5 | {
"func_code_index": [
401,
853
]
} | 6,189 | ||
MachineFinanceSystem | MachineFinanceSystem.sol | 0xc64f6dfcc4452de6407e12afa9c02123c6796136 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
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.4.20+commit.3155dd80 | None | bzzr://27848e3362c93688b20f9abe2aad9fb6b479a51736207217dc4e5c688a87b0a5 | {
"func_code_index": [
1485,
1675
]
} | 6,190 | ||
MachineFinanceSystem | MachineFinanceSystem.sol | 0xc64f6dfcc4452de6407e12afa9c02123c6796136 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | None | bzzr://27848e3362c93688b20f9abe2aad9fb6b479a51736207217dc4e5c688a87b0a5 | {
"func_code_index": [
1999,
2130
]
} | 6,191 | ||
MachineFinanceSystem | MachineFinanceSystem.sol | 0xc64f6dfcc4452de6407e12afa9c02123c6796136 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.20+commit.3155dd80 | None | bzzr://27848e3362c93688b20f9abe2aad9fb6b479a51736207217dc4e5c688a87b0a5 | {
"func_code_index": [
2596,
2860
]
} | 6,192 | ||
MachineFinanceSystem | MachineFinanceSystem.sol | 0xc64f6dfcc4452de6407e12afa9c02123c6796136 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
Approval(msg... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.20+commit.3155dd80 | None | bzzr://27848e3362c93688b20f9abe2aad9fb6b479a51736207217dc4e5c688a87b0a5 | {
"func_code_index": [
3331,
3741
]
} | 6,193 | ||
Exploreon | Exploreon.sol | 0x3b6fb225e6dcb23452b255ff3101d18328c429d1 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) ret... | transfer | function transfer(address _to, uint256 _value) returns (bool) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.7+commit.822622cf | bzzr://cf24dbb8045744b788e1ceec4563cbd50f88b2341aff57318bed7ab0302bfef5 | {
"func_code_index": [
268,
507
]
} | 6,194 | |||
Exploreon | Exploreon.sol | 0x3b6fb225e6dcb23452b255ff3101d18328c429d1 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) ret... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.7+commit.822622cf | bzzr://cf24dbb8045744b788e1ceec4563cbd50f88b2341aff57318bed7ab0302bfef5 | {
"func_code_index": [
714,
823
]
} | 6,195 | |||
Exploreon | Exploreon.sol | 0x3b6fb225e6dcb23452b255ff3101d18328c429d1 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);
balances[_from] = balances[_from].sub(... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.7+commit.822622cf | bzzr://cf24dbb8045744b788e1ceec4563cbd50f88b2341aff57318bed7ab0302bfef5 | {
"func_code_index": [
392,
895
]
} | 6,196 | |||
Exploreon | Exploreon.sol | 0x3b6fb225e6dcb23452b255ff3101d18328c429d1 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | approve | function approve(address _spender, uint256 _value) returns (bool) {
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs... | /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.7+commit.822622cf | bzzr://cf24dbb8045744b788e1ceec4563cbd50f88b2341aff57318bed7ab0302bfef5 | {
"func_code_index": [
1131,
1682
]
} | 6,197 | |||
Exploreon | Exploreon.sol | 0x3b6fb225e6dcb23452b255ff3101d18328c429d1 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.7+commit.822622cf | bzzr://cf24dbb8045744b788e1ceec4563cbd50f88b2341aff57318bed7ab0302bfef5 | {
"func_code_index": [
2006,
2144
]
} | 6,198 | |||
Exploreon | Exploreon.sol | 0x3b6fb225e6dcb23452b255ff3101d18328c429d1 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | increaseApproval | function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
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
*/ | Comment | v0.4.7+commit.822622cf | bzzr://cf24dbb8045744b788e1ceec4563cbd50f88b2341aff57318bed7ab0302bfef5 | {
"func_code_index": [
2393,
2665
]
} | 6,199 | |||
ClutchToken | ClutchToken.sol | 0x339c9044b54c0f411e9a7e7b1f09853e723ad9de | Solidity | ClutchToken | contract ClutchToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://f1375f2d683e0192af4e2868e892b7ef014cc01205379f2e6f514948289acb8a | {
"func_code_index": [
968,
1089
]
} | 6,200 |
ClutchToken | ClutchToken.sol | 0x339c9044b54c0f411e9a7e7b1f09853e723ad9de | Solidity | ClutchToken | contract ClutchToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://f1375f2d683e0192af4e2868e892b7ef014cc01205379f2e6f514948289acb8a | {
"func_code_index": [
1309,
1438
]
} | 6,201 |
ClutchToken | ClutchToken.sol | 0x339c9044b54c0f411e9a7e7b1f09853e723ad9de | Solidity | ClutchToken | contract ClutchToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://f1375f2d683e0192af4e2868e892b7ef014cc01205379f2e6f514948289acb8a | {
"func_code_index": [
1782,
2064
]
} | 6,202 |
ClutchToken | ClutchToken.sol | 0x339c9044b54c0f411e9a7e7b1f09853e723ad9de | Solidity | ClutchToken | contract ClutchToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://f1375f2d683e0192af4e2868e892b7ef014cc01205379f2e6f514948289acb8a | {
"func_code_index": [
2572,
2785
]
} | 6,203 |
ClutchToken | ClutchToken.sol | 0x339c9044b54c0f411e9a7e7b1f09853e723ad9de | Solidity | ClutchToken | contract ClutchToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://f1375f2d683e0192af4e2868e892b7ef014cc01205379f2e6f514948289acb8a | {
"func_code_index": [
3316,
3679
]
} | 6,204 |
ClutchToken | ClutchToken.sol | 0x339c9044b54c0f411e9a7e7b1f09853e723ad9de | Solidity | ClutchToken | contract ClutchToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://f1375f2d683e0192af4e2868e892b7ef014cc01205379f2e6f514948289acb8a | {
"func_code_index": [
3962,
4118
]
} | 6,205 |
ClutchToken | ClutchToken.sol | 0x339c9044b54c0f411e9a7e7b1f09853e723ad9de | Solidity | ClutchToken | contract ClutchToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | GNU GPLv3 | bzzr://f1375f2d683e0192af4e2868e892b7ef014cc01205379f2e6f514948289acb8a | {
"func_code_index": [
4473,
4795
]
} | 6,206 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.