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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
YeFiMpool1 | YeFiMpool1.sol | 0x2bf30d058230ec127735c6bf444c49039aa7c243 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value 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 | BSD-3-Clause | ipfs://202a02b2d591eacb8a21c8ff0334701d4451d0e29051d04d29532fe3bf0bdecd | {
"func_code_index": [
7132,
7274
]
} | 900 |
YeFiMpool1 | YeFiMpool1.sol | 0x2bf30d058230ec127735c6bf444c49039aa7c243 | Solidity | Ownable | contract Ownable {
address public admin;
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 {
admin = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferred(admin, newOwner);
admin = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | BSD-3-Clause | ipfs://202a02b2d591eacb8a21c8ff0334701d4451d0e29051d04d29532fe3bf0bdecd | {
"func_code_index": [
639,
820
]
} | 901 |
YeFiMpool1 | YeFiMpool1.sol | 0x2bf30d058230ec127735c6bf444c49039aa7c243 | Solidity | YeFiMpool1 | contract YeFiMpool1 is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
// yfilend token contract address
address public tokenAddress;
// reward rate % per year
uint public rew... | setTokenAddresses | function setTokenAddresses(address _tokenAddr) public onlyOwner returns(bool){
require(_tokenAddr != address(0), "Invalid address format is not supported");
tokenAddress = _tokenAddr;
}
| /*=============================ADMINISTRATIVE FUNCTIONS ==================================*/ | Comment | v0.6.12+commit.27d51765 | BSD-3-Clause | ipfs://202a02b2d591eacb8a21c8ff0334701d4451d0e29051d04d29532fe3bf0bdecd | {
"func_code_index": [
1125,
1348
]
} | 902 | ||
RealAssetDepositaryBalanceView | contracts/depositary/IUpdatable.sol | 0xaa6945212acfceec06ae29d67efd21d4cb7d96e8 | Solidity | IUpdatable | interface IUpdatable {
/**
* @return Last update block number.
*/
function lastUpdateBlockNumber() external view returns (uint256);
} | lastUpdateBlockNumber | function lastUpdateBlockNumber() external view returns (uint256);
| /**
* @return Last update block number.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
80,
149
]
} | 903 | |||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than _currentIndex times
unchecked {
return _currentIndex - _burnCounter;
}
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1854,
2123
]
} | 904 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
2186,
2490
]
} | 905 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return uint256(_addressData[owner].balance);
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
2545,
2752
]
} | 906 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | ownershipOf | function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
uint256 curr = tokenId;
unchecked {
if (curr < _currentIndex) {
TokenOwnership memory ownership = _ownerships[curr];
if (!ownership.burned) {
if (ownership.addr != address(0)) {... | /**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
3364,
4426
]
} | 907 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) public view override returns (address) {
return ownershipOf(tokenId).addr;
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
4479,
4605
]
} | 908 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
4663,
4765
]
} | 909 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
4825,
4931
]
} | 910 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
}
| /**
* @dev See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
4993,
5310
]
} | 911 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _baseURI | function _baseURI() internal view virtual returns (string memory) {
return '';
}
| /**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5547,
5643
]
} | 912 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) public override {
address owner = ERC721A.ownerOf(tokenId);
if (to == owner) revert ApprovalToCurrentOwner();
if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_approve(to, toke... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5696,
6062
]
} | 913 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) public view override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6119,
6323
]
} | 914 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public override {
if (operator == _msgSender()) revert ApproveToCaller();
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6386,
6664
]
} | 915 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6726,
6892
]
} | 916 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6950,
7118
]
} | 917 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, '');
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7180,
7363
]
} | 918 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
_transfer(from, to, tokenId);
if (!_checkOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7425,
7761
]
} | 919 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _exists | function _exists(uint256 tokenId) internal view returns (bool) {
return tokenId < _currentIndex && !_ownerships[tokenId].burned;
}
| /**
* @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`),
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
8003,
8149
]
} | 920 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _safeMint | function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
_mint(to, quantity, _data, true);
}
| /**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
8604,
8765
]
} | 921 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _mint | function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
... | /**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
9008,
10389
]
} | 922 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) private {
TokenOwnership memory prevOwnership = ownershipOf(tokenId);
bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
isApprovedForAll(prevOwnership.addr, _msgSender()) ||
getApproved(tokenId) == _msgSen... | /**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
10627,
12698
]
} | 923 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _burn | function _burn(uint256 tokenId) internal virtual {
TokenOwnership memory prevOwnership = ownershipOf(tokenId);
_beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);
// Clear approvals from the previous owner
_approve(address(0), tokenId, prevOwnership.addr);
// Underflow of the sende... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
12911,
14915
]
} | 924 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _approve | function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
15022,
15215
]
} | 925 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver... | /**
* @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.8.9+commit.e5eed63a | {
"func_code_index": [
15764,
16537
]
} | 926 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _beforeTokenTransfers | function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
| /**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` a... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
17164,
17322
]
} | 927 | ||
PhunkyFungi | ERC721A.sol | 0xdf0e921f7e5a837805bfbe02012db648a12d72cc | Solidity | ERC721A | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of owne... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Assumes that an owner c... | NatSpecMultiLine | _afterTokenTransfers | function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
| /**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
17959,
18116
]
} | 928 | ||
AraProxy | AraProxy.sol | 0x17a6033535b1ab8cbbb430c62782d164d8f6ac45 | Solidity | AraProxy | contract AraProxy {
bytes32 private constant registryPosition_ = keccak256("io.ara.proxy.registry");
bytes32 private constant implementationPosition_ = keccak256("io.ara.proxy.implementation");
modifier restricted() {
bytes32 registryPosition = registryPosition_;
address registryAddress;
ass... | /**
* @title AraProxy
* @dev Gives the possibility to delegate any call to a foreign implementation.
*/ | NatSpecMultiLine | function () payable public {
bytes32 implementationPosition = implementationPosition_;
address _impl;
assembly {
_impl := sload(implementationPosition)
}
assembly {
let ptr := mload(0x40)
calldatacopy(ptr, 0, calldatasize)
let result := delegatecall(gas, _impl, ptr, calldatasize, 0,... | /**
* @dev Fallback function allowing to perform a delegatecall to the given implementation.
* This function will return whatever the implementation call returns
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://05642ac97894b238b61c8ffa819c5dc691441cccd53318629232345ba3846b4a | {
"func_code_index": [
1375,
1897
]
} | 929 | ||
Primacorp | Primacorp.sol | 0x1b6df88f60b6b7c2b7f9b6beec4a6b3841a10d6c | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://888ea5ef8c31a535c1c6323abc1f8657ec106c9fd7bc8c118bb9e3a98e4a9a81 | {
"func_code_index": [
815,
932
]
} | 930 | |
Primacorp | Primacorp.sol | 0x1b6df88f60b6b7c2b7f9b6beec4a6b3841a10d6c | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @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 {
_transferOwnership(_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://888ea5ef8c31a535c1c6323abc1f8657ec106c9fd7bc8c118bb9e3a98e4a9a81 | {
"func_code_index": [
1097,
1205
]
} | 931 | |
Primacorp | Primacorp.sol | 0x1b6df88f60b6b7c2b7f9b6beec4a6b3841a10d6c | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @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) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://888ea5ef8c31a535c1c6323abc1f8657ec106c9fd7bc8c118bb9e3a98e4a9a81 | {
"func_code_index": [
1343,
1521
]
} | 932 | |
BitDex | BitDex.sol | 0x9e61d86dba4c130629b8dcc4e30fc06758a1b8b7 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256) {}
/// @notice send `_value` token t... | totalSupply | function totalSupply() constant returns (uint256) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://914b1888817c36e10cea7fba9c3bd4a63e925090e7d9a3e5e9a5555d2e445de7 | {
"func_code_index": [
56,
111
]
} | 933 | |||
BitDex | BitDex.sol | 0x9e61d86dba4c130629b8dcc4e30fc06758a1b8b7 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256) {}
/// @notice send `_value` token t... | balanceOf | function balanceOf(address _owner) constant returns (uint256) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://914b1888817c36e10cea7fba9c3bd4a63e925090e7d9a3e5e9a5555d2e445de7 | {
"func_code_index": [
215,
282
]
} | 934 | |||
BitDex | BitDex.sol | 0x9e61d86dba4c130629b8dcc4e30fc06758a1b8b7 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256) {}
/// @notice send `_value` token t... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://914b1888817c36e10cea7fba9c3bd4a63e925090e7d9a3e5e9a5555d2e445de7 | {
"func_code_index": [
511,
586
]
} | 935 | |||
BitDex | BitDex.sol | 0x9e61d86dba4c130629b8dcc4e30fc06758a1b8b7 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256) {}
/// @notice send `_value` token t... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://914b1888817c36e10cea7fba9c3bd4a63e925090e7d9a3e5e9a5555d2e445de7 | {
"func_code_index": [
899,
993
]
} | 936 | |||
BitDex | BitDex.sol | 0x9e61d86dba4c130629b8dcc4e30fc06758a1b8b7 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256) {}
/// @notice send `_value` token t... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://914b1888817c36e10cea7fba9c3bd4a63e925090e7d9a3e5e9a5555d2e445de7 | {
"func_code_index": [
1269,
1348
]
} | 937 | |||
BitDex | BitDex.sol | 0x9e61d86dba4c130629b8dcc4e30fc06758a1b8b7 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256) {}
/// @notice send `_value` token t... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://914b1888817c36e10cea7fba9c3bd4a63e925090e7d9a3e5e9a5555d2e445de7 | {
"func_code_index": [
1550,
1645
]
} | 938 | |||
BitDex | BitDex.sol | 0x9e61d86dba4c130629b8dcc4e30fc06758a1b8b7 | Solidity | AccountLevels | contract AccountLevels {
//given a user, returns an account level
//0 = regular user (pays take fee and make fee)
//1 = market maker silver (pays take fee, no make fee, gets rebate)
//2 = market maker gold (pays take fee, no make fee, gets entire counterparty's take fee as rebate)
function accountLevel(a... | accountLevel | function accountLevel(address user) constant returns(uint) {}
| //given a user, returns an account level
//0 = regular user (pays take fee and make fee)
//1 = market maker silver (pays take fee, no make fee, gets rebate)
//2 = market maker gold (pays take fee, no make fee, gets entire counterparty's take fee as rebate) | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://914b1888817c36e10cea7fba9c3bd4a63e925090e7d9a3e5e9a5555d2e445de7 | {
"func_code_index": [
295,
359
]
} | 939 | |||
RealAssetDepositaryBalanceView | contracts/utils/AccessControl.sol | 0xaa6945212acfceec06ae29d67efd21d4cb7d96e8 | Solidity | AccessControl | contract AccessControl is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
/// @dev Allowed address list.
EnumerableSet.AddressSet private allowed;
/// @notice An event emitted when address allowed.
event AccessAllowed(address member);
/// @notice An event emitted when address deni... | allowAccess | function allowAccess(address member) external onlyOwner {
require(!allowed.contains(member), "AccessControl::allowAccess: member already allowed");
allowed.add(member);
emit AccessAllowed(member);
}
| /**
* @notice Allow access.
* @param member Target address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
447,
678
]
} | 940 | |||
RealAssetDepositaryBalanceView | contracts/utils/AccessControl.sol | 0xaa6945212acfceec06ae29d67efd21d4cb7d96e8 | Solidity | AccessControl | contract AccessControl is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
/// @dev Allowed address list.
EnumerableSet.AddressSet private allowed;
/// @notice An event emitted when address allowed.
event AccessAllowed(address member);
/// @notice An event emitted when address deni... | denyAccess | function denyAccess(address member) external onlyOwner {
require(allowed.contains(member), "AccessControl::denyAccess: member already denied");
allowed.remove(member);
emit AccessDenied(member);
}
| /**
* @notice Deny access.
* @param member Target address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
761,
990
]
} | 941 | |||
RealAssetDepositaryBalanceView | contracts/utils/AccessControl.sol | 0xaa6945212acfceec06ae29d67efd21d4cb7d96e8 | Solidity | AccessControl | contract AccessControl is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
/// @dev Allowed address list.
EnumerableSet.AddressSet private allowed;
/// @notice An event emitted when address allowed.
event AccessAllowed(address member);
/// @notice An event emitted when address deni... | accessList | function accessList() external view returns (address[] memory) {
address[] memory result = new address[](allowed.length());
for (uint256 i = 0; i < allowed.length(); i++) {
result[i] = allowed.at(i);
}
return result;
}
| /**
* @return Allowed address list.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1045,
1317
]
} | 942 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
60,
124
]
} | 943 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
232,
309
]
} | 944 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
546,
623
]
} | 945 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
946,
1042
]
} | 946 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
1326,
1407
]
} | 947 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
1615,
1712
]
} | 948 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | GateToken | contract GateToken is StandardToken {
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces mi... | GateToken | function GateToken() {
balances[msg.sender] = 5000000000000000000000000000;
totalSupply = 5000000000000000000000000000;
name = "GateToken";
decimals = 18;
symbol = "GATE";
unitsOneEthCanBuy = 100000000;
fundsWallet = msg.sender;
}
| // Where should the raised ETH go?
// which means the following function name has to match the contract name declared above | LineComment | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
1118,
1421
]
} | 949 | |||
GateToken | GateToken.sol | 0xf40d49ba964cb53086ac52632733c9b9662dadcb | Solidity | GateToken | contract GateToken is StandardToken {
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces mi... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://bbf5c8125bc01cd8568d5da3aa86bfa14e3a522b22828fa25a1971fe57c3e3d2 | {
"func_code_index": [
2017,
2822
]
} | 950 | |||
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev sets owner of contract
*/
function Ownable() public {
owner = msg.sender;
}
/**
* @dev changes owner of contract
* @param newOwner New owner
*/
function changeOwner(address newOwner) public ownerOnly {
require(newO... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev sets owner of contract
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
97,
157
]
} | 951 | |||
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev sets owner of contract
*/
function Ownable() public {
owner = msg.sender;
}
/**
* @dev changes owner of contract
* @param newOwner New owner
*/
function changeOwner(address newOwner) public ownerOnly {
require(newO... | changeOwner | function changeOwner(address newOwner) public ownerOnly {
require(newOwner != address(0));
owner = newOwner;
}
| /**
* @dev changes owner of contract
* @param newOwner New owner
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
243,
369
]
} | 952 | |||
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | EmergencySafe | contract EmergencySafe is Ownable{
event PauseToggled(bool isPaused);
bool public paused;
/**
* @dev Throws if contract is paused
*/
modifier isNotPaused() {
require(!paused);
_;
}
/**
* @dev Throws if contract is not paused
*/
modifier isPaused() {
require... | /**
* @title Emergency Safety contract
* @dev Allows token and ether drain and pausing of contract
*/ | NatSpecMultiLine | EmergencySafe | function EmergencySafe() public {
paused = false;
}
| /**
* @dev Initialises contract to non-paused
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
407,
469
]
} | 953 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | EmergencySafe | contract EmergencySafe is Ownable{
event PauseToggled(bool isPaused);
bool public paused;
/**
* @dev Throws if contract is paused
*/
modifier isNotPaused() {
require(!paused);
_;
}
/**
* @dev Throws if contract is not paused
*/
modifier isPaused() {
require... | /**
* @title Emergency Safety contract
* @dev Allows token and ether drain and pausing of contract
*/ | NatSpecMultiLine | emergencyERC20Drain | function emergencyERC20Drain(ERC20Interface token, uint amount) public ownerOnly{
token.transfer(owner, amount);
}
| /**
* @dev Allows draining of tokens (to owner) that might accidentally be sent to this address
* @param token Address of ERC20 token
* @param amount Amount to drain
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
660,
785
]
} | 954 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | EmergencySafe | contract EmergencySafe is Ownable{
event PauseToggled(bool isPaused);
bool public paused;
/**
* @dev Throws if contract is paused
*/
modifier isNotPaused() {
require(!paused);
_;
}
/**
* @dev Throws if contract is not paused
*/
modifier isPaused() {
require... | /**
* @title Emergency Safety contract
* @dev Allows token and ether drain and pausing of contract
*/ | NatSpecMultiLine | emergencyEthDrain | function emergencyEthDrain(uint amount) public ownerOnly returns (bool){
return owner.send(amount);
}
| /**
* @dev Allows draining of Ether
* @param amount Amount to drain
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
874,
986
]
} | 955 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | EmergencySafe | contract EmergencySafe is Ownable{
event PauseToggled(bool isPaused);
bool public paused;
/**
* @dev Throws if contract is paused
*/
modifier isNotPaused() {
require(!paused);
_;
}
/**
* @dev Throws if contract is not paused
*/
modifier isPaused() {
require... | /**
* @title Emergency Safety contract
* @dev Allows token and ether drain and pausing of contract
*/ | NatSpecMultiLine | togglePause | function togglePause() public ownerOnly {
paused = !paused;
emit PauseToggled(paused);
}
| /**
* @dev Switches the contract from paused to non-paused or vice-versa
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
1076,
1180
]
} | 956 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Upgradeable | contract Upgradeable is Ownable{
address public lastContract;
address public nextContract;
bool public isOldVersion;
bool public allowedToUpgrade;
/**
* @dev makes contract upgradeable
*/
function Upgradeable() public {
allowedToUpgrade = true;
}
/**
* @dev signals that n... | /**
* @title Upgradeable Conract
* @dev contract that implements doubly linked list to keep track of old and new
* versions of this contract
*/ | NatSpecMultiLine | Upgradeable | function Upgradeable() public {
allowedToUpgrade = true;
}
| /**
* @dev makes contract upgradeable
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
217,
286
]
} | 957 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Upgradeable | contract Upgradeable is Ownable{
address public lastContract;
address public nextContract;
bool public isOldVersion;
bool public allowedToUpgrade;
/**
* @dev makes contract upgradeable
*/
function Upgradeable() public {
allowedToUpgrade = true;
}
/**
* @dev signals that n... | /**
* @title Upgradeable Conract
* @dev contract that implements doubly linked list to keep track of old and new
* versions of this contract
*/ | NatSpecMultiLine | upgradeTo | function upgradeTo(Upgradeable newContract) public ownerOnly{
require(allowedToUpgrade && !isOldVersion);
nextContract = newContract;
isOldVersion = true;
newContract.confirmUpgrade();
}
| /**
* @dev signals that new upgrade is available, contract must be most recent
* upgrade and allowed to upgrade
* @param newContract Address of upgraded contract
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
475,
690
]
} | 958 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Upgradeable | contract Upgradeable is Ownable{
address public lastContract;
address public nextContract;
bool public isOldVersion;
bool public allowedToUpgrade;
/**
* @dev makes contract upgradeable
*/
function Upgradeable() public {
allowedToUpgrade = true;
}
/**
* @dev signals that n... | /**
* @title Upgradeable Conract
* @dev contract that implements doubly linked list to keep track of old and new
* versions of this contract
*/ | NatSpecMultiLine | confirmUpgrade | function confirmUpgrade() public {
require(lastContract == address(0));
lastContract = msg.sender;
}
| /**
* @dev confirmation that this is indeed the next version,
* called from previous version of contract. Anyone can call this function,
* which basically makes this instance unusable if that happens. Once called,
* this contract can not serve as upgrade to another contract. Not an ideal solution
* but will w... | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
1111,
1227
]
} | 959 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Validator | contract Validator is Ownable, EmergencySafe, Upgradeable{
mapping(address => bool) private valid_contracts;
string public whoAmI;
function Validator(string _whoAmI) public {
whoAmI = _whoAmI;
}
/**
* @dev adds validated contract
* @param addr Address of contract that's validated
*... | /**
* @title Validator Contract
* @dev validated that contract has been created through IXlegder
*/ | NatSpecMultiLine | add | function add(address addr) public ownerOnly {
valid_contracts[addr] = true;
}
| /**
* @dev adds validated contract
* @param addr Address of contract that's validated
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
323,
411
]
} | 960 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Validator | contract Validator is Ownable, EmergencySafe, Upgradeable{
mapping(address => bool) private valid_contracts;
string public whoAmI;
function Validator(string _whoAmI) public {
whoAmI = _whoAmI;
}
/**
* @dev adds validated contract
* @param addr Address of contract that's validated
*... | /**
* @title Validator Contract
* @dev validated that contract has been created through IXlegder
*/ | NatSpecMultiLine | remove | function remove(address addr) public ownerOnly {
valid_contracts[addr] = false;
}
| /**
* @dev removes validated contract
* @param addr Address of contract to be removed
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
519,
611
]
} | 961 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | Validator | contract Validator is Ownable, EmergencySafe, Upgradeable{
mapping(address => bool) private valid_contracts;
string public whoAmI;
function Validator(string _whoAmI) public {
whoAmI = _whoAmI;
}
/**
* @dev adds validated contract
* @param addr Address of contract that's validated
*... | /**
* @title Validator Contract
* @dev validated that contract has been created through IXlegder
*/ | NatSpecMultiLine | validate | function validate(address addr) public view returns (bool) {
return valid_contracts[addr];
}
| /**
* @dev checks whether contract is valid
* @param addr Address of contract to be ckecked
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
725,
828
]
} | 962 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | IXTPaymentContract | contract IXTPaymentContract is Ownable, EmergencySafe, Upgradeable{
event IXTPayment(address indexed from, address indexed to, uint value, string indexed action);
ERC20Interface public tokenContract;
mapping(string => uint) private actionPrices;
mapping(address => bool) private allowed;
/**
*... | /**
* @title IXT payment contract in charge of administaring IXT payments
* @dev contract looks up price for appropriate tasks and sends transferFrom() for user,
* user must approve this contract to spend IXT for them before being able to use it
*/ | NatSpecMultiLine | IXTPaymentContract | function IXTPaymentContract(address tokenAddress) public {
tokenContract = ERC20Interface(tokenAddress);
allowed[owner] = true;
}
| /**
* @dev sets up token address of IXT token
* adds owner to allowds, if owner is changed in the future, remember to remove old
* owner if desired
* @param tokenAddress IXT token address
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
690,
835
]
} | 963 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | IXTPaymentContract | contract IXTPaymentContract is Ownable, EmergencySafe, Upgradeable{
event IXTPayment(address indexed from, address indexed to, uint value, string indexed action);
ERC20Interface public tokenContract;
mapping(string => uint) private actionPrices;
mapping(address => bool) private allowed;
/**
*... | /**
* @title IXT payment contract in charge of administaring IXT payments
* @dev contract looks up price for appropriate tasks and sends transferFrom() for user,
* user must approve this contract to spend IXT for them before being able to use it
*/ | NatSpecMultiLine | transferIXT | function transferIXT(address from, address to, string action) public allowedOnly isNotPaused returns (bool) {
if (isOldVersion) {
IXTPaymentContract newContract = IXTPaymentContract(nextContract);
return newContract.transferIXT(from, to, action);
} else {
uint price = actionPrices[action];
i... | /**
* @dev transfers IXT
* @param from User address
* @param to Recipient
* @param action Service the user is paying for
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
987,
1522
]
} | 964 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | IXTPaymentContract | contract IXTPaymentContract is Ownable, EmergencySafe, Upgradeable{
event IXTPayment(address indexed from, address indexed to, uint value, string indexed action);
ERC20Interface public tokenContract;
mapping(string => uint) private actionPrices;
mapping(address => bool) private allowed;
/**
*... | /**
* @title IXT payment contract in charge of administaring IXT payments
* @dev contract looks up price for appropriate tasks and sends transferFrom() for user,
* user must approve this contract to spend IXT for them before being able to use it
*/ | NatSpecMultiLine | setTokenAddress | function setTokenAddress(address erc20Token) public ownerOnly isNotPaused {
tokenContract = ERC20Interface(erc20Token);
}
| /**
* @dev sets new token address in case of update
* @param erc20Token Token address
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
1629,
1761
]
} | 965 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | IXTPaymentContract | contract IXTPaymentContract is Ownable, EmergencySafe, Upgradeable{
event IXTPayment(address indexed from, address indexed to, uint value, string indexed action);
ERC20Interface public tokenContract;
mapping(string => uint) private actionPrices;
mapping(address => bool) private allowed;
/**
*... | /**
* @title IXT payment contract in charge of administaring IXT payments
* @dev contract looks up price for appropriate tasks and sends transferFrom() for user,
* user must approve this contract to spend IXT for them before being able to use it
*/ | NatSpecMultiLine | setAction | function setAction(string action, uint price) public ownerOnly isNotPaused {
actionPrices[action] = price;
}
| /**
* @dev creates/updates action
* @param action Action to be paid for
* @param price Price (in units * 10 ^ (<decimal places of token>))
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
1926,
2045
]
} | 966 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | IXTPaymentContract | contract IXTPaymentContract is Ownable, EmergencySafe, Upgradeable{
event IXTPayment(address indexed from, address indexed to, uint value, string indexed action);
ERC20Interface public tokenContract;
mapping(string => uint) private actionPrices;
mapping(address => bool) private allowed;
/**
*... | /**
* @title IXT payment contract in charge of administaring IXT payments
* @dev contract looks up price for appropriate tasks and sends transferFrom() for user,
* user must approve this contract to spend IXT for them before being able to use it
*/ | NatSpecMultiLine | getActionPrice | function getActionPrice(string action) public view returns (uint) {
return actionPrices[action];
}
| /**
* @dev retrieves price for action
* @param action Name of action, e.g. 'create_insurance_contract'
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
2169,
2278
]
} | 967 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | IXTPaymentContract | contract IXTPaymentContract is Ownable, EmergencySafe, Upgradeable{
event IXTPayment(address indexed from, address indexed to, uint value, string indexed action);
ERC20Interface public tokenContract;
mapping(string => uint) private actionPrices;
mapping(address => bool) private allowed;
/**
*... | /**
* @title IXT payment contract in charge of administaring IXT payments
* @dev contract looks up price for appropriate tasks and sends transferFrom() for user,
* user must approve this contract to spend IXT for them before being able to use it
*/ | NatSpecMultiLine | setAllowed | function setAllowed(address allowedAddress) public ownerOnly {
allowed[allowedAddress] = true;
}
| /**
* @dev add account to allow calling of transferIXT
* @param allowedAddress Address of account
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
2400,
2507
]
} | 968 | |
Validator | Validator.sol | 0x13c0ee1398de55b575651a44000274dab1b9850e | Solidity | IXTPaymentContract | contract IXTPaymentContract is Ownable, EmergencySafe, Upgradeable{
event IXTPayment(address indexed from, address indexed to, uint value, string indexed action);
ERC20Interface public tokenContract;
mapping(string => uint) private actionPrices;
mapping(address => bool) private allowed;
/**
*... | /**
* @title IXT payment contract in charge of administaring IXT payments
* @dev contract looks up price for appropriate tasks and sends transferFrom() for user,
* user must approve this contract to spend IXT for them before being able to use it
*/ | NatSpecMultiLine | removeAllowed | function removeAllowed(address allowedAddress) public ownerOnly {
allowed[allowedAddress] = false;
}
| /**
* @dev remove account from allowed accounts
* @param allowedAddress Address of account
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://255840ffb317b7740638674fe60b119af3cd3c576b9775d8a4e69bcbbf78f9d5 | {
"func_code_index": [
2620,
2731
]
} | 969 | |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
922,
1027
]
} | 970 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner)
public
override
view
returns (uint256 balance)
{
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
1247,
1425
]
} | 971 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint256 tokens)
public
override
returns (bool success)
{
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
1769,
2095
]
} | 972 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint256 tokens)
public
override
returns (bool success)
{
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
2604,
2861
]
} | 973 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(
address from,
address to,
uint256 tokens
) public override returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Tran... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer... | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
3397,
3806
]
} | 974 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender)
public
override
view
returns (uint256 remaining)
{
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
4087,
4292
]
} | 975 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(
address spender,
uint256 tokens,
bytes memory data
) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(
msg.sender,
tokens,
... | // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------... | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
4653,
5088
]
} | 976 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | // ------------------------------------------------------------------------
// handles contributions
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
5283,
5633
]
} | 977 | ||
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | startCrowdsale | function startCrowdsale() public onlyOwner {
startDate = block.timestamp;
endDate = block.timestamp + 6 weeks;
}
| // ------------------------------------------------------------------------
// Owner only start Crowdsale
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
5833,
5973
]
} | 978 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | getAirdropTokens | function getAirdropTokens() public onlyOwner {
require(block.timestamp >= startDate && block.timestamp <= endDate);
require(!airdropTokensWithdrawn);
uint256 tokens = 5000000000000000000000;
balances[owner] = safeAdd(balances[owner], tokens);
_totalSupply = safeAdd(_totalSupply, tokens);
e... | // ------------------------------------------------------------------------
// Send tokens to owner for airdrop
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
6179,
6615
]
} | 979 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | withDrawETH | function withDrawETH(uint256 amount) public onlyOwner tokensaleEnded {
owner.transfer(amount);
}
| // ------------------------------------------------------------------------
// Owner only withdraw ETH
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
6812,
6927
]
} | 980 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | withDrawETHToAddress | function withDrawETHToAddress(address payable destinationAddress, uint256 amount) public onlyOwner tokensaleEnded {
destinationAddress.transfer(amount);
}
| // ------------------------------------------------------------------------
// Owner only withdraw ETH to address
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
7135,
7308
]
} | 981 |
liquidbotToken | liquidbotToken.sol | 0x525bac39eb5dbaae3e46e1232f41b9f52a36dec8 | Solidity | liquidbotToken | contract liquidbotToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
uint256 public startDate;
uint256 public endDate;
bool public airdropTokensWithdrawn = false;
mapping(address => uint256) b... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint256 tokens)
public
onlyOwner
returns (bool success)
{
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.7.2+commit.51b20bc0 | None | ipfs://8107a0e7799d6238ef5a621de456cbaf5c962ce1fd649ef23131ecb3ea4e8748 | {
"func_code_index": [
7539,
7763
]
} | 982 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes calldata _data
)
external
override
{
_safeTransferFrom(_from, _to, _tokenId, _data);
}
| /**
* @dev Transfers the ownership of an NFT from one address to another address. This function can
* be changed to payable.
* @notice Throws unless `msg.sender` is the current owner, an authorized operator, or the
* approved address for this NFT. Throws if `_from` is not the current owner. Throws if `_to` is
... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
5287,
5499
]
} | 983 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId
)
external
override
{
_safeTransferFrom(_from, _to, _tokenId, "");
}
| /**
* @dev Transfers the ownership of an NFT from one address to another address. This function can
* be changed to payable.
* @notice This works identically to the other function with an extra data parameter, except this
* function just sets data to ""
* @param _from The current owner of the NFT.
* @param ... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
5906,
6088
]
} | 984 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _tokenId
)
external
override
canTransfer(_tokenId)
validNFToken(_tokenId)
{
address tokenOwner = idToOwner[_tokenId];
require(tokenOwner == _from, NOT_OWNER);
require(_to != address(0), ZERO_ADDRESS);
_transfer(_to, _tokenId... | /**
* @dev Throws unless `msg.sender` is the current owner, an authorized operator, or the approved
* address for this NFT. Throws if `_from` is not the current owner. Throws if `_to` is the zero
* address. Throws if `_tokenId` is not a valid NFT. This function can be changed to payable.
* @notice The caller is... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
6663,
7019
]
} | 985 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | approve | function approve(
address _approved,
uint256 _tokenId
)
external
override
canOperate(_tokenId)
validNFToken(_tokenId)
{
address tokenOwner = idToOwner[_tokenId];
require(_approved != tokenOwner, IS_OWNER);
idToApproval[_tokenId] = _approved;
emit Approval(tokenOwner, _approved, _tokenI... | /**
* @dev Set or reaffirm the approved address for an NFT. This function can be changed to payable.
* @notice The zero address indicates there is no approved address. Throws unless `msg.sender` is
* the current NFT owner, or an authorized operator of the current owner.
* @param _approved Address to be approved... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
7437,
7792
]
} | 986 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(
address _operator,
bool _approved
)
external
override
{
ownerToOperators[msg.sender][_operator] = _approved;
emit ApprovalForAll(msg.sender, _operator, _approved);
}
| /**
* @dev Enables or disables approval for a third party ("operator") to manage all of
* `msg.sender`'s assets. It also emits the ApprovalForAll event.
* @notice This works even if sender doesn't own any tokens at the time.
* @param _operator Address to add to the set of authorized operators.
* @param _appro... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
8200,
8435
]
} | 987 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(
address _owner
)
external
override
view
returns (uint256)
{
require(_owner != address(0), ZERO_ADDRESS);
return _getOwnerNFTCount(_owner);
}
| /**
* @dev Returns the number of NFTs owned by `_owner`. NFTs assigned to the zero address are
* considered invalid, and this function throws for queries about the zero address.
* @param _owner Address for whom to query the balance.
* @return Balance of _owner.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
8726,
8933
]
} | 988 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(
uint256 _tokenId
)
external
override
view
returns (address _owner)
{
_owner = idToOwner[_tokenId];
require(_owner != address(0), NOT_VALID_NFT);
}
| /**
* @dev Returns the address of the owner of the NFT. NFTs assigned to zero address are considered
* invalid, and queries about them do throw.
* @param _tokenId The identifier for an NFT.
* @return _owner Address of _tokenId owner.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
9196,
9407
]
} | 989 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | getApproved | function getApproved(
uint256 _tokenId
)
external
override
view
validNFToken(_tokenId)
returns (address)
{
return idToApproval[_tokenId];
}
| /**
* @dev Get the approved address for a single NFT.
* @notice Throws if `_tokenId` is not a valid NFT.
* @param _tokenId ID of the NFT to query the approval of.
* @return Address that _tokenId is approved for.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
9648,
9834
]
} | 990 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(
address _owner,
address _operator
)
external
override
view
returns (bool)
{
return ownerToOperators[_owner][_operator];
}
| /**
* @dev Checks if `_operator` is an approved operator for `_owner`.
* @param _owner The address that owns the NFTs.
* @param _operator The address that acts on behalf of the owner.
* @return True if approved for all, false otherwise.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
10100,
10295
]
} | 991 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _transfer | function _transfer(
address _to,
uint256 _tokenId
)
internal
{
address from = idToOwner[_tokenId];
_clearApproval(_tokenId);
_removeNFToken(from, _tokenId);
_addNFToken(_to, _tokenId);
emit Transfer(from, _to, _tokenId);
}
| /**
* @dev Actually preforms the transfer.
* @notice Does NO checks.
* @param _to Address of a new owner.
* @param _tokenId The NFT that is being transferred.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
10483,
10761
]
} | 992 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _mint | function _mint(
address _to,
uint256 _tokenId
)
internal
virtual
{
require(_to != address(0), ZERO_ADDRESS);
require(idToOwner[_tokenId] == address(0), NFT_ALREADY_EXISTS);
_addNFToken(_to, _tokenId);
emit Transfer(address(0), _to, _tokenId);
}
| /**
* @dev Mints a new NFT.
* @notice This is an internal function which should be called from user-implemented external
* mint function. Its purpose is to show and properly initialize data structures when using this
* implementation.
* @param _to The address that will own the minted NFT.
* @param _tokenId ... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
11149,
11449
]
} | 993 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _burn | function _burn(
uint256 _tokenId
)
internal
virtual
validNFToken(_tokenId)
{
address tokenOwner = idToOwner[_tokenId];
_clearApproval(_tokenId);
_removeNFToken(tokenOwner, _tokenId);
emit Transfer(tokenOwner, address(0), _tokenId);
}
| /**
* @dev Burns a NFT.
* @notice This is an internal function which should be called from user-implemented external burn
* function. Its purpose is to show and properly initialize data structures when using this
* implementation. Also, note that this burn implementation allows the minter to re-mint a burned
... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
11849,
12134
]
} | 994 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _removeNFToken | function _removeNFToken(
address _from,
uint256 _tokenId
)
internal
virtual
{
require(idToOwner[_tokenId] == _from, NOT_OWNER);
ownerToNFTokenCount[_from] = ownerToNFTokenCount[_from] - 1;
delete idToOwner[_tokenId];
}
| /**
* @dev Removes a NFT from owner.
* @notice Use and override this function with caution. Wrong usage can have serious consequences.
* @param _from Address from wich we want to remove the NFT.
* @param _tokenId Which NFT we want to remove.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
12405,
12670
]
} | 995 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _addNFToken | function _addNFToken(
address _to,
uint256 _tokenId
)
internal
virtual
{
require(idToOwner[_tokenId] == address(0), NFT_ALREADY_EXISTS);
idToOwner[_tokenId] = _to;
ownerToNFTokenCount[_to] = ownerToNFTokenCount[_to].add(1);
}
| /**
* @dev Assignes a new NFT to owner.
* @notice Use and override this function with caution. Wrong usage can have serious consequences.
* @param _to Address to wich we want to add the NFT.
* @param _tokenId Which NFT we want to add.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
12934,
13208
]
} | 996 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _getOwnerNFTCount | function _getOwnerNFTCount(
address _owner
)
internal
virtual
view
returns (uint256)
{
return ownerToNFTokenCount[_owner];
}
| /**
* @dev Helper function that gets NFT count of owner. This is needed for overriding in enumerable
* extension to remove double storage (gas optimization) of owner nft count.
* @param _owner Address for whom to query the count.
* @return Number of _owner NFTs.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
13500,
13666
]
} | 997 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _safeTransferFrom | function _safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes memory _data
)
private
canTransfer(_tokenId)
validNFToken(_tokenId)
{
address tokenOwner = idToOwner[_tokenId];
require(tokenOwner == _from, NOT_OWNER);
require(_to != address(0), ZERO_ADDRESS);
_transfe... | /**
* @dev Actually perform the safeTransferFrom.
* @param _from The current owner of the NFT.
* @param _to The new owner.
* @param _tokenId The NFT to transfer.
* @param _data Additional data with no specified format, sent in call to `_to`.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
13941,
14534
]
} | 998 |
EmblemVault | browser/github/0xcert/ethereum-erc721/src/contracts/tokens/nf-token.sol | 0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab | Solidity | NFToken | contract NFToken is
ERC721,
SupportsInterface
{
using SafeMath for uint256;
using AddressUtils for address;
/**
* List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _clearApproval | function _clearApproval(
uint256 _tokenId
)
private
{
if (idToApproval[_tokenId] != address(0))
{
delete idToApproval[_tokenId];
}
}
| /**
* @dev Clears the current approval of a given NFT ID.
* @param _tokenId ID of the NFT to be transferred.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://6626fd920334c84d658057cbe16dd3b47b41fc7475707238fefa241a53c0a511 | {
"func_code_index": [
14664,
14840
]
} | 999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.