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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _isApprovedOrOwner | function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
| /**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
10221,
10559
]
} | 27,600 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
d*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
10897,
11012
]
} | 27,601 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
_mint(to, tokenId);
require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
11234,
11489
]
} | 27,602 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_holderTokens[to].add(tokenId);
_tokenOwners.set(tokenId... | /**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
11820,
12229
]
} | 27,603 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
// Clear metadata (if any)
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
12453,
12978
]
} | 27,604 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _transfer | function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
13310,
13889
]
} | 27,605 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _setTokenURI | function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
| /**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
14040,
14260
]
} | 27,606 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _setBaseURI | function _setBaseURI(string memory baseURI_) internal virtual {
_baseURI = baseURI_;
}
| /**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
14485,
14590
]
} | 27,607 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
private returns (bool)
{
if (!to.isContract()) {
return true;
}
bytes memory returndata = to.functionCall(abi.encodeWithSelector(
IERC721Receiver(to).onERC721Received.selector,
... | /**
* @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 to... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
15150,
15759
]
} | 27,608 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
16533,
16631
]
} | 27,609 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721Namable | contract ERC721Namable is ERC721 {
uint256 public nameChangePrice = 300 ether;
uint256 constant public BIO_CHANGE_PRICE = 100 ether;
mapping(uint256 => string) public bio;
// Mapping from token ID to name
mapping (uint256 => string) private _tokenName;
// Mapping if certain name string has already b... | toggleReserveName | function toggleReserveName(string memory str, bool isReserve) internal {
_nameReserved[toLower(str)] = isReserve;
}
| /**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
1876,
1998
]
} | 27,610 | ||
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721Namable | contract ERC721Namable is ERC721 {
uint256 public nameChangePrice = 300 ether;
uint256 constant public BIO_CHANGE_PRICE = 100 ether;
mapping(uint256 => string) public bio;
// Mapping from token ID to name
mapping (uint256 => string) private _tokenName;
// Mapping if certain name string has already b... | tokenNameByIndex | function tokenNameByIndex(uint256 index) public view returns (string memory) {
return _tokenName[index];
}
| /**
* @dev Returns name of the NFT at index.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
2057,
2170
]
} | 27,611 | ||
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721Namable | contract ERC721Namable is ERC721 {
uint256 public nameChangePrice = 300 ether;
uint256 constant public BIO_CHANGE_PRICE = 100 ether;
mapping(uint256 => string) public bio;
// Mapping from token ID to name
mapping (uint256 => string) private _tokenName;
// Mapping if certain name string has already b... | isNameReserved | function isNameReserved(string memory nameString) public view returns (bool) {
return _nameReserved[toLower(nameString)];
}
| /**
* @dev Returns if the name has been reserved.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
2234,
2364
]
} | 27,612 | ||
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC721Namable | contract ERC721Namable is ERC721 {
uint256 public nameChangePrice = 300 ether;
uint256 constant public BIO_CHANGE_PRICE = 100 ether;
mapping(uint256 => string) public bio;
// Mapping from token ID to name
mapping (uint256 => string) private _tokenName;
// Mapping if certain name string has already b... | toLower | function toLower(string memory str) public pure returns (string memory){
bytes memory bStr = bytes(str);
bytes memory bLower = new bytes(bStr.length);
for (uint i = 0; i < bStr.length; i++) {
// Uppercase character
if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) {
bLower[i] = bytes1(uint8(bStr[i])... | /**
* @dev Converts the string to lowercase
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
3184,
3599
]
} | 27,613 | ||
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
94,
154
]
} | 27,614 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
237,
310
]
} | 27,615 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
534,
616
]
} | 27,616 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
895,
983
]
} | 27,617 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
1647,
1726
]
} | 27,618 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
2039,
2141
]
} | 27,619 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
902,
990
]
} | 27,620 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
1104,
1196
]
} | 27,621 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
1829,
1917
]
} | 27,622 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
1977,
2082
]
} | 27,623 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
2140,
2264
]
} | 27,624 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
2472,
2652
]
} | 27,625 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
2710,
2866
]
} | 27,626 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
3008,
3182
]
} | 27,627 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
3651,
3977
]
} | 27,628 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
4381,
4604
]
} | 27,629 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
5102,
5376
]
} | 27,630 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
5861,
6405
]
} | 27,631 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
6681,
7064
]
} | 27,632 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
7391,
7814
]
} | 27,633 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
8247,
8598
]
} | 27,634 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
8925,
9020
]
} | 27,635 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
9618,
9715
]
} | 27,636 |
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | YieldToken | contract YieldToken is ERC20("Banana", "BANANA") {
using SafeMath for uint256;
uint256 constant public BASE_RATE = 10 ether;
uint256 constant public INITIAL_ISSUANCE = 300 ether;
// Tue Mar 18 2031 17:46:47 GMT+0000
uint256 constant public END = 1931622407;
mapping(address => uint256) public rewards;
... | updateRewardOnMint | function updateRewardOnMint(address _user, uint256 _amount) external {
require(msg.sender == address(kongzContract), "Can't call this");
uint256 time = min(block.timestamp, END);
uint256 timerUser = lastUpdate[_user];
if (timerUser > 0)
rewards[_user] = rewards[_user].add(kongzContract.balanceOG(_user).mul(B... | // called when minting many NFTs
// updated_amount = (balanceOG(user) * base_rate * delta / 86400) + amount * initial rate | LineComment | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
775,
1306
]
} | 27,637 | ||
Kongz | Kongz.sol | 0x57a204aa1042f6e66dd7730813f4024114d74f37 | Solidity | YieldToken | contract YieldToken is ERC20("Banana", "BANANA") {
using SafeMath for uint256;
uint256 constant public BASE_RATE = 10 ether;
uint256 constant public INITIAL_ISSUANCE = 300 ether;
// Tue Mar 18 2031 17:46:47 GMT+0000
uint256 constant public END = 1931622407;
mapping(address => uint256) public rewards;
... | updateReward | function updateReward(address _from, address _to, uint256 _tokenId) external {
require(msg.sender == address(kongzContract));
if (_tokenId < 1001) {
uint256 time = min(block.timestamp, END);
uint256 timerFrom = lastUpdate[_from];
if (timerFrom > 0)
rewards[_from] += kongzContract.balanceOG(_from).mul(B... | // called on transfers | LineComment | v0.6.12+commit.27d51765 | None | ipfs://c7cc63415295daffb0765b719570ed69f6323e1591c492449e5154078be944ce | {
"func_code_index": [
1334,
2031
]
} | 27,638 | ||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | /**
* @dev The contract should be able to receive Eth.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
709,
750
]
} | 27,639 | ||||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | beneficiary | function beneficiary() public view virtual returns (address) {
return _beneficiary;
}
| /**
* @dev Getter for the beneficiary address.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
816,
917
]
} | 27,640 | ||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | start | function start() public view virtual returns (uint256) {
return _start;
}
| /**
* @dev Getter for the start timestamp.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
979,
1068
]
} | 27,641 | ||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | duration | function duration() public view virtual returns (uint256) {
return DURATION;
}
| /**
* @dev Getter for the vesting duration.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1131,
1225
]
} | 27,642 | ||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | released | function released(address token) public view virtual returns (uint256) {
return _erc20Released[token];
}
| /**
* @dev Amount of token already released
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1288,
1408
]
} | 27,643 | ||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | release | function release(address token) public virtual {
uint256 releasable = vestedAmount(token, uint64(block.timestamp)) - released(token);
_erc20Released[token] += releasable;
emit ERC20Released(token, releasable);
SafeERC20.safeTransfer(IERC20(token), beneficiary(), releasable);
}
| /**
* @dev Release the tokens that have already vested.
*
* Emits a {TokensReleased} event.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1529,
1846
]
} | 27,644 | ||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | vestedAmount | function vestedAmount(address token, uint64 timestamp) public view virtual returns (uint256) {
return _vestingSchedule(IERC20(token).balanceOf(address(this)) + released(token), timestamp);
}
| /**
* @dev Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1984,
2190
]
} | 27,645 | ||
VestingWallet | /contracts/VestingWallet.sol | 0x2446bf47798538a1606e7808106e4c3765494590 | Solidity | VestingWallet | contract VestingWallet is Context {
event ERC20Released(address indexed token, uint256 amount);
mapping(address => uint256) private _erc20Released;
address private immutable _beneficiary;
uint64 private immutable _start;
uint64 private constant DURATION = 365 days;
/**
* @dev Set the... | /**
* @title VestingWallet
* @notice Contract modified to claim reflections reflected on this contract and send the reflected value to beneficiary
* not handling vesting ETH model, just ERC20
* @dev This contract handles the vesting of ERC20 tokens for a given beneficiary. Custody of multiple tokens
* can be give... | NatSpecMultiLine | _vestingSchedule | function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) {
if (timestamp < start()) {
return 0;
} else if (timestamp > start() + duration()) {
return totalAllocation;
} else {
return (totalAllocation * (timestamp - start())) / durat... | /**
* @dev Virtual implementation of the vesting formula. This returns the amout vested, as a function of time, for
* an asset given its total historical allocation.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2380,
2750
]
} | 27,646 | ||
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view returns (uint) {
return _totalSupply.sub(balances[address(0)]);
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
994,
1113
]
} | 27,647 | |
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
1335,
1460
]
} | 27,648 | |
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(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.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
1806,
2078
]
} | 27,649 | |
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
2589,
2802
]
} | 27,650 | |
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(from, to, tokens);
return true;
}
... | // ------------------------------------------------------------------------
// 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.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
3340,
3688
]
} | 27,651 | |
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
3971,
4123
]
} | 27,652 | |
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint 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, address(this), data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------... | LineComment | v0.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
4486,
4824
]
} | 27,653 | |
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | function () external payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
5016,
5077
]
} | 27,654 | ||
Cyiber | Cyiber.sol | 0xfa90d6a9a8b7fcdcbbb06e441c0ecaa57f55b11e | Solidity | Cyiber | contract Cyiber is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.5.1+commit.c8a2cb62 | bzzr://9742aded875356b3273d198e12683fb956f665f86dd3c75001a47762f81d7240 | {
"func_code_index": [
5310,
5499
]
} | 27,655 | |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
642,
823
]
} | 27,656 |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public override returns (bool trans1) {
require(_to != address(0));
//require(canTransfer(msg.sender));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
324,
737
]
} | 27,657 |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view override returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
870,
991
]
} | 27,658 |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) {
require(_to != address(0));
// require(canTransfer(msg.sender));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this cond... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
1339,
1949
]
} | 27,659 |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public override returns (bool hello) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
2581,
2791
]
} | 27,660 |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view override returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
3031,
3182
]
} | 27,661 |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | StandardToken | contract StandardToken is ERC20Basic, Ownable {
uint256 public totalSupply;
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
3427,
3705
]
} | 27,662 |
SERV | SERV.sol | 0x20dbe92bf161434911d19167b924770c8971244e | Solidity | BurnableToken | contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value > 0);
require(_valu... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
require(_value > 0);
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c1b4faf9850dffdd50c5e27c2f4576825c883e8110c8a6cee965d242db4c4790 | {
"func_code_index": [
225,
770
]
} | 27,663 |
SimpleToken | SimpleToken.sol | 0xcd1e4ea603eacb15930abd28e2cc1020636bf3f1 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
modifier onlyPayloadSize(uint size) {
if(msg.data.length < size + 4) {
throw;
}
_;
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer... | transfer | function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://d97d870c836b8b63ec18c59b7030d94732cf4cfd197f1da825af1de32cf73d7a | {
"func_code_index": [
381,
608
]
} | 27,664 | |||
SimpleToken | SimpleToken.sol | 0xcd1e4ea603eacb15930abd28e2cc1020636bf3f1 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
modifier onlyPayloadSize(uint size) {
if(msg.data.length < size + 4) {
throw;
}
_;
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer... | balanceOf | function balanceOf(address _owner) constant returns (uint balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://d97d870c836b8b63ec18c59b7030d94732cf4cfd197f1da825af1de32cf73d7a | {
"func_code_index": [
812,
918
]
} | 27,665 | |||
SimpleToken | SimpleToken.sol | 0xcd1e4ea603eacb15930abd28e2cc1020636bf3f1 | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* ... | transferFrom | function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) {
var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// if (_value > _allowance) throw;
balances[_to] = balances[_to].ad... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint the amout of tokens to be transfered
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://d97d870c836b8b63ec18c59b7030d94732cf4cfd197f1da825af1de32cf73d7a | {
"func_code_index": [
384,
875
]
} | 27,666 | |||
SimpleToken | SimpleToken.sol | 0xcd1e4ea603eacb15930abd28e2cc1020636bf3f1 | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* ... | approve | function approve(address _spender, uint _value) {
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs/issues/20#issueco... | /**
* @dev Aprove the passed address to spend the specified amount of tokens on beahlf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://d97d870c836b8b63ec18c59b7030d94732cf4cfd197f1da825af1de32cf73d7a | {
"func_code_index": [
1110,
1624
]
} | 27,667 | |||
SimpleToken | SimpleToken.sol | 0xcd1e4ea603eacb15930abd28e2cc1020636bf3f1 | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* ... | allowance | function allowance(address _owner, address _spender) constant returns (uint remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens than an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint specifing the amount of tokens still avaible for the spender.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://d97d870c836b8b63ec18c59b7030d94732cf4cfd197f1da825af1de32cf73d7a | {
"func_code_index": [
1942,
2077
]
} | 27,668 | |||
ENSToken | contracts/MerkleProof.sol | 0xc18360217d8f7ab5e7c516566761ea12ce7f9d72 | Solidity | MerkleProof | library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are ... | /**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography... | NatSpecMultiLine | verify | function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool, uint256) {
bytes32 computedHash = leaf;
uint256 index = 0;
for (uint256 i = 0; i < proof.length; i++) {
index *= 2;
bytes32 proofElement = proof[i];
if (computedHash <= pr... | /**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | {
"func_code_index": [
350,
1260
]
} | 27,669 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | StandardToken | contract StandardToken is ERC20, SafeMath {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
/* Actual balances of token holders */
mapping(address => uint) balances;
/* approve() allowances */
mapping (address => mapping (addres... | /**
* Standard ERC20 token with Short Hand Attack and approve() race condition mitigation.
*
* Based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | addApproval | function addApproval(address _spender, uint _addedValue)
onlyPayloadSize(2 * 32)
returns (bool success) {
uint oldValue = allowed[msg.sender][_spender];
allowed[msg.sender][_spender] = safeAdd(oldValue, _addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* Atomic increment of approved spending
*
* Works around https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
2375,
2709
]
} | 27,670 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | StandardToken | contract StandardToken is ERC20, SafeMath {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
/* Actual balances of token holders */
mapping(address => uint) balances;
/* approve() allowances */
mapping (address => mapping (addres... | /**
* Standard ERC20 token with Short Hand Attack and approve() race condition mitigation.
*
* Based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | subApproval | function subApproval(address _spender, uint _subtractedValue)
onlyPayloadSize(2 * 32)
returns (bool success) {
uint oldVal = allowed[msg.sender][_spender];
if (_subtractedValue > oldVal) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = safeSub(oldVal, ... | /**
* Atomic decrement of approved spending.
*
* Works around https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
2862,
3321
]
} | 27,671 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | BurnableToken | contract BurnableToken is StandardToken {
address public constant BURN_ADDRESS = 0;
/** How many tokens we burned */
event Burned(address burner, uint burnedAmount);
/**
* Burn extra tokens from a balance.
*
*/
function burn(uint burnAmount) {
address burner = msg.sender;
bala... | burn | function burn(uint burnAmount) {
address burner = msg.sender;
balances[burner] = safeSub(balances[burner], burnAmount);
totalSupply = safeSub(totalSupply, burnAmount);
Burned(burner, burnAmount);
}
| /**
* Burn extra tokens from a balance.
*
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
242,
465
]
} | 27,672 | |||
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | UpgradeAgent | contract UpgradeAgent {
uint public originalSupply;
/** Interface marker */
function isUpgradeAgent() public constant returns (bool) {
return true;
}
function upgradeFrom(address _from, uint256 _value) public;
} | /**
* Upgrade agent interface inspired by Lunyr.
*
* Upgrade agent transfers tokens to a new contract.
* Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.
*/ | NatSpecMultiLine | isUpgradeAgent | function isUpgradeAgent() public constant returns (bool) {
return true;
}
| /** Interface marker */ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
87,
171
]
} | 27,673 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
* First envisioned by Golem and Lunyr projects.
*/ | NatSpecMultiLine | UpgradeableToken | function UpgradeableToken(address _upgradeMaster) {
upgradeMaster = _upgradeMaster;
}
| /**
* Do not allow construction without upgrade master set.
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
1209,
1305
]
} | 27,674 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
* First envisioned by Golem and Lunyr projects.
*/ | NatSpecMultiLine | upgrade | function upgrade(uint256 value) public {
UpgradeState state = getUpgradeState();
if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {
// Called in a bad state
throw;
}
// Validate input value.
if (value == 0) throw;
balances[msg.sender] = saf... | /**
* Allow the token holder to upgrade some of their tokens to a new contract.
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
1402,
2076
]
} | 27,675 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
* First envisioned by Golem and Lunyr projects.
*/ | NatSpecMultiLine | setUpgradeAgent | function setUpgradeAgent(address agent) external {
if(!canUpgrade()) {
// The token is not yet in a state that we could think upgrading
throw;
}
if (agent == 0x0) throw;
// Only a master can designate the next agent
if (msg.sender != upgradeMaster) throw;
// Upgrade has a... | /**
* Set an upgrade agent that handles
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
2133,
2856
]
} | 27,676 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
* First envisioned by Golem and Lunyr projects.
*/ | NatSpecMultiLine | getUpgradeState | function getUpgradeState() public constant returns(UpgradeState) {
if(!canUpgrade()) return UpgradeState.NotAllowed;
else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;
else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;
else return UpgradeState.Upgrading;
}
| /**
* Get the state of the token upgrade.
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
2915,
3235
]
} | 27,677 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
* First envisioned by Golem and Lunyr projects.
*/ | NatSpecMultiLine | setUpgradeMaster | function setUpgradeMaster(address master) public {
if (master == 0x0) throw;
if (msg.sender != upgradeMaster) throw;
upgradeMaster = master;
}
| /**
* Change the upgrade master.
*
* This allows us to set a new owner for the upgrade mechanism.
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
3358,
3527
]
} | 27,678 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
* First envisioned by Golem and Lunyr projects.
*/ | NatSpecMultiLine | canUpgrade | function canUpgrade() public constant returns(bool) {
return true;
}
| /**
* Child contract can enable to provide the condition when the upgrade can begun.
*/ | NatSpecMultiLine | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
3629,
3709
]
} | 27,679 | |
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | TradeToken | contract TradeToken is BurnableToken, UpgradeableToken {
string public name;
string public symbol;
uint public decimals;
address public owner;
mapping(address => uint) previligedBalances;
function TradeToken(address _owner, string _name, string _symbol, uint _totalSupply, uint _decimals) Upgrad... | transferPrivileged | function transferPrivileged(address _to, uint _value) onlyPayloadSize(2 * 32) returns (bool success) {
if (msg.sender != owner) throw;
balances[msg.sender] = safeSub(balances[msg.sender], _value);
balances[_to] = safeAdd(balances[_to], _value);
previligedBalances[_to] = safeAdd(previligedBalances[_to], _val... | // privileged transfer | LineComment | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
609,
1007
]
} | 27,680 | |||
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | TradeToken | contract TradeToken is BurnableToken, UpgradeableToken {
string public name;
string public symbol;
uint public decimals;
address public owner;
mapping(address => uint) previligedBalances;
function TradeToken(address _owner, string _name, string _symbol, uint _totalSupply, uint _decimals) Upgrad... | getPrivilegedBalance | function getPrivilegedBalance(address _owner) constant returns (uint balance) {
return previligedBalances[_owner];
}
| // get priveleged balance | LineComment | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
1039,
1166
]
} | 27,681 | |||
TradeToken | TradeToken.sol | 0xa9001a1628e20586208a1fdb70c741296dc623c9 | Solidity | TradeToken | contract TradeToken is BurnableToken, UpgradeableToken {
string public name;
string public symbol;
uint public decimals;
address public owner;
mapping(address => uint) previligedBalances;
function TradeToken(address _owner, string _name, string _symbol, uint _totalSupply, uint _decimals) Upgrad... | transferFromPrivileged | function transferFromPrivileged(address _from, address _to, uint _value) returns (bool success) {
if (msg.sender != owner) throw;
uint availablePrevilegedBalance = previligedBalances[_from];
balances[_from] = safeSub(balances[_from], _value);
balances[_to] = safeAdd(balances[_to], _value);
previliged... | // admin only can transfer from the privileged accounts | LineComment | v0.4.12+commit.194ff033 | bzzr://99f5f2fb412a1cedf1a2891aa100b73bf91ac25c3403ec3f50e43a3e6f9dc2dd | {
"func_code_index": [
1228,
1681
]
} | 27,682 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, t... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
105,
259
]
} | 27,683 | |
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, t... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
359,
636
]
} | 27,684 | |
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, t... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
768,
888
]
} | 27,685 | |
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, t... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
968,
1120
]
} | 27,686 | |
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | _transfer | function _transfer(address _from, address _to, uint256 _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
1347,
2360
]
} | 27,687 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
2566,
2678
]
} | 27,688 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
2953,
3255
]
} | 27,689 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
3519,
3695
]
} | 27,690 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
4089,
4441
]
} | 27,691 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | freezeAccount | function freezeAccount(address target, bool freeze) onlyOwner public {
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
}
| /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
4622,
4788
]
} | 27,692 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | mintToken | function mintToken(address target, uint256 mintedAmount) onlyOwner public {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
emit Transfer(this, target, mintedAmount);
}
| /// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
4984,
5205
]
} | 27,693 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender,... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
5374,
5753
]
} | 27,694 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
6011,
6627
]
} | 27,695 | |||
ERC20 | ERC20.sol | 0xbe0bcea181b0f7693aaeb4ab6430c177e7b8cc3b | Solidity | ERC20 | contract ERC20 is owned {
// Public variables of the token
string public name = "WorkCoin Token";
string public symbol = "WRC";
uint8 public decimals = 18;
uint256 public totalSupply = 2000000000 * 10 ** uint256(decimals);
/// contract that is allowed to create new tokens and allows unli... | setICO_Contract | function setICO_Contract(address _ICO_Contract) onlyOwner public {
ICO_Contract = _ICO_Contract;
}
| /// @dev Set the ICO_Contract.
/// @param _ICO_Contract crowdsale contract address | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bd5f445bb45eb7244ef5146c053172f1a95b71c82b5b2c43f7be2845393814 | {
"func_code_index": [
6727,
6844
]
} | 27,696 | |||
CryptoEngineer | CryptoEngineer.sol | 0xb2d6000d4a7fe8b1358d54a9bc21f2badf91d849 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/ | Comment | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://777a9ddd60feb32fdcda5527703325f6d4fe4ca85817fd7c2a7f92eb4e1f4fdc | {
"func_code_index": [
95,
308
]
} | 27,697 | |
CryptoEngineer | CryptoEngineer.sol | 0xb2d6000d4a7fe8b1358d54a9bc21f2badf91d849 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/ | Comment | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://777a9ddd60feb32fdcda5527703325f6d4fe4ca85817fd7c2a7f92eb4e1f4fdc | {
"func_code_index": [
398,
691
]
} | 27,698 | |
CryptoEngineer | CryptoEngineer.sol | 0xb2d6000d4a7fe8b1358d54a9bc21f2badf91d849 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/ | Comment | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://777a9ddd60feb32fdcda5527703325f6d4fe4ca85817fd7c2a7f92eb4e1f4fdc | {
"func_code_index": [
812,
940
]
} | 27,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.