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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ApePunks | @openzeppelin/contracts/access/Ownable.sol | 0x5fe496311c4d128c1f2e13b49d3a3b8e9bc8f444 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender =... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://715de06efa33ddc78436274df9726bd55cc0f6a44828478a5de22482c3416c6a | {
"func_code_index": [
506,
598
]
} | 21,500 |
ApePunks | @openzeppelin/contracts/access/Ownable.sol | 0x5fe496311c4d128c1f2e13b49d3a3b8e9bc8f444 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender =... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://715de06efa33ddc78436274df9726bd55cc0f6a44828478a5de22482c3416c6a | {
"func_code_index": [
1157,
1310
]
} | 21,501 |
ApePunks | @openzeppelin/contracts/access/Ownable.sol | 0x5fe496311c4d128c1f2e13b49d3a3b8e9bc8f444 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender =... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://715de06efa33ddc78436274df9726bd55cc0f6a44828478a5de22482c3416c6a | {
"func_code_index": [
1460,
1709
]
} | 21,502 |
ApePunks | @openzeppelin/contracts/access/Ownable.sol | 0x5fe496311c4d128c1f2e13b49d3a3b8e9bc8f444 | Solidity | ApePunks | contract ApePunks is ERC721, Ownable {
using SafeMath for uint256;
string public PUNK_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN PUNKS ARE ALL SOLD OUT
string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS
bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
... | tokenLicense | function tokenLicense(uint _id) public view returns(string memory) {
require(_id < totalSupply(), "CHOOSE A PUNK WITHIN RANGE");
return LICENSE_TEXT;
}
| // Returns the license for tokens | LineComment | v0.7.6+commit.7338295f | None | ipfs://715de06efa33ddc78436274df9726bd55cc0f6a44828478a5de22482c3416c6a | {
"func_code_index": [
2322,
2501
]
} | 21,503 | ||
ApePunks | @openzeppelin/contracts/access/Ownable.sol | 0x5fe496311c4d128c1f2e13b49d3a3b8e9bc8f444 | Solidity | ApePunks | contract ApePunks is ERC721, Ownable {
using SafeMath for uint256;
string public PUNK_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN PUNKS ARE ALL SOLD OUT
string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS
bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
... | lockLicense | function lockLicense() public onlyOwner {
licenseLocked = true;
emit licenseisLocked(LICENSE_TEXT);
}
| // Locks the license to prevent further changes | LineComment | v0.7.6+commit.7338295f | None | ipfs://715de06efa33ddc78436274df9726bd55cc0f6a44828478a5de22482c3416c6a | {
"func_code_index": [
2557,
2687
]
} | 21,504 | ||
ApePunks | @openzeppelin/contracts/access/Ownable.sol | 0x5fe496311c4d128c1f2e13b49d3a3b8e9bc8f444 | Solidity | ApePunks | contract ApePunks is ERC721, Ownable {
using SafeMath for uint256;
string public PUNK_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN PUNKS ARE ALL SOLD OUT
string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS
bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
... | changeLicense | function changeLicense(string memory _license) public onlyOwner {
require(licenseLocked == false, "License already locked");
LICENSE_TEXT = _license;
}
| // Change the license | LineComment | v0.7.6+commit.7338295f | None | ipfs://715de06efa33ddc78436274df9726bd55cc0f6a44828478a5de22482c3416c6a | {
"func_code_index": [
2717,
2896
]
} | 21,505 | ||
ApePunks | @openzeppelin/contracts/access/Ownable.sol | 0x5fe496311c4d128c1f2e13b49d3a3b8e9bc8f444 | Solidity | ApePunks | contract ApePunks is ERC721, Ownable {
using SafeMath for uint256;
string public PUNK_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN PUNKS ARE ALL SOLD OUT
string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS
bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
... | punkNamesOfOwner | function punkNamesOfOwner(address _owner) external view returns(string[] memory ) {
uint256 tokenCount = balanceOf(_owner);
if (tokenCount == 0) {
// Return an empty array
return new string[](0);
} else {
string[] memory result = new string[](tokenCount);
uint256 index... | // GET ALL PUNKS OF A WALLET AS AN ARRAY OF STRINGS. WOULD BE BETTER MAYBE IF IT RETURNED A STRUCT WITH ID-NAME MATCH | LineComment | v0.7.6+commit.7338295f | None | ipfs://715de06efa33ddc78436274df9726bd55cc0f6a44828478a5de22482c3416c6a | {
"func_code_index": [
4307,
4865
]
} | 21,506 | ||
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
| /**
* @dev Gets the token ID at a given index of the tokens list of the requested owner.
* @param owner address owning the tokens list to be accessed
* @param index uint256 representing the index to be accessed of the requested tokens list
* @return uint256 token ID at the given index of the tokens list owned by th... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
1491,
1724
]
} | 21,507 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _allTokens.length;
}
| /**
* @dev Gets the total amount of tokens stored by the contract.
* @return uint256 representing the total amount of tokens
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
1873,
1971
]
} | 21,508 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) public view returns (uint256) {
require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
| /**
* @dev Gets the token ID at a given index of all the tokens in this contract
* Reverts if the index is greater or equal to the total number of tokens.
* @param index uint256 representing the index to be accessed of the tokens list
* @return uint256 token ID at the given index of the tokens list
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
2305,
2505
]
} | 21,509 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _transferFrom | function _transferFrom(address from, address to, uint256 tokenId) internal {
super._transferFrom(from, to, tokenId);
_removeTokenFromOwnerEnumeration(from, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
}
| /**
* @dev Internal function to transfer ownership of a given token ID to another address.
* As opposed to transferFrom, this imposes no restrictions on msg.sender.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenId uint256 ID of the token t... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
2876,
3119
]
} | 21,510 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _mint | function _mint(address to, uint256 tokenId) internal {
super._mint(to, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
_addTokenToAllTokensEnumeration(tokenId);
}
| /**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to address the beneficiary that will own the minted token
* @param tokenId uint256 ID of the token to be minted
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
3372,
3572
]
} | 21,511 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _burn | function _burn(address owner, uint256 tokenId) internal {
super._burn(owner, tokenId);
_removeTokenFromOwnerEnumeration(owner, tokenId);
// Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund
_ownedTokensIndex[tokenId] = 0;
_removeTokenFromAllTokensEnu... | /**
* @dev Internal function to burn a specific token.
* Reverts if the token does not exist.
* Deprecated, use {ERC721-_burn} instead.
* @param owner owner of the token to burn
* @param tokenId uint256 ID of the token being burned
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
3843,
4211
]
} | 21,512 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _tokensOfOwner | function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {
return _ownedTokens[owner];
}
| /**
* @dev Gets the list of token IDs of the requested owner.
* @param owner address owning the tokens
* @return uint256[] List of token IDs owned by the requested address
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
4412,
4540
]
} | 21,513 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _addTokenToOwnerEnumeration | function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
_ownedTokensIndex[tokenId] = _ownedTokens[to].length;
_ownedTokens[to].push(tokenId);
}
| /**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
4830,
5017
]
} | 21,514 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _addTokenToAllTokensEnumeration | function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
| /**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
5208,
5373
]
} | 21,515 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _removeTokenFromOwnerEnumeration | function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);
uint256... | /**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
*... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
5986,
7118
]
} | 21,516 |
ERC721Tradable | openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array ... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _removeTokenFromAllTokensEnumeration | function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length.sub(1);
uint256 tokenIndex = _allTok... | /**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
7402,
8470
]
} | 21,517 |
ChinaSmartolution | ChinaSmartolution.sol | 0x7003fd77116ceadb1e589d90ed58ac524dec0d50 | Solidity | ChinaSmartolution | contract ChinaSmartolution {
struct User {
uint value;
uint index;
uint atBlock;
}
mapping (address => User) public users;
uint public total;
uint public advertisement;
uint public team;
address public teamAddress;
address public advertis... | /**
中国智能解决方案以太
* ChinaSmartolution.org!
*
* Hey,
*
* You know the rules of ponzi already,
* but let me briefly explain how this one works ;)
*
* This is your personal 45 days magic piggy bank!
*
* 1. Send fixed amount of ether every 24 hours (5900 blocks).
* 2. With every new transaction ... | NatSpecMultiLine | claim | function claim(uint amount) public {
if (msg.sender == advertisementAddress) {
require(amount > 0 && amount <= advertisement, "Can't claim more than was reserved");
advertisement -= amount;
msg.sender.transfer(amount);
} else
if (msg.sender == teamAddress) {
require... | /**
* This one is easy, claim reserved ether for the team or advertisement
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://1c912c8613f1358aa63c7da1ac8afe437799da31451a59ee3358b3b9c92f44c5 | {
"func_code_index": [
2402,
2932
]
} | 21,518 | |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | mintTo | function mintTo(address _to) public onlyOwner {
require(canMint == true,"ERC721: canMint is false");
uint256 newTokenId = _getNextTokenId();
//铸造TokenId
_mint(_to, newTokenId);
_incrementTokenId();
emit Mint(_to);
}
| /**
* @dev Mints a token to an address with a tokenURI.
* @param _to address of the future owner of the token
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
1407,
1678
]
} | 21,519 |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | mintByTokenId | function mintByTokenId(address _to, uint256 _newTokenId) public onlyMinter {
require(canMint == true,"ERC721: canMint is false");
require(!_exists(_newTokenId),"ERC721: This id exists");
//铸造TokenId
safeMint(_to, _newTokenId);
_setTokenURI(_newTokenId,"default.png");
currentTokenId = _newTokenId... | /**
* @dev Mints a token to an address with tokenId.
* @param _to address of the future owner of the token
* @param _newTokenId token ID
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
1843,
2244
]
} | 21,520 |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | exists | function exists(uint256 _tokenId) public view returns(bool) {
return _exists(_tokenId);
}
| /**
* @dev Check this id exists.
* @param _tokenId token ID
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
2327,
2432
]
} | 21,521 |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | tokensOfOwner | function tokensOfOwner(address userAdd) public view returns (uint256[] memory) {
return _tokensOfOwner(userAdd);
}
| /**
* @dev Gets the list of token IDs of the requested owner.
* @param userAdd address owning the tokens
* @return uint256[] List of token IDs owned by the requested address
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
2636,
2766
]
} | 21,522 |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | setConfig | function setConfig(
string memory _baseTokenURI,
uint256 _stepNum,
bool _canMint
) public onlyOwner {
baseTokenURI = _baseTokenURI;
_setBaseURI(_baseTokenURI);
if (_stepNum > 0) {
stepNum = _stepNum;
}
canMint = _canMint;
emit SetConfig(_baseTokenURI, _stepNum, _ca... | /**
* 设置NFT合约的基本参数
* _baseTokenURI 域名前缀
* _stepNum 步长
* _canMint 是否可以铸造
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
2872,
3253
]
} | 21,523 |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | setTokenURI | function setTokenURI(uint256 _tokenId, string memory _tokenURI) public{
require(ownerOf(_tokenId) == msg.sender, "ERC721: tokenId is not allow msg.sender");
_setTokenURI(_tokenId, _tokenURI);
emit SetTokenURI(_tokenId, _tokenURI);
}
| /**
* @dev 可以通过tokenId修改tokenURI方法, 此方法直接调用721_setTokenURI方法
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
3337,
3601
]
} | 21,524 |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | _getNextTokenId | function _getNextTokenId() private view returns (uint256) {
return currentTokenId.add(stepNum);
}
| /**
* @dev calculates the next token ID based on value of currentTokenId
* @return uint256 for the next token ID
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
3739,
3852
]
} | 21,525 |
ERC721Tradable | contracts/ERC721Tradable.sol | 0xe9ea75cc93c5fca2e6aa2b7a4a74851694f54f78 | Solidity | ERC721Tradable | contract ERC721Tradable is ERC721Full, Ownable, ERC721Mintable {
using Strings for string;
uint256 public currentTokenId = 0;
//域名前缀
string public baseTokenURI = "https://ipfs.infura.io/ipfs/Qmba6eb7kj9ztwxXghvXqszgi9hsYo1thBKGDoDF5C1QJF/";
//每次生成ID的步长
uint256 public stepNum = 1;
//是否可... | /**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/ | NatSpecMultiLine | _incrementTokenId | function _incrementTokenId() private {
currentTokenId = currentTokenId + stepNum;
}
| /**
* @dev increments the value of currentTokenId
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://f07f044543ee19931d394c63c7f477e36933cdb3ecac91663bb2f550d38ace63 | {
"func_code_index": [
3921,
4020
]
} | 21,526 |
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | WhiteList | contract WhiteList is Owned {
/// @notice Users with permissions
mapping(address => uint256) public whiter;
/// @notice Append address into whiteList successevent
event AppendWhiter(address adder);
/// @notice Remove address into whiteList successevent
event RemoveWhiter(address remove... | appendWhiter | function appendWhiter(address account) public onlyOwner {
require(account != address(0), "WhiteList: address not zero");
require(
!isWhiter(account),
"WhiteListe: the account exsit whilteList yet"
);
whiter[account] = 1;
emit AppendWhiter(account);
}
| /**
* @notice Only onwer can append address into whitelist
* @param account The address not added, can added to the whitelist
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
760,
1091
]
} | 21,527 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | WhiteList | contract WhiteList is Owned {
/// @notice Users with permissions
mapping(address => uint256) public whiter;
/// @notice Append address into whiteList successevent
event AppendWhiter(address adder);
/// @notice Remove address into whiteList successevent
event RemoveWhiter(address remove... | removeWhiter | function removeWhiter(address account) public onlyOwner {
require(
isWhiter(account),
"WhiteListe: the account not exist whilteList"
);
delete whiter[account];
emit RemoveWhiter(account);
}
| /**
* @notice Only onwer can remove address into whitelist
* @param account The address in whitelist yet
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1225,
1486
]
} | 21,528 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | WhiteList | contract WhiteList is Owned {
/// @notice Users with permissions
mapping(address => uint256) public whiter;
/// @notice Append address into whiteList successevent
event AppendWhiter(address adder);
/// @notice Remove address into whiteList successevent
event RemoveWhiter(address remove... | isWhiter | function isWhiter(address account) public view returns (bool) {
return whiter[account] == 1;
}
| /**
* @notice Check whether acccount in whitelist
* @param account Any address
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1594,
1707
]
} | 21,529 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | WhiteList | contract WhiteList is Owned {
/// @notice Users with permissions
mapping(address => uint256) public whiter;
/// @notice Append address into whiteList successevent
event AppendWhiter(address adder);
/// @notice Remove address into whiteList successevent
event RemoveWhiter(address remove... | isWhiter | function isWhiter() public view returns (bool) {
return isWhiter(msg.sender);
}
| /**
* @notice Check whether msg.sender in whitelist overrides.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1793,
1891
]
} | 21,530 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | setupTokenStake | function setupTokenStake(address _tokenStake) public onlyWhiter {
tokenStake = ITokenStake(_tokenStake);
}
| /**
* @notice Set with tokenStake
* @param _tokenStake Address of tokenStake
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
636,
761
]
} | 21,531 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | openStake | function openStake() external onlyWhiter {
stakeLive = 1;
}
| /**
* @notice Open stake, if stake pasued
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
826,
904
]
} | 21,532 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | pauseStake | function pauseStake() external onlyWhiter {
stakeLive = 0;
}
| /**
* @notice Paused stake, if stake opened
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
971,
1050
]
} | 21,533 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | openRedeem | function openRedeem() external onlyWhiter {
redeemLive = 1;
}
| /**
* @notice Open redeem, if redeem paused
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1117,
1197
]
} | 21,534 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | pauseRedeem | function pauseRedeem() external onlyWhiter {
redeemLive = 0;
}
| /**
* @notice Pause redeem, if redeem opened
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1265,
1346
]
} | 21,535 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | isStakePaused | function isStakePaused() external view returns (bool) {
return stakeLive == 0;
}
| /**
* @notice Status of staking
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1401,
1500
]
} | 21,536 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | isRedeemPaused | function isRedeemPaused() external view returns (bool) {
return redeemLive == 0;
}
| /**
* @notice Status of redeem
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1554,
1655
]
} | 21,537 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | isClosed | function isClosed() external view returns (bool) {
return time > 0;
}
| /**
* @notice Status of closing-sys
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1714,
1802
]
} | 21,538 | ||
Esm | Esm.sol | 0xed39b9a5773a5370471cb89525d914be9eafda2e | Solidity | Esm | contract Esm is Owned, WhiteList {
/// @notice Access stake pause
uint256 public stakeLive = 1;
/// @notice Access redeem pause
uint256 public redeemLive = 1;
/// @notice System closed time
uint256 public time;
/// @notice TokenStake for updating on closed
ITokenStake public toke... | shutdown | function shutdown() external onlyWhiter {
require(time == 0, "System closed yet.");
tokenStake.updateIndex();
time = block.timestamp;
emit ShutDown(block.number, time);
}
| /**
* @notice If anything error, project manager can shutdown it
* anybody cant stake, but can redeem
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv3 | bzzr://a9a11438cfa75313a7b29dfa165c675a8e0badaead37563a6a52ac45923b0bbf | {
"func_code_index": [
1941,
2157
]
} | 21,539 | ||
OASChain | OAS_ERC20Detailed.sol | 0xfd2bdfdce55bad3b4b916e5758d44f0f8bc2d680 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | MIT | bzzr://25c03ab9a505164d12748b8416e5ca60f0429188d07f75ce417b8e1d7ae92ad0 | {
"func_code_index": [
550,
638
]
} | 21,540 |
OASChain | OAS_ERC20Detailed.sol | 0xfd2bdfdce55bad3b4b916e5758d44f0f8bc2d680 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | 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.5.1+commit.c8a2cb62 | MIT | bzzr://25c03ab9a505164d12748b8416e5ca60f0429188d07f75ce417b8e1d7ae92ad0 | {
"func_code_index": [
752,
844
]
} | 21,541 |
OASChain | OAS_ERC20Detailed.sol | 0xfd2bdfdce55bad3b4b916e5758d44f0f8bc2d680 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | 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.
*
*... | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | MIT | bzzr://25c03ab9a505164d12748b8416e5ca60f0429188d07f75ce417b8e1d7ae92ad0 | {
"func_code_index": [
1408,
1496
]
} | 21,542 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
251,
437
]
} | 21,543 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
707,
848
]
} | 21,544 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
1180,
1377
]
} | 21,545 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
1623,
2099
]
} | 21,546 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
2562,
2699
]
} | 21,547 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
3224,
3574
]
} | 21,548 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
4026,
4161
]
} | 21,549 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
4675,
4846
]
} | 21,550 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[accou... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | add | function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = true;
}
| /**
* @dev Give an account access to this role.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
156,
339
]
} | 21,551 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[accou... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | remove | function remove(Role storage role, address account) internal {
require(has(role, account), "Roles: account does not have role");
role.bearer[account] = false;
}
| /**
* @dev Remove an account's access to this role.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
414,
602
]
} | 21,552 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[accou... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | has | function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0), "Roles: account is the zero address");
return role.bearer[account];
}
| /**
* @dev Check if an account has this role.
* @return bool
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
692,
900
]
} | 21,553 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Context | contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (addres... | /*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending ... | Comment | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
265,
368
]
} | 21,554 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20Detailed | contract ERC20Detailed {
string public _name;
string public _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
constructor (st... | /**
* @dev Optional functions from the ERC20 standard.
*/ | 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://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
538,
626
]
} | 21,555 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20Detailed | contract ERC20Detailed {
string public _name;
string public _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
constructor (st... | /**
* @dev Optional functions from the ERC20 standard.
*/ | 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://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
740,
832
]
} | 21,556 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20Detailed | contract ERC20Detailed {
string public _name;
string public _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
constructor (st... | /**
* @dev Optional functions from the ERC20 standard.
*/ | 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.
*
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
1390,
1478
]
} | 21,557 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
274,
370
]
} | 21,558 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
428,
543
]
} | 21,559 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
755,
918
]
} | 21,560 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
976,
1115
]
} | 21,561 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
1257,
1414
]
} | 21,562 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
1881,
2190
]
} | 21,563 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
2594,
2809
]
} | 21,564 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
3307,
3573
]
} | 21,565 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | burn | function burn(uint256 value) public {
_burn(msg.sender, value);
}
| /**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
3695,
3771
]
} | 21,566 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | burnFrom | function burnFrom(address from, uint256 value) public {
_burnFrom(from, value);
}
| /**
* @dev Burns a specific amount of tokens from the target address and decrements allowance
* @param from address The address which you want to send tokens from
* @param value uint256 The amount of token to be burned
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
4015,
4107
]
} | 21,567 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exc... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
4594,
5070
]
} | 21,568 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
emit Mint(address(0), account... | /** @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://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
5346,
5708
]
} | 21,569 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address... | /**
* @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://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
6035,
6445
]
} | 21,570 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
6880,
7223
]
} | 21,571 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20 | contract ERC20 is Context{
using SafeMath for uint256;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
}
| /**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
7404,
7641
]
} | 21,572 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20Mintable | contract ERC20Mintable is ERC20, MinterRole {
event MintingFinished();
bool private _mintingFinished = false;
modifier onlyBeforeMintingFinished() {
require(!_mintingFinished);
_;
}
/**
* @return true if the minting is finished.
*/
function mintingFinished() public view returns... | /**
* @title ERC20Mintable
* @dev ERC20 minting logic
*/ | NatSpecMultiLine | mintingFinished | function mintingFinished() public view returns(bool) {
return _mintingFinished;
}
| /**
* @return true if the minting is finished.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
272,
364
]
} | 21,573 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | ERC20Mintable | contract ERC20Mintable is ERC20, MinterRole {
event MintingFinished();
bool private _mintingFinished = false;
modifier onlyBeforeMintingFinished() {
require(!_mintingFinished);
_;
}
/**
* @return true if the minting is finished.
*/
function mintingFinished() public view returns... | /**
* @title ERC20Mintable
* @dev ERC20 minting logic
*/ | NatSpecMultiLine | mint | function mint(
address to,
uint256 amount
)
public
onlyMinter
onlyBeforeMintingFinished
returns (bool)
{
_mint(to, amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
603,
793
]
} | 21,574 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Ownable | contract Ownable is Context {
address _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
489,
573
]
} | 21,575 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Ownable | contract Ownable is Context {
address _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | isOwner | function isOwner() public view returns (bool) {
return _msgSender() == _owner;
}
| /**
* @dev Returns true if the caller is the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
855,
954
]
} | 21,576 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Ownable | contract Ownable is Context {
address _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
1106,
1220
]
} | 21,577 |
PZR | PZR.sol | 0x685758b55423dc8d32aed84e6d8616167f15192a | Solidity | Ownable | contract Ownable is Context {
address _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://878dc411c422abc25aeb99ac991b9062ce85e3f27a39cbfc4865ecd3e9527f6e | {
"func_code_index": [
1321,
1555
]
} | 21,578 |
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | function () public payable {
uint8 _state = getState_();
if (_state == ST_RAISING){
buyShare_(_state);
return;
}
if (_state == ST_MONEY_BACK) {
refundShare_(msg.sender, share[msg.sender]);
if(msg.value > 0)
msg.sender.transfer(msg.value);
return;
}
if (_stat... | /**
* @dev payable function which does:
* If current state = ST_RASING - allows to send ETH for future tokens
* If current state = ST_MONEY_BACK - will send back all ETH that msg.sender has on balance
* If current state = ST_TOKEN_DISTRIBUTION - will reurn all ETH and Tokens that msg.sender has on balance
* i... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
1523,
2139
]
} | 21,579 | ||||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | buyShare | function buyShare() external payable returns(bool) {
return buyShare_(getState_());
}
| /**
* @dev Allow to buy part of tokens if current state is RAISING
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
2277,
2373
]
} | 21,580 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | acceptTokenFromICO | function acceptTokenFromICO(uint _value) external returns(bool) {
return acceptTokenFromICO_(_value);
}
| /**
* @dev Allow (Important) ICO manager to say that _value amount of tokens is approved from ERC20 contract to this contract
* @param _value amount of tokens that ICO manager approve from it's ERC20 contract to this contract
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
2669,
2783
]
} | 21,581 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | getStakeholderBalanceOf | function getStakeholderBalanceOf(uint8 _for) external view returns(uint) {
return getStakeholderBalanceOf_(_for);
}
| /**
* @dev Returns amount of ETH that stake holder (for example: ICO manager) can release from this contract
* @param _for role of stakeholder (for example: 2)
* @return amount of ETH in wei
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
2997,
3123
]
} | 21,582 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | getBalanceEtherOf | function getBalanceEtherOf(address _for) external view returns(uint) {
return getBalanceEtherOf_(_for);
}
| /**
* @dev Returns amount of ETH that person can release from this contract
* @param _for address of person
* @return amount of ETH in wei
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
3285,
3401
]
} | 21,583 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | getBalanceTokenOf | function getBalanceTokenOf(address _for) external view returns(uint) {
return getBalanceTokenOf_(_for);
}
| /**
* @dev Returns amount of tokens that person can release from this contract
* @param _for address of person
* @return amount of tokens
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
3562,
3678
]
} | 21,584 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseEtherToStakeholder | function releaseEtherToStakeholder(uint _value) external returns(bool) {
uint8 _state = getState_();
uint8 _for = getRole_();
require(!((_for == RL_ICO_MANAGER) && ((_state != ST_WAIT_FOR_ICO) || (tokenPrice > 0))));
return releaseEtherToStakeholder_(_state, _for, _value);
}
| /**
* @dev Release amount of ETH to msg.sender (must be stakeholder)
* @param _value amount of ETH in wei
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
3854,
4155
]
} | 21,585 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseEtherToStakeholderForce | function releaseEtherToStakeholderForce(uint8 _for, uint _value) external returns(bool) {
uint8 _role = getRole_();
require((_role==RL_ADMIN) || (_role==RL_PAYBOT));
uint8 _state = getState_();
require(!((_for == RL_ICO_MANAGER) && ((_state != ST_WAIT_FOR_ICO) || (tokenPrice > 0))));
return releaseEtherT... | /**
* @dev Release amount of ETH to stakeholder by admin or paybot
* @param _for stakeholder role (for example: 2)
* @param _value amount of ETH in wei
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
4380,
4754
]
} | 21,586 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseEther | function releaseEther(uint _value) external returns(bool) {
uint8 _state = getState_();
require(_state == ST_TOKEN_DISTRIBUTION);
return releaseEther_(msg.sender, _value);
}
| /**
* @dev Release amount of ETH to msg.sender
* @param _value amount of ETH in wei
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
4908,
5102
]
} | 21,587 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseEtherForce | function releaseEtherForce(address _for, uint _value) external returns(bool) {
uint8 _role = getRole_();
uint8 _state = getState_();
require(_state == ST_TOKEN_DISTRIBUTION);
require((_role==RL_ADMIN) || (_role==RL_PAYBOT));
return releaseEther_(_for, _value);
}
| /**
* @dev Release amount of ETH to person by admin or paybot
* @param _for address of person
* @param _value amount of ETH in wei
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
5306,
5599
]
} | 21,588 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseEtherForceMulti | function releaseEtherForceMulti(address[] _for, uint[] _value) external returns(bool) {
uint _sz = _for.length;
require(_value.length == _sz);
uint8 _role = getRole_();
uint8 _state = getState_();
require(_state == ST_TOKEN_DISTRIBUTION);
require((_role==RL_ADMIN) || (_role==RL_PAYBOT));
for (uint ... | /**
* @dev Release amount of ETH to person by admin or paybot
* @param _for addresses of persons
* @param _value amounts of ETH in wei
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
5805,
6244
]
} | 21,589 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseToken | function releaseToken(uint _value) external returns(bool) {
uint8 _state = getState_();
require(_state == ST_TOKEN_DISTRIBUTION);
return releaseToken_(msg.sender, _value);
}
| /**
* @dev Release amount of tokens to msg.sender
* @param _value amount of tokens
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
6397,
6591
]
} | 21,590 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseTokenForce | function releaseTokenForce(address _for, uint _value) external returns(bool) {
uint8 _role = getRole_();
uint8 _state = getState_();
require(_state == ST_TOKEN_DISTRIBUTION);
require((_role==RL_ADMIN) || (_role==RL_PAYBOT));
return releaseToken_(_for, _value);
}
| /**
* @dev Release amount of tokens to person by admin or paybot
* @param _for address of person
* @param _value amount of tokens
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
6794,
7087
]
} | 21,591 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | releaseTokenForceMulti | function releaseTokenForceMulti(address[] _for, uint[] _value) external returns(bool) {
uint _sz = _for.length;
require(_value.length == _sz);
uint8 _role = getRole_();
uint8 _state = getState_();
require(_state == ST_TOKEN_DISTRIBUTION);
require((_role==RL_ADMIN) || (_role==RL_PAYBOT));
for(uint i... | /**
* @dev Release amount of tokens to person by admin or paybot
* @param _for addresses of persons
* @param _value amounts of tokens
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
7294,
7732
]
} | 21,592 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | refundShare | function refundShare(uint _value) external returns(bool) {
uint8 _state = getState_();
require (_state == ST_MONEY_BACK);
return refundShare_(msg.sender, _value);
}
| /**
* @dev Allow to return ETH back to msg.sender if state Money back
* @param _value amount of ETH in wei
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
7909,
8094
]
} | 21,593 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | refundShareForce | function refundShareForce(address _for, uint _value) external returns(bool) {
uint8 _state = getState_();
uint8 _role = getRole_();
require(_role == RL_ADMIN || _role == RL_PAYBOT);
require (_state == ST_MONEY_BACK || _state == ST_RAISING);
return refundShare_(_for, _value);
}
| /**
* @dev Allow to return ETH back to person by admin or paybot if state Money back
* @param _for address of person
* @param _value amount of ETH in wei
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
8321,
8629
]
} | 21,594 | |||
PoolProd | contracts\abstract\Pool\ShareStore.sol | 0x39c8b48da570f52efd62870f7e7fce84ee0cff64 | Solidity | ShareStore | contract ShareStore is IRoleModel, IShareStore, IStateModel {
using SafeMath for uint;
/**
* @dev minimal amount of ETH in wei which is allowed to become investor
*/
uint public minimalDeposit;
/**
* @dev address of ERC20 token of ICO
*/
address public tokenAddress;
/**
... | execute | function execute(address _to, uint _value, bytes _data) external returns (bool) {
require (getRole_()==RL_ADMIN);
require (getState_()==ST_FUND_DEPRECATED);
/* solium-disable-next-line */
return _to.call.value(_value)(_data);
}
| /**
* @dev Allow to use functions of other contract from this contract
* @param _to address of contract to call
* @param _value amount of ETH in wei
* @param _data contract function call in bytes type
* @return result of operation, true if success
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2ad6e09ce51961f3a8960d377e2f72a9c9c57c36f684952d7c6f9970fb7f9af4 | {
"func_code_index": [
8906,
9159
]
} | 21,595 | |||
FormStaking | contracts/FormStake.sol | 0x5d67e545a2ab04e523005f753408d8fa5db71a5d | Solidity | FormStaking | contract FormStaking is Ownable {
// base APR
uint256 public BASE_APR;
uint256 public MULTIPLIER;
uint256 private ONE_YEAR = 31536000;
uint256 private ONE_ETH = 1000000000000000000;
// user's staking balance
mapping(address => uint256) public stakingBalance;
// staking start timestamp
... | getAPRValue | function getAPRValue() public view returns(uint256) {
return BASE_APR*MULTIPLIER;
}
| /// APR and multiplier calculations | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1112,
1211
]
} | 21,596 | ||||
FormStaking | contracts/FormStake.sol | 0x5d67e545a2ab04e523005f753408d8fa5db71a5d | Solidity | FormStaking | contract FormStaking is Ownable {
// base APR
uint256 public BASE_APR;
uint256 public MULTIPLIER;
uint256 private ONE_YEAR = 31536000;
uint256 private ONE_ETH = 1000000000000000000;
// user's staking balance
mapping(address => uint256) public stakingBalance;
// staking start timestamp
... | _calculateYield | function _calculateYield(address user) private view returns(uint256) {
// end means now
uint256 end = block.timestamp;
uint256 totalYield;
// loop through trenches
for(uint256 i; i < trenches.length; i++){
// how long the user was staking during the trench
uint256 stakingTimeWithinTi... | /// Yield calculations | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1414,
3669
]
} | 21,597 | ||||
FormStaking | contracts/FormStake.sol | 0x5d67e545a2ab04e523005f753408d8fa5db71a5d | Solidity | FormStaking | contract FormStaking is Ownable {
// base APR
uint256 public BASE_APR;
uint256 public MULTIPLIER;
uint256 private ONE_YEAR = 31536000;
uint256 private ONE_ETH = 1000000000000000000;
// user's staking balance
mapping(address => uint256) public stakingBalance;
// staking start timestamp
... | stake | function stake(uint256 amount) public {
// amount to stake and user's balance can not be 0
require(
amount > 0 &&
formToken.balanceOf(msg.sender) >= amount,
"You cannot stake zero tokens");
// if user is already staking, calculate up-to-date yield
if(stakingBalance[msg.... | /// Core functions | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4074,
4889
]
} | 21,598 | ||||
zkSyncProxyToken | zkSyncProxyToken.sol | 0xe6b430e688b76ac89588c587cf8d35e96df88b15 | Solidity | zkSyncProxyToken | contract zkSyncProxyToken is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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 | MIT | ipfs://e083648c7e651a7aaec25cad18edbd4f4f598bf3c1058c5a1a6b307f7b2d02a9 | {
"func_code_index": [
15721,
15818
]
} | 21,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.