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
Role
Role.sol
0xcd4d337554862f9bc9ffffb67465b7d643e4e3ad
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 ...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes)....
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://1f69131cc0b40d517f8791f36d0393c56dffd07f43d3cfe57896e887e5c6a043
{ "func_code_index": [ 4384, 5377 ] }
57,061
Role
Role.sol
0xcd4d337554862f9bc9ffffb67465b7d643e4e3ad
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://1f69131cc0b40d517f8791f36d0393c56dffd07f43d3cfe57896e887e5c6a043
{ "func_code_index": [ 5667, 6751 ] }
57,062
Role
Role.sol
0xcd4d337554862f9bc9ffffb67465b7d643e4e3ad
Solidity
Role
contract Role is ERC721Enumerable, ReentrancyGuard, Ownable { struct SelfDecidedAttribute { uint8 gender; uint8 strength; uint8 dexterity; uint8 constitution; uint8 wisdom; uint8 charisma; uint8 intelligence; uint8 race; uint8 align...
getOccupationType
function getOccupationType(uint256 tokenId) public view returns (uint256) { uint256 rand = random(string(abi.encodePacked("Occupation", toString(tokenId)))); uint256 score = rand % 100; uint i = 0; for(; i < roleScoreMatch.length; i++){ if(score <= roleScoreMatch[i]){ ...
//@return 1~6
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1f69131cc0b40d517f8791f36d0393c56dffd07f43d3cfe57896e887e5c6a043
{ "func_code_index": [ 12163, 12573 ] }
57,063
Role
Role.sol
0xcd4d337554862f9bc9ffffb67465b7d643e4e3ad
Solidity
Role
contract Role is ERC721Enumerable, ReentrancyGuard, Ownable { struct SelfDecidedAttribute { uint8 gender; uint8 strength; uint8 dexterity; uint8 constitution; uint8 wisdom; uint8 charisma; uint8 intelligence; uint8 race; uint8 align...
getOccupationColor
function getOccupationColor(uint256 tokenId) public view returns (uint256) { uint256 rand2 = random(string(abi.encodePacked("color", toString(tokenId)))); uint256 colorScore = rand2 % 100; uint j = 0; for(; j < roleColorMatch.length; j++){ if(colorScore <= roleColorMatch[j]){ b...
//@return 1~6
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1f69131cc0b40d517f8791f36d0393c56dffd07f43d3cfe57896e887e5c6a043
{ "func_code_index": [ 12599, 13007 ] }
57,064
Role
Role.sol
0xcd4d337554862f9bc9ffffb67465b7d643e4e3ad
Solidity
Base64
library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (le...
encode
function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); ...
/// @notice Encodes some bytes to the base64 representation
NatSpecSingleLine
v0.8.7+commit.e28d00a7
MIT
ipfs://1f69131cc0b40d517f8791f36d0393c56dffd07f43d3cfe57896e887e5c6a043
{ "func_code_index": [ 190, 1802 ] }
57,065
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
Hourglass
function Hourglass() public { // add administrators here // add the ambassadors here. }
/* * -- APPLICATION ENTRY POINTS -- */
Comment
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 5006, 5154 ] }
57,066
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
buy
function buy(address _referredBy) public payable returns(uint256) { purchaseTokens(msg.value, _referredBy); }
/** * Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 5294, 5454 ] }
57,067
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
function() payable public { purchaseTokens(msg.value, 0x0); }
/** * Fallback function to handle ethereum that was send straight to the contract * Unfortunately we cannot use a referral address this way. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 5628, 5731 ] }
57,068
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
reinvest
function reinvest() onlyStronghands() public { // fetch dividends uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code // pay out the dividends virtually address _customerAddress = msg.sender; payoutsTo_[_customerAddress] += (int256) (_dividend...
/** * Converts all of caller's dividends to tokens. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 5810, 6582 ] }
57,069
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
exit
function exit() public { // get token count for caller & sell them all address _customerAddress = msg.sender; uint256 _tokens = tokenBalanceLedger_[_customerAddress]; if(_tokens > 0) sell(_tokens); // lambo delivery service withdraw(); }
/** * Alias of sell() and withdraw(). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 6647, 6972 ] }
57,070
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
withdraw
function withdraw() onlyStronghands() public { // setup data address _customerAddress = msg.sender; uint256 _dividends = myDividends(false); // get ref. bonus later in the code // update dividend tracker payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); ...
/** * Withdraws all of the callers earnings. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 7040, 7723 ] }
57,071
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
sell
function sell(uint256 _amountOfTokens) onlyBagholders() public { // setup data address _customerAddress = msg.sender; // russian hackers BTFO require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); uint256 _tokens = _amountOfTokens; uint256 _ethereum = tokensToEthereu...
/** * Liquifies tokens to ethereum. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 7786, 9091 ] }
57,072
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
transfer
function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders() public returns(bool) { // setup address _customerAddress = msg.sender; // make sure we have the requested tokens // also disables transfers until ambassador phase is over // ( we dont want ...
/** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 9229, 11016 ] }
57,073
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
disableInitialStage
function disableInitialStage() onlyAdministrator() public { onlyAmbassadors = false; }
/** * In case the amassador quota is not met, the administrator can manually disable the ambassador phase. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 11212, 11340 ] }
57,074
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
setAdministrator
function setAdministrator(bytes32 _identifier, bool _status) onlyAdministrator() public { administrators[_identifier] = _status; }
/** * In case one of us dies, we need to replace ourselves. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 11427, 11599 ] }
57,075
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
setStakingRequirement
function setStakingRequirement(uint256 _amountOfTokens) onlyAdministrator() public { stakingRequirement = _amountOfTokens; }
/** * Precautionary measures in case we need to adjust the masternode rate. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 11702, 11868 ] }
57,076
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
setName
function setName(string _name) onlyAdministrator() public { name = _name; }
/** * If we want to rebrand, we can. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 11932, 12049 ] }
57,077
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
setSymbol
function setSymbol(string _symbol) onlyAdministrator() public { symbol = _symbol; }
/** * If we want to rebrand, we can. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 12113, 12238 ] }
57,078
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
totalEthereumBalance
function totalEthereumBalance() public view returns(uint) { return this.balance; }
/** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 12429, 12562 ] }
57,079
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
totalSupply
function totalSupply() public view returns(uint256) { return tokenSupply_; }
/** * Retrieve the total token supply. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 12628, 12755 ] }
57,080
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
myTokens
function myTokens() public view returns(uint256) { address _customerAddress = msg.sender; return balanceOf(_customerAddress); }
/** * Retrieve the tokens owned by the caller. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 12829, 13016 ] }
57,081
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
myDividends
function myDividends(bool _includeReferralBonus) public view returns(uint256) { address _customerAddress = msg.sender; return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ; }
/** * Retrieve the dividends owned by the caller. * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations. * The reason for this, is that in the frontend, we will want to get the total divs (global + ref) * But in the internal calculations, we want them separate. ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 13373, 13688 ] }
57,082
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
balanceOf
function balanceOf(address _customerAddress) view public returns(uint256) { return tokenBalanceLedger_[_customerAddress]; }
/** * Retrieve the token balance of any single address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 13771, 13945 ] }
57,083
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
dividendsOf
function dividendsOf(address _customerAddress) view public returns(uint256) { return (uint256) ((int256)(profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude; }
/** * Retrieve the dividend balance of any single address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 14031, 14290 ] }
57,084
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
sellPrice
function sellPrice() public view returns(uint256) { // our calculation relies on the token supply, so we need supply. Doh. if(tokenSupply_ == 0){ return tokenPriceInitial_ - tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256...
/** * Return the buy price of 1 individual token. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 14367, 14915 ] }
57,085
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
buyPrice
function buyPrice() public view returns(uint256) { // our calculation relies on the token supply, so we need supply. Doh. if(tokenSupply_ == 0){ return tokenPriceInitial_ + tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 ...
/** * Return the sell price of 1 individual token. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 14993, 15540 ] }
57,086
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
calculateTokensReceived
function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { uint256 _dividends = SafeMath.div(_ethereumToSpend, dividendFee_); uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);...
/** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 15656, 16059 ] }
57,087
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
calculateEthereumReceived
function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { require(_tokensToSell <= tokenSupply_); uint256 _ethereum = tokensToEthereum_(_tokensToSell); uint256 _dividends = SafeMath.div(_ethereum, dividendFee_); uint256 _taxedEthereum = SafeMath.sub(...
/** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 16176, 16595 ] }
57,088
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
purchaseTokens
function purchaseTokens(uint256 _incomingEthereum, address _referredBy) antiEarlyWhale(_incomingEthereum) internal returns(uint256) { // data setup address _customerAddress = msg.sender; uint256 _undividedDividends = SafeMath.div(_incomingEthereum, dividendFee_); uint256 _referralBon...
/*========================================== = INTERNAL FUNCTIONS = ==========================================*/
Comment
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 16758, 20207 ] }
57,089
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
ethereumToTokens_
function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18; uint256 _tokensReceived = ( ( // underflow attempts BTFO SafeMath.sub( (sqrt ( ...
/** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 20498, 21479 ] }
57,090
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
tokensToEthereum_
function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) uint256 tokens_ = (_tokens + 1e18); uint256 _tokenSupply = (tokenSupply_ + 1e18); uint256 _etherReceived = ( // underflow attempts BTFO SafeMath.sub( ( ( ...
/** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 21740, 22468 ] }
57,091
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
Fomo3D
contract Fomo3D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStro...
/* Team JUST presents... ______ ________ ________ | ___| _ | \/ | _ | | |_ | | | | | | | | | _| | | | | |\/| | | | | | | \ \_/ / | | \ \_/ / \_| \___/\_| |_/\___/ ___________ |____ | _ \ / / | | | \ \ | | | ____/ / |/ ...
Comment
sqrt
function sqrt(uint x) internal pure returns (uint y) { uint z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } }
//This is where all your gas goes, sorry //Not sorry, you probably only paid 1 gwei
LineComment
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 22575, 22778 ] }
57,092
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 95, 308 ] }
57,093
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 398, 691 ] }
57,094
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 812, 940 ] }
57,095
Fomo3D
Fomo3D.sol
0xc62b165f2e317be858c10e651914d44a3c376776
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://beb322e1dddc49abd331ce36f74ac01bd649088624b9591da168af3a653298e6
{ "func_code_index": [ 1010, 1162 ] }
57,096
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 94, 154 ] }
57,097
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 237, 310 ] }
57,098
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 534, 616 ] }
57,099
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 895, 983 ] }
57,100
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 1647, 1726 ] }
57,101
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 2039, 2141 ] }
57,102
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 259, 445 ] }
57,103
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 723, 864 ] }
57,104
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 1162, 1359 ] }
57,105
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 1613, 2089 ] }
57,106
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 2560, 2697 ] }
57,107
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @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); 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
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 3188, 3471 ] }
57,108
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 3931, 4066 ] }
57,109
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 4546, 4717 ] }
57,110
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @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
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 606, 1033 ] }
57,111
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 1963, 2365 ] }
57,112
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 3121, 3299 ] }
57,113
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 3524, 3725 ] }
57,114
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 4095, 4326 ] }
57,115
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 4577, 4898 ] }
57,116
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line ...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 747, 1374 ] }
57,117
FaaSRewardFund
FaaSRewardFund.sol
0x5f53335197e360de56c7ba77f6a45f3e259b1a7d
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e06b2eeac5abf2a0b80359b2cb9fd2acb36fb17ddf46a9d014f8861320b46135
{ "func_code_index": [ 2393, 3159 ] }
57,118
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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 r...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 104, 168 ] }
57,119
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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 r...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 261, 338 ] }
57,120
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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 r...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 584, 670 ] }
57,121
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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 r...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 971, 1063 ] }
57,122
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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 r...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 1770, 1853 ] }
57,123
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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 r...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 2194, 2300 ] }
57,124
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 290, 496 ] }
57,125
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 805, 958 ] }
57,126
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 1287, 1504 ] }
57,127
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 1789, 2309 ] }
57,128
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 2817, 2966 ] }
57,129
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 3494, 3801 ] }
57,130
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 4298, 4445 ] }
57,131
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 4962, 5149 ] }
57,132
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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. * * Amon...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 658, 1322 ] }
57,133
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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. * * Amon...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 2301, 2727 ] }
57,134
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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. * * Amon...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 3538, 3726 ] }
57,135
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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. * * Amon...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 3970, 4183 ] }
57,136
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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. * * Amon...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 4587, 4830 ] }
57,137
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
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. * * Amon...
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
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 5100, 5437 ] }
57,138
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 622, 718 ] }
57,139
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 1324, 1493 ] }
57,140
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 1656, 1925 ] }
57,141
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
lock
function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); }
//Locks the contract for owner for the amount of time provided
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 2109, 2352 ] }
57,142
LittleETHRidingHood
LittleETHRidingHood.sol
0xe16702d210e46dd37f63f353327955362b53fe61
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
unlock
function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; }
//Unlocks the contract for owner when _lockTime is exceeds
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://d554cebe2bbfa9e7e4b724f3e393497efd20c086da2b6ee23ed1c1c1d925c4c0
{ "func_code_index": [ 2431, 2753 ] }
57,143
Nookoin
Nookoin.sol
0x7b4f2f69abf9d217dc82a24761508b7e35477f93
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
LineComment
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance);
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://916df48c588579826a40305138e79d73408789a7cba8a510a1665ec24aed00a9
{ "func_code_index": [ 638, 716 ] }
57,144
Nookoin
Nookoin.sol
0x7b4f2f69abf9d217dc82a24761508b7e35477f93
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
LineComment
transfer
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://916df48c588579826a40305138e79d73408789a7cba8a510a1665ec24aed00a9
{ "func_code_index": [ 953, 1035 ] }
57,145
Nookoin
Nookoin.sol
0x7b4f2f69abf9d217dc82a24761508b7e35477f93
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
LineComment
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://916df48c588579826a40305138e79d73408789a7cba8a510a1665ec24aed00a9
{ "func_code_index": [ 1358, 1459 ] }
57,146
Nookoin
Nookoin.sol
0x7b4f2f69abf9d217dc82a24761508b7e35477f93
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
LineComment
approve
function approve(address _spender, uint256 _value) public returns (bool success);
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://916df48c588579826a40305138e79d73408789a7cba8a510a1665ec24aed00a9
{ "func_code_index": [ 1749, 1835 ] }
57,147
Nookoin
Nookoin.sol
0x7b4f2f69abf9d217dc82a24761508b7e35477f93
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
LineComment
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://916df48c588579826a40305138e79d73408789a7cba8a510a1665ec24aed00a9
{ "func_code_index": [ 2043, 2141 ] }
57,148
Nookoin
Nookoin.sol
0x7b4f2f69abf9d217dc82a24761508b7e35477f93
Solidity
Nookoin
contract Nookoin is EIP20Interface { uint256 constant private MAX_UINT256 = 2**256 - 1; mapping (address => uint256) public balances; mapping (address => mapping (address => uint256)) public allowed; /* NOTE: The following variables are OPTIONAL vanities. One does not have to include the...
//import "./EIP20Interface.sol";
LineComment
Nookoin
function Nookoin( uint256 _initialAmount, //1000000 string _tokenName, //Nookoin uint8 _decimalUnits, //0 string _tokenSymbol //NKO ) public { balances[msg.sender] = _initialAmount; // Give the creator all initial tokens totalSuppl...
//An identifier: eg SBX
LineComment
v0.4.21+commit.dfe3193c
bzzr://916df48c588579826a40305138e79d73408789a7cba8a510a1665ec24aed00a9
{ "func_code_index": [ 724, 1454 ] }
57,149
FeedFactory
FeedFactory.sol
0x435ad5cae6ea3e065ce540464366b71fba8f0c52
Solidity
DSMath
contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x); } function mul(uint x, uint y) internal pure returns (uint z) { requir...
rpow
function rpow(uint x, uint n) internal pure returns (uint z) { z = n % 2 != 0 ? x : RAY; for (n /= 2; n != 0; n /= 2) { x = rmul(x, x); if (n % 2 != 0) { z = rmul(z, x); } } }
// This famous algorithm is called "exponentiation by squaring" // and calculates x^n with x as fixed-point and n as regular unsigned. // // It's O(log n), instead of O(n) for naive repeated multiplication. // // These facts are why it works: // // If n is even, then x^n = (x^2)^(n/2). // If n is odd, then x^n = x *...
LineComment
v0.4.18+commit.9cf6e910
bzzr://925e9b4a73219707403ee6d05a1e5fd498fe1b1b0303b079820bbdb7e9399046
{ "func_code_index": [ 1905, 2177 ] }
57,150
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
NeckCoin
function NeckCoin() public { symbol = "NECK"; name = "Neck Coin"; decimals = 18; _totalSupply = 300000000000000000000000000000; balances[0x3503F567B04a12F36069f21e0c3317BA9c23c1DC] = _totalSupply; Transfer(address(0), 0x3503F567B04a12F36069f21e0c3317BA9c23c1DC, _totalSupply); }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 455, 797 ] }
57,151
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 985, 1106 ] }
57,152
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 1326, 1455 ] }
57,153
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 1799, 2076 ] }
57,154
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 2584, 2792 ] }
57,155
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 3323, 3681 ] }
57,156
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 3964, 4120 ] }
57,157
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 4475, 4792 ] }
57,158
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 4984, 5043 ] }
57,159
NeckCoin
NeckCoin.sol
0xc67e01f0b416b884a2896fae3401e86d605ba47e
Solidity
NeckCoin
contract NeckCoin is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://363ec61b87bc88dc1bf8c2b94a134e4ae209f99964cf285d86066475b6f169bf
{ "func_code_index": [ 5276, 5465 ] }
57,160