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
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ 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...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 1470, 1587 ] }
23,300
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
Address
library Address { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return...
/** * Utility library of inline functions on addresses */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about ...
/** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 370, 966 ] }
23,301
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view returns (uint256) { require(owner != address(0)); return _ownedTokensCount[owner]; }
/** * @dev Gets the balance of the specified address * @param owner address to query the balance of * @return uint256 representing the amount owned by the passed address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 1773, 1919 ] }
23,302
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view returns (address) { address owner = _tokenOwner[tokenId]; require(owner != address(0)); return owner; }
/** * @dev Gets the owner of the specified token ID * @param tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 2135, 2305 ] }
23,303
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public { address owner = ownerOf(tokenId); require(to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); }
/** * @dev Approves another address to transfer the given token ID * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * Can only be called by the token owner or an approved operator. * @param to address to be approved for the given to...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 2715, 2995 ] }
23,304
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view returns (address) { require(_exists(tokenId)); return _tokenApprovals[tokenId]; }
/** * @dev Gets the approved address for a token ID, or zero if no address set * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to query the approval of * @return address currently approved for the given token ID */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 3271, 3418 ] }
23,305
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address to, bool approved) public { require(to != msg.sender); _operatorApprovals[msg.sender][to] = approved; emit ApprovalForAll(msg.sender, to, approved); }
/** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf * @param to operator address to set the approval * @param approved representing the status of the approval to be set */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 3701, 3907 ] }
23,306
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll( address owner, address operator ) public view returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev Tells whether an operator is approved by a given owner * @param owner owner address which you want to query the approval of * @param operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 4219, 4396 ] }
23,307
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public { require(_isApprovedOrOwner(msg.sender, tokenId)); require(to != address(0)); _clearApproval(from, tokenId); _removeTokenFrom(from, tokenId); _addTokenTo(to, tokenId); emit Transfer(from, to, tokenId); }
/** * @dev Transfers the ownership of a given token ID to another address * Usage of this method is discouraged, use `safeTransferFrom` whenever possible * Requires the msg sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of th...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 4818, 5162 ] }
23,308
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public { // solium-disable-next-line arg-overflow safeTransferFrom(from, to, tokenId, ""); }
/** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 5786, 5991 ] }
23,309
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes _data ) public { transferFrom(from, to, tokenId); // solium-disable-next-line arg-overflow require(_checkOnERC721Received(from, to, tokenId, _data)); }
/** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 6681, 6960 ] }
23,310
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view returns (bool) { address owner = _tokenOwner[tokenId]; return owner != address(0); }
/** * @dev Returns whether the specified token exists * @param tokenId uint256 ID of the token to query the existence of * @return whether the token exists */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 7141, 7289 ] }
23,311
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner( address spender, uint256 tokenId ) internal view returns (bool) { address owner = ownerOf(tokenId); // Disable solium check because of // https://github.com/duaraghav8/Solium/issues/175 // solium-disable-next-line operator-whitespace return ( spender == ...
/** * @dev Returns whether the given spender can transfer a given token ID * @param spender address of the spender to query * @param tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of th...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 7640, 8092 ] }
23,312
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal { require(to != address(0)); _addTokenTo(to, tokenId); emit Transfer(address(0), to, tokenId); }
/** * @dev Internal function to mint a new token * Reverts if the given token ID already exists * @param to The address that will own the minted token * @param tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 8344, 8514 ] }
23,313
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_burn
function _burn(address owner, uint256 tokenId) internal { _clearApproval(owner, tokenId); _removeTokenFrom(owner, tokenId); emit Transfer(owner, address(0), tokenId); }
/** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 8703, 8892 ] }
23,314
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_addTokenTo
function _addTokenTo(address to, uint256 tokenId) internal { require(_tokenOwner[tokenId] == address(0)); _tokenOwner[tokenId] = to; _ownedTokensCount[to] = _ownedTokensCount[to].add(1); }
/** * @dev Internal function to add a token ID to the list of a given address * Note that this function is left internal to make ERC721Enumerable possible, but is not * intended to be called by custom derived contracts: in particular, it emits no Transfer event. * @param to address representing the new owner of...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 9350, 9559 ] }
23,315
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_removeTokenFrom
function _removeTokenFrom(address from, uint256 tokenId) internal { require(ownerOf(tokenId) == from); _ownedTokensCount[from] = _ownedTokensCount[from].sub(1); _tokenOwner[tokenId] = address(0); }
/** * @dev Internal function to remove a token ID from the list of a given address * Note that this function is left internal to make ERC721Enumerable possible, but is not * intended to be called by custom derived contracts: in particular, it emits no Transfer event, * and doesn't clear approvals. * @param fr...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 10068, 10286 ] }
23,316
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes _data ) internal returns (bool) { if (!to.isContract()) { return true; } bytes4 retval = IERC721Receiver(to).onERC721Received( msg.sender, from, tokenId, _data); return (retval == _ERC721_RECEIVED...
/** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of th...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 10797, 11155 ] }
23,317
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721
contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_clearApproval
function _clearApproval(address owner, uint256 tokenId) private { require(ownerOf(tokenId) == owner); if (_tokenApprovals[tokenId] != address(0)) { _tokenApprovals[tokenId] = address(0); } }
/** * @dev Private function to clear current approval of a given token ID * Reverts if the given address is not indeed the owner of the token * @param owner owner of the token * @param tokenId uint256 ID of the token to be transferred */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 11419, 11637 ] }
23,318
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721Metadata
contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** ...
name
function name() external view returns (string) { return _name; }
/** * @dev Gets the token name * @return string representing the token name */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 844, 919 ] }
23,319
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721Metadata
contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** ...
symbol
function symbol() external view returns (string) { return _symbol; }
/** * @dev Gets the token symbol * @return string representing the token symbol */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 1020, 1099 ] }
23,320
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721Metadata
contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** ...
tokenURI
function tokenURI(uint256 tokenId) external view returns (string) { require(_exists(tokenId)); return _tokenURIs[tokenId]; }
/** * @dev Returns an URI for a given token ID * Throws if the token ID does not exist. May return an empty string. * @param tokenId uint256 ID of the token to query */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 1290, 1430 ] }
23,321
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721Metadata
contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** ...
_setTokenURI
function _setTokenURI(uint256 tokenId, string uri) internal { require(_exists(tokenId)); _tokenURIs[tokenId] = uri; }
/** * @dev Internal function to set the token URI for a given token * Reverts if the token ID does not exist * @param tokenId uint256 ID of the token to set its URI * @param uri string URI to assign */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 1658, 1791 ] }
23,322
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721Metadata
contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** ...
_burn
function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } }
/** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 2026, 2252 ] }
23,323
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC721MetadataMintable
contract ERC721MetadataMintable is ERC721, ERC721Metadata, MinterRole { /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param tokenId The token id to mint. * @param tokenURI The token URI of the minted token. * @return A boolean that indicates if...
/** * @title ERC721MetadataMintable * @dev ERC721 minting logic with metadata */
NatSpecMultiLine
mintWithTokenURI
function mintWithTokenURI( address to, uint256 tokenId, string tokenURI ) public onlyMinter returns (bool) { _mint(to, tokenId); _setTokenURI(tokenId, tokenURI); return true; }
/** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param tokenId The token id to mint. * @param tokenURI The token URI of the minted token. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 359, 592 ] }
23,324
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 94, 154 ] }
23,325
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 237, 310 ] }
23,326
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 534, 616 ] }
23,327
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 895, 983 ] }
23,328
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 1647, 1726 ] }
23,329
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 2039, 2141 ] }
23,330
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
ERC20Distributor
contract ERC20Distributor is Owned{ using SafeMath for uint256; IERC20 public handledToken; struct Account { address addy; uint256 share; } Account[] accounts; uint256 totalShares = 0; uint256 totalAccounts = 0; uint256 fullViewPercentage = 10000; // ...
/* Allows the creator to specify different addresses with differently sized shares, which will get accordingly sized portions of all Tokens from handledToken, sitting in this smart contract, by calling distributeTokens() from anyone. */
Comment
getGlobals
function getGlobals() public view returns( uint256 _tokenBalance, uint256 _totalAccounts, uint256 _totalShares, uint256 _fullViewPercentage){ return ( handledToken.balanceOf(address(this)), totalAccounts, totalShares, fullViewPercentage ); }
// get general infos about the contracts state
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 548, 833 ] }
23,331
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
ERC20Distributor
contract ERC20Distributor is Owned{ using SafeMath for uint256; IERC20 public handledToken; struct Account { address addy; uint256 share; } Account[] accounts; uint256 totalShares = 0; uint256 totalAccounts = 0; uint256 fullViewPercentage = 10000; // ...
/* Allows the creator to specify different addresses with differently sized shares, which will get accordingly sized portions of all Tokens from handledToken, sitting in this smart contract, by calling distributeTokens() from anyone. */
Comment
getAccountInfo
function getAccountInfo(uint256 index) public view returns( uint256 _tokenBalance, uint256 _tokenEntitled, uint256 _shares, uint256 _percentage, address _address){ return ( handledToken.balanceOf(accounts[index].addy), (accounts[index].share.mul(handledToken.balanceOf(address(this)))).div(totalShares...
// get specific infos about a account which is defined in this contract
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 911, 1377 ] }
23,332
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
ERC20Distributor
contract ERC20Distributor is Owned{ using SafeMath for uint256; IERC20 public handledToken; struct Account { address addy; uint256 share; } Account[] accounts; uint256 totalShares = 0; uint256 totalAccounts = 0; uint256 fullViewPercentage = 10000; // ...
/* Allows the creator to specify different addresses with differently sized shares, which will get accordingly sized portions of all Tokens from handledToken, sitting in this smart contract, by calling distributeTokens() from anyone. */
Comment
distributeTokens
function distributeTokens() public { nt256 sharesProcessed = 0; nt256 currentAmount = handledToken.balanceOf(address(this)); for(uint i = 0; i < accounts.length; i++) { f(accounts[i].share > 0 && accounts[i].addy != address(0)){ uint256 amount = (currentAmount.mul(accounts[i].share)).div(totalShares....
// called by anyone, distributes all handledToken sitting in this contract // to the defined accounts, accordingly to their current share portion
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 1531, 2047 ] }
23,333
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
ERC20Distributor
contract ERC20Distributor is Owned{ using SafeMath for uint256; IERC20 public handledToken; struct Account { address addy; uint256 share; } Account[] accounts; uint256 totalShares = 0; uint256 totalAccounts = 0; uint256 fullViewPercentage = 10000; // ...
/* Allows the creator to specify different addresses with differently sized shares, which will get accordingly sized portions of all Tokens from handledToken, sitting in this smart contract, by calling distributeTokens() from anyone. */
Comment
writeAccount
function writeAccount(address _address, uint256 _share) public onlyOwner { require(_address != address(0), "address can't be 0 address"); require(_address != address(this), "address can't be this contract address"); require(_share > 0, "share must be more than 0"); leteAccount(_address); Account me...
// add or update existing account, defined by it's address & shares
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 2120, 2590 ] }
23,334
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
ERC20Distributor
contract ERC20Distributor is Owned{ using SafeMath for uint256; IERC20 public handledToken; struct Account { address addy; uint256 share; } Account[] accounts; uint256 totalShares = 0; uint256 totalAccounts = 0; uint256 fullViewPercentage = 10000; // ...
/* Allows the creator to specify different addresses with differently sized shares, which will get accordingly sized portions of all Tokens from handledToken, sitting in this smart contract, by calling distributeTokens() from anyone. */
Comment
deleteAccount
function deleteAccount(address _address) public onlyOwner{ for(uint i = 0; i < accounts.length; i++) { f(accounts[i].addy == _address){ totalShares -= accounts[i].share; if(i < accounts.length - 1){ accounts[i] = accounts[accounts.length - 1]; } delete accounts[accounts.length - 1]; accounts.length--;...
// removes existing account from account list
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 2645, 3046 ] }
23,335
ERC20Distributor
ERC20Distributor.sol
0x706c1b83cce2292f5dce762e33d05c4d708c5bd0
Solidity
ERC20Distributor
contract ERC20Distributor is Owned{ using SafeMath for uint256; IERC20 public handledToken; struct Account { address addy; uint256 share; } Account[] accounts; uint256 totalShares = 0; uint256 totalAccounts = 0; uint256 fullViewPercentage = 10000; // ...
/* Allows the creator to specify different addresses with differently sized shares, which will get accordingly sized portions of all Tokens from handledToken, sitting in this smart contract, by calling distributeTokens() from anyone. */
Comment
withdrawOtherERC20
function withdrawOtherERC20(IERC20 _token) public onlyOwner{ require(_token.balanceOf(address(this)) > 0, "no balance"); require(_token != handledToken, "not allowed to withdraw handledToken"); _token.transfer(owner, _token.balanceOf(address(this))); }
// allows the creator to withdraw any other ERC20 Token, // which might land here
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://4bb65aea2c7ce0ddba0617c2e89b40876053940f5ee230f533f997a08bd2382f
{ "func_code_index": [ 3136, 3401 ] }
23,336
F1
F1.sol
0x3137a504cc7c6a8e39f9c78b26046bbd0e55952e
Solidity
F1
contract F1 { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address...
F1
function F1() { initialSupply = 3300000000000000; name ="F1"; decimals = 8; symbol = "F1"; balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens totalSupply = initialSupply; // Update total supply ...
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.18+commit.9cf6e910
bzzr://43edf106c879c5d5635eb9c806240c989d792db84c91b65d56a5ca6138395c8c
{ "func_code_index": [ 521, 895 ] }
23,337
F1
F1.sol
0x3137a504cc7c6a8e39f9c78b26046bbd0e55952e
Solidity
F1
contract F1 { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address...
transfer
function transfer(address _to, uint256 _value) { if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender balance...
/* Send coins */
Comment
v0.4.18+commit.9cf6e910
bzzr://43edf106c879c5d5635eb9c806240c989d792db84c91b65d56a5ca6138395c8c
{ "func_code_index": [ 920, 1354 ] }
23,338
F1
F1.sol
0x3137a504cc7c6a8e39f9c78b26046bbd0e55952e
Solidity
F1
contract F1 { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address...
function () { throw; // Prevents accidental sending of ether }
/* This unnamed function is called whenever someone tries to send ether to it */
Comment
v0.4.18+commit.9cf6e910
bzzr://43edf106c879c5d5635eb9c806240c989d792db84c91b65d56a5ca6138395c8c
{ "func_code_index": [ 1465, 1550 ] }
23,339
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
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://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 506, 598 ] }
23,340
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
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://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 1157, 1310 ] }
23,341
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
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://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 1460, 1709 ] }
23,342
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 161, 344 ] }
23,343
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 492, 651 ] }
23,344
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0)...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 801, 1249 ] }
23,345
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 1400, 1560 ] }
23,346
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 1721, 1881 ] }
23,347
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 2123, 2307 ] }
23,348
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 2585, 2748 ] }
23,349
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 3002, 3227 ] }
23,350
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to re...
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 3700, 3858 ] }
23,351
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 4320, 4476 ] }
23,352
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 4950, 5121 ] }
23,353
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv...
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 5790, 5960 ] }
23,354
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 6618, 6788 ] }
23,355
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 94, 154 ] }
23,356
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 237, 310 ] }
23,357
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 534, 616 ] }
23,358
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 895, 983 ] }
23,359
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 1647, 1726 ] }
23,360
WIDPresale
WIDPresale.sol
0x78d54b2246f95fe966bdf3e80dd51bd65ab2125b
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.6+commit.7338295f
None
ipfs://371c8f3ab0908a2ebea7b451489dbbf5220d01db0ff1d58aec919d116e25ec9c
{ "func_code_index": [ 2039, 2141 ] }
23,361
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 815, 932 ] }
23,362
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 1097, 1205 ] }
23,363
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 1343, 1521 ] }
23,364
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 89, 476 ] }
23,365
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 560, 840 ] }
23,366
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 954, 1070 ] }
23,367
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 1134, 1264 ] }
23,368
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
TokenVesting
contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public cliff; uint256 public start; uint256 public duratio...
release
function release(ERC20Basic token) public { uint256 unreleased = releasableAmount(token); require(unreleased > 0); released[token] = released[token].add(unreleased); token.safeTransfer(beneficiary, unreleased); emit Released(unreleased); }
/** * @notice Transfers vested tokens to beneficiary. * @param token ERC20 token which is being vested */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 1585, 1863 ] }
23,369
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
TokenVesting
contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public cliff; uint256 public start; uint256 public duratio...
revoke
function revoke(ERC20Basic token) public onlyOwner { require(revocable); require(!revoked[token]); uint256 balance = token.balanceOf(this); uint256 unreleased = releasableAmount(token); uint256 refund = balance.sub(unreleased); revoked[token] = true; token.safeTransfer(owner, refund); ...
/** * @notice Allows the owner to revoke the vesting. Tokens already vested * remain in the contract, the rest are returned to the owner. * @param token ERC20 token which is being vested */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 2075, 2434 ] }
23,370
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
TokenVesting
contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public cliff; uint256 public start; uint256 public duratio...
releasableAmount
function releasableAmount(ERC20Basic token) public view returns (uint256) { return vestedAmount(token).sub(released[token]); }
/** * @dev Calculates the amount that has already vested but hasn't been released yet. * @param token ERC20 token which is being vested */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 2591, 2728 ] }
23,371
TokenVesting
TokenVesting.sol
0x2539d17a04d383fec5a4648fe9e8033b3d4cd860
Solidity
TokenVesting
contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public cliff; uint256 public start; uint256 public duratio...
vestedAmount
function vestedAmount(ERC20Basic token) public view returns (uint256) { uint256 currentBalance = token.balanceOf(this); uint256 totalBalance = currentBalance.add(released[token]); if (block.timestamp < cliff) { return 0; } else if (block.timestamp >= start.add(duration) || revoked[token]) { retu...
/** * @dev Calculates the amount that has already vested. * @param token ERC20 token which is being vested */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://61637db3f7ed66e1ee3efd73a9482be6d4308a6b7a6c4b749156defc57ab6099
{ "func_code_index": [ 2856, 3307 ] }
23,372
Registry
Registry.sol
0x8287ffad78b4d9e2f6dd9650fd0d101088f477bc
Solidity
Registry
contract Registry { address private minter; address private core; address private oracleAggregator; address private syntheticAggregator; address private opiumAddress; address private tokenSpender; address private wethAddress; address public initializer; modifier onlyInit...
setMinter
function setMinter(address _minter) external onlyInitializer { require(minter == address(0), "REGISTRY:ALREADY_SET"); minter = _minter; }
// Setters
LineComment
v0.5.7+commit.6da8b019
MIT
bzzr://5cf22431091999bcaeda83a3f9c7fa1ccd4c0e82d7624d6c9d690893c0b7ffcc
{ "func_code_index": [ 518, 683 ] }
23,373
Registry
Registry.sol
0x8287ffad78b4d9e2f6dd9650fd0d101088f477bc
Solidity
Registry
contract Registry { address private minter; address private core; address private oracleAggregator; address private syntheticAggregator; address private opiumAddress; address private tokenSpender; address private wethAddress; address public initializer; modifier onlyInit...
getCore
function getCore() external view returns (address) { return core; }
// Getters
LineComment
v0.5.7+commit.6da8b019
MIT
bzzr://5cf22431091999bcaeda83a3f9c7fa1ccd4c0e82d7624d6c9d690893c0b7ffcc
{ "func_code_index": [ 2102, 2188 ] }
23,374
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 94, 154 ] }
23,375
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 235, 308 ] }
23,376
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 530, 612 ] }
23,377
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 889, 977 ] }
23,378
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 1639, 1718 ] }
23,379
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 2029, 2131 ] }
23,380
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
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://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 259, 445 ] }
23,381
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
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://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 721, 862 ] }
23,382
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 1158, 1353 ] }
23,383
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
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://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 1605, 2077 ] }
23,384
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
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://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 2546, 2683 ] }
23,385
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 3172, 3453 ] }
23,386
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
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://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 3911, 4046 ] }
23,387
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
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 ...
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://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 4524, 4695 ] }
23,388
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 606, 1230 ] }
23,389
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 2158, 2560 ] }
23,390
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 3314, 3492 ] }
23,391
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 3715, 3916 ] }
23,392
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 4284, 4515 ] }
23,393
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 4764, 5085 ] }
23,394
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Ownable
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 = _msgSender...
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://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 493, 577 ] }
23,395
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Ownable
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 = _msgSender...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 1131, 1284 ] }
23,396
SPID
SPID.sol
0x5bdb568d1a5cf22402c80bb3d90ab8b01dfeee78
Solidity
Ownable
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 = _msgSender...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://ce4c0296b8366e203666201dfa0fd925f1080594510a82ab7c94d3cfbf6215eb
{ "func_code_index": [ 1432, 1681 ] }
23,397
FriStatementContract
FriLayer.sol
0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1
Solidity
FriLayer
contract FriLayer is MerkleVerifier, PrimeFieldElement0 { event LogGas(string name, uint256 val); uint256 constant internal FRI_MAX_FRI_STEP = 4; uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP; // Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)...
/* The main component of FRI is the FRI step which takes the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1. To this end we have a friCtx that holds the following data: evaluations: holds the evaluations on the coset we are currently working on. group: holds the...
Comment
do2FriSteps
function do2FriSteps( uint256 friHalfInvGroupPtr, uint256 evaluationsOnCosetPtr, uint256 cosetOffset_, uint256 friEvalPoint) internal pure returns (uint256 nextLayerValue, uint256 nextXInv) { assembly { let PRIME := 0x800000000000011000000000000000000000000000000000000000000000001 let friEva...
/* Reads 4 elements, and applies 2 + 1 FRI transformations to obtain a single element. FRI layer n: f0 f1 f2 f3 ----------------------------------------- \ / -- \ / ----------- FRI layer n+1: f0 f2 -------------------------------------------- \ ---/ ...
Comment
v0.6.11+commit.5ef660b1
Apache-2.0
ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649
{ "func_code_index": [ 2593, 4448 ] }
23,398
FriStatementContract
FriLayer.sol
0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1
Solidity
FriLayer
contract FriLayer is MerkleVerifier, PrimeFieldElement0 { event LogGas(string name, uint256 val); uint256 constant internal FRI_MAX_FRI_STEP = 4; uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP; // Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)...
/* The main component of FRI is the FRI step which takes the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1. To this end we have a friCtx that holds the following data: evaluations: holds the evaluations on the coset we are currently working on. group: holds the...
Comment
do3FriSteps
function do3FriSteps( uint256 friHalfInvGroupPtr, uint256 evaluationsOnCosetPtr, uint256 cosetOffset_, uint256 friEvalPoint) internal pure returns (uint256 nextLayerValue, uint256 nextXInv) { assembly { let PRIME := 0x800000000000011000000000000000000000000000000000000000000000001 let MPRIME...
/* Reads 8 elements, and applies 4 + 2 + 1 FRI transformation to obtain a single element. See do2FriSteps for more detailed explanation. */
Comment
v0.6.11+commit.5ef660b1
Apache-2.0
ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649
{ "func_code_index": [ 4611, 8763 ] }
23,399