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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4166,
4444
]
} | 6,900 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4592,
4743
]
} | 6,901 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4847,
5166
]
} | 6,902 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5471,
5649
]
} | 6,903 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5804,
5948
]
} | 6,904 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6023,
6176
]
} | 6,905 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6255,
6380
]
} | 6,906 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6704,
6932
]
} | 6,907 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7080,
7244
]
} | 6,908 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 Uint256ToAd... | /**
* @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 enumerated i... | 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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7347,
7553
]
} | 6,909 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Strings | library Strings {
/**
* @dev Converts a `uint256` to its ASCII `string` representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6e... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = ... | /**
* @dev Converts a `uint256` to its ASCII `string` representation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
105,
832
]
} | 6,910 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _holderTokens[owner].length();
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3430,
3645
]
} | 6,911 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) public view override returns (address) {
return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3698,
3869
]
} | 6,912 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | name | function name() public view override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3927,
4021
]
} | 6,913 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | symbol | function symbol() public view override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4081,
4179
]
} | 6,914 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory _tokenURI = _tokenURIs[tokenId];
// If there is no base URI, return the token URI.
if (bytes(_baseURI).length == 0) {
re... | /**
* @dev See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4241,
4985
]
} | 6,915 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | baseURI | function baseURI() public view returns (string memory) {
return _baseURI;
}
| /**
* @dev Returns the base URI set via {_setBaseURI}. This will be
* automatically added as a prefix in {tokenURI} to each token's URI, or
* to the token ID if no specific URI is set for that token ID.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5213,
5304
]
} | 6,916 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
return _holderTokens[owner].at(index);
}
| /**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5379,
5535
]
} | 6,917 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
// _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
return _tokenOwners.length();
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5602,
5806
]
} | 6,918 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) public view override returns (uint256) {
(uint256 tokenId, ) = _tokenOwners.at(index);
return tokenId;
}
| /**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5874,
6039
]
} | 6,919 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) public virtual override {
address owner = ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6092,
6477
]
} | 6,920 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) public view override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6534,
6747
]
} | 6,921 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6810,
7104
]
} | 6,922 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view override returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7166,
7324
]
} | 6,923 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 tokenId) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7382,
7686
]
} | 6,924 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7748,
7901
]
} | 6,925 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7963,
8249
]
} | 6,926 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeTransfer | function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivale... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
9107,
9380
]
} | 6,927 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _exists | function _exists(uint256 tokenId) internal view returns (bool) {
return _tokenOwners.contains(tokenId);
}
| /**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
9679,
9800
]
} | 6,928 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _isApprovedOrOwner | function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
| /**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
9954,
10287
]
} | 6,929 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
d*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
10614,
10726
]
} | 6,930 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
_mint(to, tokenId);
require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
10943,
11194
]
} | 6,931 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_holderTokens[to].add(tokenId);
_tokenOwners.set(tokenId, to);
... | /**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
11512,
11909
]
} | 6,932 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
// Clear metadata (if any)
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
12122,
12628
]
} | 6,933 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _transfer | function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previ... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
12948,
13511
]
} | 6,934 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _setTokenURI | function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
| /**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
13654,
13870
]
} | 6,935 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _setBaseURI | function _setBaseURI(string memory baseURI_) internal virtual {
_baseURI = baseURI_;
}
| /**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
14089,
14191
]
} | 6,936 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
private returns (bool)
{
if (!to.isContract()) {
return true;
}
bytes memory returndata = to.functionCall(abi.encodeWithSelector(
IERC721Receiver(to).onERC721Received.selector,
_msgSend... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
14740,
15333
]
} | 6,937 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak2... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
16086,
16183
]
} | 6,938 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 () internal {
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 returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
489,
570
]
} | 6,939 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 () internal {
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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1112,
1261
]
} | 6,940 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 () internal {
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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1406,
1650
]
} | 6,941 | |
MasterChef | contracts/NvsToken.sol | 0xd82b0d65cf599d79670b50177000941534ae31f1 | Solidity | NvsToken | contract NvsToken is ERC20("NewVision.money", "NVS"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
}
} | // NvsToken with Governance. | LineComment | mint | function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
}
| /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). | NatSpecSingleLine | v0.6.12+commit.27d51765 | MIT | ipfs://dfd2b5f9554d21a7f74811b456dc20ecc98442b68cdc274e85d936448b7d23c4 | {
"func_code_index": [
163,
267
]
} | 6,942 |
BITOXAirdrop | contracts/flavours/Ownable.sol | 0x2df4031060e27faec80e66380d31b142b7bbfa61 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.s... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://11d39b17a920a0c47bd16b43c714c0853567aa85be4df1228a8c484ff3c9e821 | {
"func_code_index": [
679,
876
]
} | 6,943 | |
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0 || b == 0) {
return 0;
}
c = a * b;
require(c / a == b, "Mul overflow!");
return ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0 || b == 0) {
return 0;
}
c = a * b;
require(c / a == b, "Mul overflow!");
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
95,
330
]
} | 6,944 | |
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0 || b == 0) {
return 0;
}
c = a * b;
require(c / a == b, "Mul overflow!");
return ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity automatically throws when dividing by 0
uint256 c = a / b;
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
420,
608
]
} | 6,945 | |
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0 || b == 0) {
return 0;
}
c = a * b;
require(c / a == b, "Mul overflow!");
return ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "Sub overflow!");
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
728,
874
]
} | 6,946 | |
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0 || b == 0) {
return 0;
}
c = a * b;
require(c / a == b, "Mul overflow!");
return ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
require(c >= a, "Add overflow!");
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
944,
1108
]
} | 6,947 | |
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | setICO | function setICO(address user, uint256 amt) internal{
uint256 amt2 = amt * (10 ** uint256(decimals));
_balanceOf[user] = amt2;
emit Transfer(0x0, user, amt2);
icoSupply += amt2;
}
| //set ICO balance and emit | LineComment | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
499,
723
]
} | 6,948 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | unlock | function unlock() external onlyOwner returns (bool success)
{
require (isLocked == true, "It is unlocked already!"); //you can unlock only once
isLocked = false;
return true;
}
| // unlock transfers for everyone | LineComment | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
1558,
1776
]
} | 6,949 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | balanceOf | function balanceOf(address _owner)
external view
returns(uint256 balance) {
return _balanceOf[_owner];
}
| /**
* Get the token balance for account
*
* Get token balance of `_owner` account
*
* @param _owner The address of the owner
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
1942,
2075
]
} | 6,950 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | _transfer | function _transfer(address _from, address _to, uint256 _value)
internal {
// check that contract is unlocked
require (isLocked == false || _from == owner, "Contract is locked!");
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != address(0), "Can`t send to 0x0, use burn()");
... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
2157,
2856
]
} | 6,951 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | transfer | function transfer(address _to, uint256 _value)
external
returns(bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
3055,
3223
]
} | 6,952 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | transferFrom | function transferFrom(address _from, address _to, uint256 _value)
external
returns(bool success) {
// Check allowance
require(_value <= _allowance[_from][msg.sender], "Not enough allowance!");
// Check balance
require(_value <= _balanceOf[_from], "Not enough balance!");
_allowance[_from][msg.... | /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
3490,
4024
]
} | 6,953 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | approve | function approve(address _spender, uint256 _value)
public
returns(bool success) {
_allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
4281,
4512
]
} | 6,954 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
external
returns(bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
4898,
5243
]
} | 6,955 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | allowance | function allowance(address _owner, address _spender)
external view
returns(uint256 value) {
return _allowance[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
5574,
5733
]
} | 6,956 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | burn | function burn(uint256 _value)
external
returns(bool success) {
_burn(msg.sender, _value);
return true;
}
| /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
5897,
6039
]
} | 6,957 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | burnFrom | function burnFrom(address _from, uint256 _value)
external
returns(bool success) {
// Check allowance
require(_value <= _allowance[_from][msg.sender], "Not enough allowance!");
// Is tehere enough coins on account
require(_value <= _balanceOf[_from], "Insuffient balance!");
// Subtract from t... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
6290,
6882
]
} | 6,958 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | function () external payable {
revert("This contract is not accepting ETH.");
}
| // ------------------------------------------------------------------------
// Don't accept accidental ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
7549,
7647
]
} | 6,959 | ||||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | withdraw | function withdraw(uint256 _amount)
external onlyOwner
returns (bool){
require(_amount <= address(this).balance, "Not enough balance!");
owner.transfer(_amount);
return true;
}
| //Owner can take ETH from contract | LineComment | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
7690,
7912
]
} | 6,960 | |||
Aligato | Aligato.sol | 0x55dca321ca5c612d398ee90e98fd8b4df5e912ea | Solidity | Aligato | contract Aligato is ERC20Interface, Owned, Permissioned, Burnable {
using SafeMath for uint256; //Be aware of overflows
// This creates an array with all balances
mapping(address => uint256) internal _balanceOf;
// This creates an array with all allowance
mapping(address => mapping(addres... | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint256 _value)
external onlyOwner
returns(bool success) {
return ERC20Interface(tokenAddress).transfer(owner, _value);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://340f8dd5d93328b26b0b2619433b15901bd13e61ffd44c6aed1899a81bb36b95 | {
"func_code_index": [
8143,
8346
]
} | 6,961 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Augur | contract Augur is Controlled, IAugur {
enum TokenType{
ReputationToken,
ShareToken,
DisputeCrowdsourcer,
FeeWindow,
FeeToken
}
event MarketCreated(bytes32 indexed topic, string description, string extraInfo, address indexed universe, address market, addres... | createGenesisUniverse | function createGenesisUniverse() public returns (IUniverse) {
return createUniverse(IUniverse(0), bytes32(0), new uint256[](0), false);
}
| //
// Universe
// | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
4824,
4980
]
} | 6,962 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Augur | contract Augur is Controlled, IAugur {
enum TokenType{
ReputationToken,
ShareToken,
DisputeCrowdsourcer,
FeeWindow,
FeeToken
}
event MarketCreated(bytes32 indexed topic, string description, string extraInfo, address indexed universe, address market, addres... | isKnownCrowdsourcer | function isKnownCrowdsourcer(IDisputeCrowdsourcer _crowdsourcer) public view returns (bool) {
return crowdsourcers[_crowdsourcer];
}
| //
// Crowdsourcers
// | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
6135,
6286
]
} | 6,963 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Augur | contract Augur is Controlled, IAugur {
enum TokenType{
ReputationToken,
ShareToken,
DisputeCrowdsourcer,
FeeWindow,
FeeToken
}
event MarketCreated(bytes32 indexed topic, string description, string extraInfo, address indexed universe, address market, addres... | trustedTransfer | function trustedTransfer(ERC20 _token, address _from, address _to, uint256 _amount) public onlyWhitelistedCallers returns (bool) {
require(_amount > 0);
require(_token.transferFrom(_from, _to, _amount));
return true;
}
| //
// Transfer
// | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
6832,
7087
]
} | 6,964 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Augur | contract Augur is Controlled, IAugur {
enum TokenType{
ReputationToken,
ShareToken,
DisputeCrowdsourcer,
FeeWindow,
FeeToken
}
event MarketCreated(bytes32 indexed topic, string description, string extraInfo, address indexed universe, address market, addres... | logMarketCreated | function logMarketCreated(bytes32 _topic, string _description, string _extraInfo, IUniverse _universe, address _market, address _marketCreator, bytes32[] _outcomes, int256 _minPrice, int256 _maxPrice, IMarket.MarketType _marketType) public returns (bool) {
require(isKnownUniverse(_universe));
require(_univers... | //
// Logging
//
// This signature is intended for the categorical market creation. We use two signatures for the same event because of stack depth issues which can be circumvented by maintaining order of paramaters | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
7328,
7900
]
} | 6,965 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Augur | contract Augur is Controlled, IAugur {
enum TokenType{
ReputationToken,
ShareToken,
DisputeCrowdsourcer,
FeeWindow,
FeeToken
}
event MarketCreated(bytes32 indexed topic, string description, string extraInfo, address indexed universe, address market, addres... | logMarketCreated | function logMarketCreated(bytes32 _topic, string _description, string _extraInfo, IUniverse _universe, address _market, address _marketCreator, int256 _minPrice, int256 _maxPrice, IMarket.MarketType _marketType) public returns (bool) {
require(isKnownUniverse(_universe));
require(_universe == IUniverse(msg.se... | // This signature is intended for yesNo and scalar market creation. See function comment above for explanation. | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
8020,
8578
]
} | 6,966 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | SafeMathUint256 | library SafeMathUint256 {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
require(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatical... | fxpMul | function fxpMul(uint256 a, uint256 b, uint256 base) internal pure returns (uint256) {
return div(mul(a, b), base);
}
| // Float [fixed point] Operations | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
1548,
1683
]
} | 6,967 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Order | library Order {
using SafeMathUint256 for uint256;
enum Types {
Bid, Ask
}
enum TradeDirections {
Long, Short
}
struct Data {
// Contracts
IOrders orders;
IMarket market;
IAugur augur;
// Order
bytes32 id;
... | create | function create(IController _controller, address _creator, uint256 _outcome, Order.Types _type, uint256 _attoshares, uint256 _price, IMarket _market, bytes32 _betterOrderId, bytes32 _worseOrderId) internal view returns (Data) {
require(_outcome < _market.getNumberOfOutcomes());
require(_price < _market.getNum... | //
// Constructor
//
// No validation is needed here as it is simply a librarty function for organizing data | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
718,
1635
]
} | 6,968 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Order | library Order {
using SafeMathUint256 for uint256;
enum Types {
Bid, Ask
}
enum TradeDirections {
Long, Short
}
struct Data {
// Contracts
IOrders orders;
IMarket market;
IAugur augur;
// Order
bytes32 id;
... | getOrderId | function getOrderId(Order.Data _orderData) internal view returns (bytes32) {
if (_orderData.id == bytes32(0)) {
bytes32 _orderId = _orderData.orders.getOrderId(_orderData.orderType, _orderData.market, _orderData.amount, _orderData.price, _orderData.creator, block.number, _orderData.outcome, _orderData.mon... | //
// "public" functions
// | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
1683,
2209
]
} | 6,969 | |||
Augur | Augur.sol | 0x5a76e5b05662ee500c51351feb6d5f68d401c9af | Solidity | Order | library Order {
using SafeMathUint256 for uint256;
enum Types {
Bid, Ask
}
enum TradeDirections {
Long, Short
}
struct Data {
// Contracts
IOrders orders;
IMarket market;
IAugur augur;
// Order
bytes32 id;
... | escrowFundsForBid | function escrowFundsForBid(Order.Data _orderData) private returns (bool) {
require(_orderData.moneyEscrowed == 0);
require(_orderData.sharesEscrowed == 0);
uint256 _attosharesToCover = _orderData.amount;
uint256 _numberOfOutcomes = _orderData.market.getNumberOfOutcomes();
// Figure out how ma... | //
// Private functions
// | LineComment | v0.4.20+commit.3155dd80 | bzzr://72f67741451466667a74454968e2a09ca5c2bfc5c9529096dae1dedccd58d86a | {
"func_code_index": [
3447,
5252
]
} | 6,970 | |||
BITOXAirdrop | contracts/BITOXAirdrop.sol | 0x2df4031060e27faec80e66380d31b142b7bbfa61 | Solidity | BITOXAirdrop | contract BITOXAirdrop is BaseAirdrop {
uint public constant PER_USER_AMOUNT = 2883e18;
constructor(address _token, address _tokenHolder) public BaseAirdrop(_token, _tokenHolder) {
locked = true;
}
// Disable direct payments
function() external payable {
revert();
}
... | /**
* @title BITOX token airdrop contract.
*/ | NatSpecMultiLine | function() external payable {
revert();
}
| // Disable direct payments | LineComment | v0.4.24+commit.e67f0147 | bzzr://11d39b17a920a0c47bd16b43c714c0853567aa85be4df1228a8c484ff3c9e821 | {
"func_code_index": [
260,
320
]
} | 6,971 | ||
Token | Token.sol | 0xd0b7cb9ae6042ea533495cda0ca6346903baad1e | Solidity | Token | contract Token {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
/* This generates a public event on the blockchain ... | function () {
revert(); // Prevents accidental sending of ether
}
| /* This unnamed function is called whenever someone tries to send ether to it */ | Comment | v0.4.24+commit.e67f0147 | bzzr://ba4cd016ababdd371387ed69c65052a5e8117f274d1d2f1c013a4592cfb5574a | {
"func_code_index": [
1359,
1434
]
} | 6,972 | ||||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
299,
395
]
} | 6,973 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
453,
568
]
} | 6,974 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
776,
939
]
} | 6,975 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
997,
1136
]
} | 6,976 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | approve | function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
1278,
1435
]
} | 6,977 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
1902,
2211
]
} | 6,978 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
2615,
2830
]
} | 6,979 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
3328,
3594
]
} | 6,980 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exc... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
4079,
4555
]
} | 6,981 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | _mint | function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
4831,
5144
]
} | 6,982 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | _burn | function _burn(address account, uint256 amount) internal {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amo... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
5471,
5824
]
} | 6,983 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | _approve | function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
6259,
6602
]
} | 6,984 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
}
| /**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
6783,
7020
]
} | 6,985 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | BrickGlobalStake | contract BrickGlobalStake is ERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
c... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
552,
640
]
} | 6,986 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | BrickGlobalStake | contract BrickGlobalStake is ERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
c... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
754,
846
]
} | 6,987 | |||
BrickGlobalStake | BrickGlobalStake.sol | 0x16018d0ad496cc824ce6d4dcaf1d5c296108a3c9 | Solidity | BrickGlobalStake | contract BrickGlobalStake is ERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
c... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
*... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | bzzr://e42bb021ff5239de529b37d12f8280fc6a9e3ceecb5ccc9b8dee1d3dc73b5332 | {
"func_code_index": [
1404,
1492
]
} | 6,988 | |||
StableAMM | StableAMM.sol | 0x549479cf73b904a633c564cc392f4093037e73b1 | Solidity | Context | contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.16+commit.9c3226ce | MIT | bzzr://6602d543cf2454b9288af11fad953ca98f3edc0ef2e0e0c107f2ba0b6685d07b | {
"func_code_index": [
109,
212
]
} | 6,989 | ||
Crowdsale | Crowdsale.sol | 0x2f0b4c0d841cd320dbae23aac7cc8e22f31b8b9e | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary; // 募资成功后的收款方
uint public fundingGoal; // 募资额度
uint public amountRaised; // 参与数量
uint public deadline; // 募资截止期
uint public price; // token 与以太坊的汇率 , token卖多少钱
token public tokenReward; // 要卖的token
mapping(address => ... | Crowdsale | function Crowdsale(
address ifSuccessfulSendTo,
uint fundingGoalInEthers,
uint durationInMinutes,
uint finneyCostOfEachToken,
address addressOfTokenUsedAsReward) {
beneficiary = ifSuccessfulSendTo;
fundingGoal = fundingGoalInEthers * 1 ether;
deadline = now + duration... | /**
* 构造函数, 设置相关属性
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://d677a52b4da8073ab06951482ceb482d09d49aeee477e98b233fe018796f77b5 | {
"func_code_index": [
670,
1201
]
} | 6,990 | |||
Crowdsale | Crowdsale.sol | 0x2f0b4c0d841cd320dbae23aac7cc8e22f31b8b9e | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary; // 募资成功后的收款方
uint public fundingGoal; // 募资额度
uint public amountRaised; // 参与数量
uint public deadline; // 募资截止期
uint public price; // token 与以太坊的汇率 , token卖多少钱
token public tokenReward; // 要卖的token
mapping(address => ... | function () payable {
require(!crowdsaleClosed);
uint amount = msg.value;
balanceOf[msg.sender] += amount;
amountRaised += amount;
tokenReward.transfer(msg.sender, amount /price*1000000000000000);
FundTransfer(msg.sender, amount, true);
}
| /**
* 无函数名的Fallback函数,
* 在向合约转账时,这个函数会被调用
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://d677a52b4da8073ab06951482ceb482d09d49aeee477e98b233fe018796f77b5 | {
"func_code_index": [
1272,
1574
]
} | 6,991 | ||||
Crowdsale | Crowdsale.sol | 0x2f0b4c0d841cd320dbae23aac7cc8e22f31b8b9e | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary; // 募资成功后的收款方
uint public fundingGoal; // 募资额度
uint public amountRaised; // 参与数量
uint public deadline; // 募资截止期
uint public price; // token 与以太坊的汇率 , token卖多少钱
token public tokenReward; // 要卖的token
mapping(address => ... | checkGoalReached | function checkGoalReached() afterDeadline {
if (amountRaised >= fundingGoal) {
fundingGoalReached = true;
GoalReached(beneficiary, amountRaised);
}
crowdsaleClosed = true;
}
| /**
* 判断众筹是否完成融资目标, 这个方法使用了afterDeadline函数修改器
*
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://d677a52b4da8073ab06951482ceb482d09d49aeee477e98b233fe018796f77b5 | {
"func_code_index": [
1833,
2069
]
} | 6,992 | |||
Crowdsale | Crowdsale.sol | 0x2f0b4c0d841cd320dbae23aac7cc8e22f31b8b9e | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary; // 募资成功后的收款方
uint public fundingGoal; // 募资额度
uint public amountRaised; // 参与数量
uint public deadline; // 募资截止期
uint public price; // token 与以太坊的汇率 , token卖多少钱
token public tokenReward; // 要卖的token
mapping(address => ... | safeWithdrawal | function safeWithdrawal() afterDeadline {
if (!fundingGoalReached) {
uint amount = balanceOf[msg.sender];
balanceOf[msg.sender] = 0;
if (amount > 0) {
if (msg.sender.send(amount)) {
FundTransfer(msg.sender, amount, false);
} else {
... | /**
* 完成融资目标时,融资款发送到收款方
* 未完成融资目标时,执行退款
*
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://d677a52b4da8073ab06951482ceb482d09d49aeee477e98b233fe018796f77b5 | {
"func_code_index": [
2148,
2954
]
} | 6,993 | |||
AccessControlledAggregator | AccessControlledAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | AccessControlledAggregator | contract AccessControlledAggregator is FluxAggregator, SimpleReadAccessController {
/**
* @notice set up the aggregator with initial configuration
* @param _link The address of the LINK token
* @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
... | /**
* @title AccessControlled FluxAggregator contract
* @notice This contract requires addresses to be added to a controller
* in order to read the answers stored in the FluxAggregator contract
*/ | NatSpecMultiLine | getRoundData | function getRoundData(uint80 _roundId)
public
view
override
checkAccess()
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
return super.getRoundData(_roundId);
}
| /**
* @notice get data about a round. Consumers are encouraged to check
* that they're receiving fresh data by inspecting the updatedAt and
* answeredInRound return values.
* @param _roundId the round ID to retrieve the round data for
* @return roundId is the round ID for which data was retrieved
* @return answer... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
2490,
2772
]
} | 6,994 | |
AccessControlledAggregator | AccessControlledAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | AccessControlledAggregator | contract AccessControlledAggregator is FluxAggregator, SimpleReadAccessController {
/**
* @notice set up the aggregator with initial configuration
* @param _link The address of the LINK token
* @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
... | /**
* @title AccessControlled FluxAggregator contract
* @notice This contract requires addresses to be added to a controller
* in order to read the answers stored in the FluxAggregator contract
*/ | NatSpecMultiLine | latestRoundData | function latestRoundData()
public
view
override
checkAccess()
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
return super.latestRoundData();
}
| /**
* @notice get data about the latest round. Consumers are encouraged to check
* that they're receiving fresh data by inspecting the updatedAt and
* answeredInRound return values. Consumers are encouraged to
* use this more fully featured method over the "legacy" latestAnswer
* functions. Consumers are encourage... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
4061,
4326
]
} | 6,995 | |
AccessControlledAggregator | AccessControlledAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | AccessControlledAggregator | contract AccessControlledAggregator is FluxAggregator, SimpleReadAccessController {
/**
* @notice set up the aggregator with initial configuration
* @param _link The address of the LINK token
* @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
... | /**
* @title AccessControlled FluxAggregator contract
* @notice This contract requires addresses to be added to a controller
* in order to read the answers stored in the FluxAggregator contract
*/ | NatSpecMultiLine | latestAnswer | function latestAnswer()
public
view
override
checkAccess()
returns (int256)
{
return super.latestAnswer();
}
| /**
* @notice get the most recently reported answer
* @dev overridden funcion to add the checkAccess() modifier
*
* @dev #[deprecated] Use latestRoundData instead. This does not error if no
* answer has been reached, it will simply return 0. Either wait to point to
* an already answered Aggregator or use the reco... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
4753,
4891
]
} | 6,996 | |
AccessControlledAggregator | AccessControlledAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | AccessControlledAggregator | contract AccessControlledAggregator is FluxAggregator, SimpleReadAccessController {
/**
* @notice set up the aggregator with initial configuration
* @param _link The address of the LINK token
* @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
... | /**
* @title AccessControlled FluxAggregator contract
* @notice This contract requires addresses to be added to a controller
* in order to read the answers stored in the FluxAggregator contract
*/ | NatSpecMultiLine | latestRound | function latestRound()
public
view
override
checkAccess()
returns (uint256)
{
return super.latestRound();
}
| /**
* @notice get the most recently reported round ID
* @dev overridden funcion to add the checkAccess() modifier
*
* @dev #[deprecated] Use latestRoundData instead. This does not error if no
* answer has been reached, it will simply return 0. Either wait to point to
* an already answered Aggregator or use the re... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
5320,
5457
]
} | 6,997 | |
AccessControlledAggregator | AccessControlledAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | AccessControlledAggregator | contract AccessControlledAggregator is FluxAggregator, SimpleReadAccessController {
/**
* @notice set up the aggregator with initial configuration
* @param _link The address of the LINK token
* @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
... | /**
* @title AccessControlled FluxAggregator contract
* @notice This contract requires addresses to be added to a controller
* in order to read the answers stored in the FluxAggregator contract
*/ | NatSpecMultiLine | latestTimestamp | function latestTimestamp()
public
view
override
checkAccess()
returns (uint256)
{
return super.latestTimestamp();
}
| /**
* @notice get the most recent updated at timestamp
* @dev overridden funcion to add the checkAccess() modifier
*
* @dev #[deprecated] Use latestRoundData instead. This does not error if no
* answer has been reached, it will simply return 0. Either wait to point to
* an already answered Aggregator or use the r... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
5887,
6032
]
} | 6,998 | |
AccessControlledAggregator | AccessControlledAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | AccessControlledAggregator | contract AccessControlledAggregator is FluxAggregator, SimpleReadAccessController {
/**
* @notice set up the aggregator with initial configuration
* @param _link The address of the LINK token
* @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
... | /**
* @title AccessControlled FluxAggregator contract
* @notice This contract requires addresses to be added to a controller
* in order to read the answers stored in the FluxAggregator contract
*/ | NatSpecMultiLine | getAnswer | function getAnswer(uint256 _roundId)
public
view
override
checkAccess()
returns (int256)
{
return super.getAnswer(_roundId);
}
| /**
* @notice get past rounds answers
* @dev overridden funcion to add the checkAccess() modifier
* @param _roundId the round number to retrieve the answer for
*
* @dev #[deprecated] Use getRoundData instead. This does not error if no
* answer has been reached, it will simply return 0. Either wait to point to
* ... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
6504,
6660
]
} | 6,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.