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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Voyager | Voyager.sol | 0xdeadab7c1324c0614e1512e3034bddd44f7fface | Solidity | Voyager | contract Voyager is ERC721A, Ownable, ReentrancyGuard, Pausable {
using Strings for uint256;
uint256 public supply = 5000;
uint256 public price = 0.25 ether;
string public placeholder = "https://ipfs.io/ipfs/QmRxT8xRjgYeKGf6uuryz7d8os12gp9M6Z4Sg1Yf3wm5fo/";
string public uri;
address pub... | adminMint | function adminMint(uint256 quantity, address to) external adminOrOwner {
require(totalSupply() + quantity <= supply , "Exceeds supply");
_safeMint(to, quantity);
}
| /**
@dev adminMint used to mint prior the sale starts
- to create collection
- gift to recipients
- reimburse users
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
917,
1116
]
} | 11,900 | ||||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/FinalizableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | FinalizableCrowdsale | contract FinalizableCrowdsale is TimedCrowdsale {
using SafeMath for uint256;
bool private _finalized;
event CrowdsaleFinalized();
constructor () internal {
_finalized = false;
}
/**
* @return true if the crowdsale is finalized, false otherwise.
*/
function finalized() ... | /**
* @title FinalizableCrowdsale
* @dev Extension of TimedCrowdsale with a one-off finalization action, where one
* can do extra work after finishing.
*/ | NatSpecMultiLine | finalized | function finalized() public view returns (bool) {
return _finalized;
}
| /**
* @return true if the crowdsale is finalized, false otherwise.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
295,
381
]
} | 11,901 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/FinalizableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | FinalizableCrowdsale | contract FinalizableCrowdsale is TimedCrowdsale {
using SafeMath for uint256;
bool private _finalized;
event CrowdsaleFinalized();
constructor () internal {
_finalized = false;
}
/**
* @return true if the crowdsale is finalized, false otherwise.
*/
function finalized() ... | /**
* @title FinalizableCrowdsale
* @dev Extension of TimedCrowdsale with a one-off finalization action, where one
* can do extra work after finishing.
*/ | NatSpecMultiLine | finalize | function finalize() public {
require(!_finalized, "FinalizableCrowdsale: already finalized");
//require(hasClosed(), "FinalizableCrowdsale: not closed");
_finalized = true;
_finalization();
emit CrowdsaleFinalized();
}
| /**
* @dev Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
535,
803
]
} | 11,902 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/FinalizableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | FinalizableCrowdsale | contract FinalizableCrowdsale is TimedCrowdsale {
using SafeMath for uint256;
bool private _finalized;
event CrowdsaleFinalized();
constructor () internal {
_finalized = false;
}
/**
* @return true if the crowdsale is finalized, false otherwise.
*/
function finalized() ... | /**
* @title FinalizableCrowdsale
* @dev Extension of TimedCrowdsale with a one-off finalization action, where one
* can do extra work after finishing.
*/ | NatSpecMultiLine | _finalization | function _finalization() internal {
// solhint-disable-previous-line no-empty-blocks
}
| /**
* @dev Can be overridden to add finalization logic. The overriding function
* should call super._finalization() to ensure the chain of finalization is
* executed entirely.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1008,
1110
]
} | 11,903 | ||
NeonToken | contracts/TokenExchange.sol | 0xa0167dc7b0c4dc372209b067203c1b393073cab4 | Solidity | TokenExchange | contract TokenExchange is Owned {
uint256 internal constant initialBuyPrice = 1400000000000000;
uint256 internal priceIncrement = 550000000;
uint256 internal buyPrice;
StandardToken internal token;
event BuyEvent(
address wallet,
uint256 amount
);
... | setBuyPrice | function setBuyPrice(uint256 newBuyPrice) onlyOwner public {
buyPrice = newBuyPrice;
}
| /// @notice Allow users to buy tokens for `newBuyPrice` eth
/// @param newBuyPrice Price users can buy from the contract | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://77d0efea114e9d1013628cc111daec0e2c5d2c099b174b052d63ee19d587063b | {
"func_code_index": [
843,
948
]
} | 11,904 | |||
NeonToken | contracts/TokenExchange.sol | 0xa0167dc7b0c4dc372209b067203c1b393073cab4 | Solidity | TokenExchange | contract TokenExchange is Owned {
uint256 internal constant initialBuyPrice = 1400000000000000;
uint256 internal priceIncrement = 550000000;
uint256 internal buyPrice;
StandardToken internal token;
event BuyEvent(
address wallet,
uint256 amount
);
... | buy | function buy(uint256 amount) payable public {
require(msg.value == getTotalCost(amount));
token.increaseApproval(this, amount);
token.transferFrom(this, msg.sender, amount);
// makes the transfers
buyPrice = SafeMath.add(buyPrice, SafeMath.mul(priceIncrement, amount));
emit BuyEvent(msg.se... | /// @notice Buy tokens from contract by sending ether | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://77d0efea114e9d1013628cc111daec0e2c5d2c099b174b052d63ee19d587063b | {
"func_code_index": [
1141,
1511
]
} | 11,905 | |||
NeonToken | contracts/TokenExchange.sol | 0xa0167dc7b0c4dc372209b067203c1b393073cab4 | Solidity | TokenExchange | contract TokenExchange is Owned {
uint256 internal constant initialBuyPrice = 1400000000000000;
uint256 internal priceIncrement = 550000000;
uint256 internal buyPrice;
StandardToken internal token;
event BuyEvent(
address wallet,
uint256 amount
);
... | getTotalCost | function getTotalCost(uint256 amount) public view returns (uint256){
return SafeMath.add(
SafeMath.mul(buyPrice, amount),
SafeMath.div(SafeMath.mul(priceIncrement, SafeMath.mul(SafeMath.add(amount, 1), amount)), 2));
}
| // calculate the amount of ETH needed to buy "amount" of token | LineComment | v0.4.24+commit.e67f0147 | bzzr://77d0efea114e9d1013628cc111daec0e2c5d2c099b174b052d63ee19d587063b | {
"func_code_index": [
1584,
1847
]
} | 11,906 | |||
NeonToken | contracts/TokenExchange.sol | 0xa0167dc7b0c4dc372209b067203c1b393073cab4 | Solidity | TokenExchange | contract TokenExchange is Owned {
uint256 internal constant initialBuyPrice = 1400000000000000;
uint256 internal priceIncrement = 550000000;
uint256 internal buyPrice;
StandardToken internal token;
event BuyEvent(
address wallet,
uint256 amount
);
... | getBuyPrice | function getBuyPrice() view public returns (uint){
return buyPrice;
}
| // calculate the amount of ETH received after selling "amount" of token | LineComment | v0.4.24+commit.e67f0147 | bzzr://77d0efea114e9d1013628cc111daec0e2c5d2c099b174b052d63ee19d587063b | {
"func_code_index": [
1929,
2017
]
} | 11,907 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
95,
346
]
} | 11,908 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
require(b <= a, "SafeMath sub failed");
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
466,
638
]
} | 11,909 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
c = a + b;
require(c >= a, "SafeMath add failed");
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
708,
898
]
} | 11,910 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | sqrt | function sqrt(uint256 x)
internal
pure
returns (uint256 y)
{
uint256 z = ((add(x,1)) / 2);
y = x;
while (z < y)
{
y = z;
z = ((add((x / z),z)) / 2);
}
}
| /**
* @dev gives square root of given x.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
962,
1215
]
} | 11,911 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | sq | function sq(uint256 x)
internal
pure
returns (uint256)
{
return (mul(x,x));
}
| /**
* @dev gives square. multiplies x by x
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
1281,
1397
]
} | 11,912 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | pwr | function pwr(uint256 x, uint256 y)
internal
pure
returns (uint256)
{
if (x==0)
return (0);
else if (y==0)
return (1);
else
{
uint256 z = x;
for (uint256 i=1; i < y; i++)
z = mul(z,x);
return (z);
}
}
| /**
* @dev x to the power of y
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
1451,
1807
]
} | 11,913 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | NameFilter | library NameFilter {
/**
* @dev filters name strings
* -converts uppercase to lower case.
* -makes sure it does not start/end with a space
* -makes sure it does not contain multiple spaces in a row
* -cannot be only numbers
* -cannot start with 0x
* -restricts characters... | nameFilter | function nameFilter(string _input)
internal
pure
returns(bytes32)
{
bytes memory _temp = bytes(_input);
uint256 _length = _temp.length;
//sorry limited to 32 characters
require (_length <= 32 && _length > 0, "string must be between 1 and 32 characters");
// make sure it doesnt start with ... | /**
* @dev filters name strings
* -converts uppercase to lower case.
* -makes sure it does not start/end with a space
* -makes sure it does not contain multiple spaces in a row
* -cannot be only numbers
* -cannot start with 0x
* -restricts characters to A-Z, a-z, 0-9, and space.
* @return reprocessed st... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
413,
2703
]
} | 11,914 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
815,
932
]
} | 11,915 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
1097,
1205
]
} | 11,916 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
1343,
1521
]
} | 11,917 | |
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | function()
isActivated()
isHuman()
isWithinLimits(msg.value)
public
payable
{
// set up our tx event data and determine if player is new or not
F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);
// fetch player id
uint256 _pID = pIDxAddr_[msg.sender];
// buy core... | /**
* @dev emergency buy uses last stored affiliate ID and team snek
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
5128,
5562
]
} | 11,918 | ||||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | buyXid | function buyXid(uint256 _affCode, uint256 _team)
isActivated()
isHuman()
isWithinLimits(msg.value)
public
payable
{
// set up our tx event data and determine if player is new or not
F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);
// fetch player id
uint256 _pID = pID... | /**
* @dev converts all incoming ethereum to keys.
* -functionhash- 0x8f38f309 (using ID for affiliate)
* -functionhash- 0x98a0871d (using address for affiliate)
* -functionhash- 0xa65b37a1 (using name for affiliate)
* @param _affCode the ID/address/name of the player who gets the affiliate fee
* @param _te... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
5963,
7014
]
} | 11,919 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | reLoadXid | function reLoadXid(uint256 _affCode, uint256 _team, uint256 _eth)
isActivated()
isHuman()
isWithinLimits(_eth)
public
{
// set up our tx event data
F3Ddatasets.EventReturns memory _eventData_;
// fetch player ID
uint256 _pID = pIDxAddr_[msg.sender];
// manage affiliate residuals
/... | /**
* @dev essentially the same as buy, but instead of you sending ether
* from your wallet, it uses your unwithdrawn earnings.
* -functionhash- 0x349cdcac (using ID for affiliate)
* -functionhash- 0x82bfc739 (using address for affiliate)
* -functionhash- 0x079ce327 (using name for affiliate)
* @param _affC... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
10082,
11078
]
} | 11,920 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | withdraw | function withdraw()
isActivated()
isHuman()
public
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// fetch player ID
uint256 _pID = pIDxAddr_[msg.sender];
// setup temp var for player eth
uint256 _eth;
// check to see if round has ende... | /**
* @dev withdraws all of your earnings.
* -functionhash- 0x3ccfd60b
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
13572,
15660
]
} | 11,921 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | registerNameXID | function registerNameXID(string _nameString, uint256 _affCode, bool _all)
isHuman()
public
payable
{
bytes32 _name = _nameString.nameFilter();
address _addr = msg.sender;
uint256 _paid = msg.value;
(bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXIDFromDapp.value(_paid)(_addr, _name... | /**
* @dev use these to register names. they are just wrappers that will send the
* registration requests to the PlayerBook contract. So registering here is the
* same as registering there. UI will always display the last name you registered.
* but you will still own all previously registered names to use as... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
16874,
17454
]
} | 11,922 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | getBuyPrice | function getBuyPrice()
public
view
returns(uint256)
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// are we in a round?
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
... | /**
* @dev return the price buyer will pay for next 1 individual key.
* -functionhash- 0x018a25e8
* @return price for next key bought (in wei format)
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
18829,
19394
]
} | 11,923 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | getTimeLeft | function getTimeLeft()
public
view
returns(uint256)
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
if (_now < round_[_rID].end)
if (_now > round_[_rID].strt + rndGap_)
return( (round_[_rID].end).sub(_now) );
else
re... | /**
* @dev returns time left. dont spam this, you'll ddos yourself from your node
* provider
* -functionhash- 0xc7e284b8
* @return time left in seconds
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
19588,
20058
]
} | 11,924 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | getPlayerVaults | function getPlayerVaults(uint256 _pID)
public
view
returns(uint256 ,uint256, uint256)
{
// setup local rID
uint256 _rID = rID_;
// if round has ended. but round end has not been run (so contract has not distributed winnings)
if (now > round_[_rID].end && round_[_rID].ended == false && round_[... | /**
* @dev returns player earnings per vaults
* -functionhash- 0x63066434
* @return winnings vault
* @return general vault
* @return affiliate vault
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
20254,
21665
]
} | 11,925 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | getPlayerVaultsHelper | function getPlayerVaultsHelper(uint256 _pID, uint256 _rID)
private
view
returns(uint256)
{
return( ((((round_[_rID].mask).add(((((round_[_rID].pot).mul(potSplit_[round_[_rID].team].gen)) / 100).mul(1000000000000000000)) / (round_[_rID].keys))).mul(plyrRnds_[_pID][_rID].keys)) / 1000000000000000000) );
}
| /**
* solidity hates stack limits. this lets us avoid that hate
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
21753,
22098
]
} | 11,926 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | getCurrentRoundInfo | function getCurrentRoundInfo()
public
view
returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, address, bytes32, uint256, uint256, uint256, uint256, uint256)
{
// setup local rID
uint256 _rID = rID_;
return
(
round_[_rID].ico, //0
_rID, ... | /**
* @dev returns all current round info needed for front end
* -functionhash- 0x747dff42
* @return eth invested during ICO phase
* @return round id
* @return total keys for round
* @return time round ends
* @return time round started
* @return current pot
* @return current team ID & player ID in lea... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
22771,
23754
]
} | 11,927 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | getPlayerInfoByAddress | function getPlayerInfoByAddress(address _addr)
public
view
returns(uint256, bytes32, uint256, uint256, uint256, uint256, uint256)
{
// setup local rID
uint256 _rID = rID_;
if (_addr == address(0))
{
_addr == msg.sender;
}
uint256 _pID = pIDxAddr_[_addr];
return
(... | /**
* @dev returns player info based on address. if no address is given, it will
* use msg.sender
* -functionhash- 0xee0b5d8b
* @param _addr address of the player you want to lookup
* @return player ID
* @return player name
* @return keys owned (current round)
* @return winnings vault
* @return gener... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
24198,
24976
]
} | 11,928 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | buyCore | function buyCore(uint256 _pID, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// if round is active
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (... | /**
* @dev logic runs whenever a buy order is executed. determines how to handle
* incoming eth depending on if we are in an active round or not
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
25151,
27007
]
} | 11,929 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | reLoadCore | function reLoadCore(uint256 _pID, uint256 _affID, uint256 _team, uint256 _eth, F3Ddatasets.EventReturns memory _eventData_)
private
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// if round is active
if (_now > round_[_rID].strt + rndGap_ && (_now <= roun... | /**
* @dev logic runs whenever a reload order is executed. determines how to handle
* incoming eth depending on if we are in an active round or not
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
27185,
29051
]
} | 11,930 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | core | function core(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
{
// if player is new to round
if (plyrRnds_[_pID][_rID].keys == 0)
_eventData_ = managePlayer(_pID, _eventData_);
// early round eth limiter
if (r... | /**
* @dev this is the core logic for any buy/reload that happens while a round
* is live.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
29171,
34010
]
} | 11,931 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | calcUnMaskedEarnings | function calcUnMaskedEarnings(uint256 _pID, uint256 _rIDlast)
private
view
returns(uint256)
{
return( (((round_[_rIDlast].mask).mul(plyrRnds_[_pID][_rIDlast].keys)) / (1000000000000000000)).sub(plyrRnds_[_pID][_rIDlast].mask) );
}
| /**
* @dev calculates unmasked earnings (just calculates, does not update mask)
* @return earnings in wei format
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
34150,
34421
]
} | 11,932 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | calcKeysReceived | function calcKeysReceived(uint256 _rID, uint256 _eth)
public
view
returns(uint256)
{
// grab time
uint256 _now = now;
// are we in a round?
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
return ( (round_[_rI... | /**
* @dev returns the amount of keys you would get given an amount of eth.
* -functionhash- 0xce89c80c
* @param _rID round ID you want price for
* @param _eth amount of eth sent in
* @return keys received
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
34674,
35160
]
} | 11,933 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | iWantXKeys | function iWantXKeys(uint256 _keys)
public
view
returns(uint256)
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// are we in a round?
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0... | /**
* @dev returns current eth price for X keys.
* -functionhash- 0xcf808000
* @param _keys number of keys desired (in 18 decimal format)
* @return amount of eth needed to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
35378,
35918
]
} | 11,934 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | receivePlayerInfo | function receivePlayerInfo(uint256 _pID, address _addr, bytes32 _name, uint256 _laff)
external
{
require (msg.sender == address(PlayerBook), "your not playerNames contract... hmmm..");
if (pIDxAddr_[_addr] != _pID)
pIDxAddr_[_addr] = _pID;
if (pIDxName_[_name] != _pID)
pIDxName_[_name... | /**
* @dev receives name/player info from names contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
36219,
36917
]
} | 11,935 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | receivePlayerNameList | function receivePlayerNameList(uint256 _pID, bytes32 _name)
external
{
require (msg.sender == address(PlayerBook), "your not playerNames contract... hmmm..");
if(plyrNames_[_pID][_name] == false)
plyrNames_[_pID][_name] = true;
}
| /**
* @dev receives entire player name list
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
36984,
37264
]
} | 11,936 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | determinePID | function determinePID(F3Ddatasets.EventReturns memory _eventData_)
private
returns (F3Ddatasets.EventReturns)
{
uint256 _pID = pIDxAddr_[msg.sender];
// if player is new to this version of fomo3d
if (_pID == 0)
{
// grab their player ID, name and last aff ID, from player names contract
... | /**
* @dev gets existing or registers new pID. use this when a player may be new
* @return pID
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
37389,
38509
]
} | 11,937 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | verifyTeam | function verifyTeam(uint256 _team)
private
pure
returns (uint256)
{
if (_team < 0 || _team > 3)
return(2);
else
return(_team);
}
| /**
* @dev checks to make sure user picked a valid team. if not sets team
* to default (sneks)
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
38634,
38836
]
} | 11,938 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | managePlayer | function managePlayer(uint256 _pID, F3Ddatasets.EventReturns memory _eventData_)
private
returns (F3Ddatasets.EventReturns)
{
// if player has played a previous round, move their unmasked earnings
// from that round to gen vault.
if (plyr_[_pID].lrnd != 0)
updateGenVault(_pID, plyr_[_pID].lrn... | /**
* @dev decides if round end needs to be run & new round started. and if
* player unmasked earnings from previously played rounds need to be moved.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
39017,
39613
]
} | 11,939 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | endRound | function endRound(F3Ddatasets.EventReturns memory _eventData_)
private
returns (F3Ddatasets.EventReturns)
{
// setup local rID
uint256 _rID = rID_;
// grab our winning player and team id's
uint256 _winPID = round_[_rID].plyr;
uint256 _winTID = round_[_rID].team;
// grab our pot amou... | /**
* @dev ends the round. manages paying out winner/splitting up pot
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
39706,
42036
]
} | 11,940 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | updateGenVault | function updateGenVault(uint256 _pID, uint256 _rIDlast)
private
{
uint256 _earnings = calcUnMaskedEarnings(_pID, _rIDlast);
if (_earnings > 0)
{
// put in gen vault
plyr_[_pID].gen = _earnings.add(plyr_[_pID].gen);
// zero out their earnings by updating mask
plyrRnds... | /**
* @dev moves any unmasked earnings to gen vault. updates earnings mask
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
42135,
42585
]
} | 11,941 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | updateTimer | function updateTimer(uint256 _keys, uint256 _rID)
private
{
// grab time
uint256 _now = now;
// calculate time based on number of keys bought
uint256 _newTime;
if (_now > round_[_rID].end && round_[_rID].plyr == 0)
_newTime = (((_keys) / (1000000000000000000)).mul(rndInc_)).add(_no... | /**
* @dev updates round timer based on number of whole keys bought.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
42677,
43356
]
} | 11,942 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | airdrop | function airdrop()
private
view
returns(bool)
{
uint256 seed = uint256(keccak256(abi.encodePacked((block.timestamp).add(block.difficulty).add((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)).add(block.gaslimit).add((uint256(keccak256(abi.encodePacked(msg.sender)))) / (now)).add(block.number))));... | /**
* @dev generates a random number between 0-99 and checks to see if thats
* resulted in an airdrop win
* @return do we have a winner?
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
43528,
44012
]
} | 11,943 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | distributeExternal | function distributeExternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
// pay 2% out to community rewards
uint256 _com = _eth / 50;
// distribute share to affiliate
uint256 _af... | /**
* @dev distributes eth based on fees to com, aff, and p3d
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
44097,
45149
]
} | 11,944 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | distributeInternal | function distributeInternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _team, uint256 _keys, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
// calculate gen share
uint256 _gen = (_eth.mul(fees_[_team].gen)) / 100;
// toss 1% into airdrop pot
uint... | /**
* @dev distributes eth based on fees to gen and pot
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
45479,
46594
]
} | 11,945 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | updateMasks | function updateMasks(uint256 _rID, uint256 _pID, uint256 _gen, uint256 _keys)
private
returns(uint256)
{
/* MASKING NOTES
earnings masks are a tricky thing for people to wrap their minds around.
the basic thing to understand here. is were going to have a global
tracker based on profi... | /**
* @dev updates masks for round and player when keys are bought
* @return dust left over
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
46715,
48103
]
} | 11,946 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | withdrawEarnings | function withdrawEarnings(uint256 _pID)
private
returns(uint256)
{
// update gen vault
updateGenVault(_pID, plyr_[_pID].lrnd);
// from vaults
uint256 _earnings = (plyr_[_pID].win).add(plyr_[_pID].gen).add(plyr_[_pID].aff);
if (_earnings > 0)
{
plyr_[_pID].win = 0;
pl... | /**
* @dev adds up unmasked earnings, & vault earnings, sets them all to 0
* @return earnings in wei format
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
48240,
48709
]
} | 11,947 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | FoMoJP | contract FoMoJP is modularLong, Ownable {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcLong for uint256;
// otherFoMo3D private otherF3D_;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x24a0e6BD446CF4c76C5f456f7754055d75c45ecF);
//========... | endTx | function endTx(uint256 _pID, uint256 _team, uint256 _eth, uint256 _keys, F3Ddatasets.EventReturns memory _eventData_)
private
{
_eventData_.compressedData = _eventData_.compressedData + (now * 1000000000000000000) + (_team * 100000000000000000000000000000);
_eventData_.compressedIDs = _eventData_.compressed... | /**
* @dev prepares compression data and fires event for buy or reload tx's
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
48808,
49779
]
} | 11,948 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | F3DKeysCalcLong | library F3DKeysCalcLong {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _ne... | keysRec | function keysRec(uint256 _curEth, uint256 _newEth)
internal
pure
returns (uint256)
{
return(keys((_curEth).add(_newEth)).sub(keys(_curEth)));
}
| /**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
271,
453
]
} | 11,949 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | F3DKeysCalcLong | library F3DKeysCalcLong {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _ne... | ethRec | function ethRec(uint256 _curKeys, uint256 _sellKeys)
internal
pure
returns (uint256)
{
return((eth(_curKeys)).sub(eth(_curKeys.sub(_sellKeys))));
}
| /**
* @dev calculates amount of eth received if you sold X keys
* @param _curKeys current amount of keys that exist
* @param _sellKeys amount of keys you wish to sell
* @return amount of eth received
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
694,
880
]
} | 11,950 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | F3DKeysCalcLong | library F3DKeysCalcLong {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _ne... | keys | function keys(uint256 _eth)
internal
pure
returns(uint256)
{
return ((((((_eth).mul(1000000000000000000)).mul(312500000000000000000000000)).add(5624988281256103515625000000000000000000000000000000000000000000)).sqrt()).sub(74999921875000000000000000000000)) / (156250000);
}
| /**
* @dev calculates how many keys would exist with given an amount of eth
* @param _eth eth "in contract"
* @return number of keys that would exist
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
1065,
1378
]
} | 11,951 | |||
FoMoJP | FoMoJP.sol | 0xcb47c89cb17c10b719fc5ed9665bae157cac2cb1 | Solidity | F3DKeysCalcLong | library F3DKeysCalcLong {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _ne... | eth | function eth(uint256 _keys)
internal
pure
returns(uint256)
{
return ((78125000).mul(_keys.sq()).add(((149999843750000).mul(_keys.mul(1000000000000000000))) / (2))) / ((1000000000000000000).sq());
}
| /**
* @dev calculates how much eth would be in contract given a number of keys
* @param _keys number of keys "in contract"
* @return eth that would exists
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9768a1325923af2a3736988afe71d90168d1509d4eb668cead2e2321a47af04e | {
"func_code_index": [
1568,
1804
]
} | 11,952 | |||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/RefundableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundableCrowdsale | contract RefundableCrowdsale is FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;
/**
* @dev Constructor, creates RefundEsc... | /**
* @title RefundableCrowdsale
* @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users
* getting a refund if goal is not met.
*
* Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal
* is met, the... | NatSpecMultiLine | goal | function goal() public view returns (uint256) {
return _goal;
}
| /**
* @return minimum amount of funds to be raised in wei.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
742,
821
]
} | 11,953 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/RefundableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundableCrowdsale | contract RefundableCrowdsale is FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;
/**
* @dev Constructor, creates RefundEsc... | /**
* @title RefundableCrowdsale
* @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users
* getting a refund if goal is not met.
*
* Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal
* is met, the... | NatSpecMultiLine | claimRefund | function claimRefund(address payable refundee) public {
require(finalized(), "RefundableCrowdsale: not finalized");
require(!goalReached(), "RefundableCrowdsale: goal reached");
_escrow.withdraw(refundee);
}
| /**
* @dev Investors can claim refunds here if crowdsale is unsuccessful.
* @param refundee Whose refund will be claimed.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
967,
1207
]
} | 11,954 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/RefundableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundableCrowdsale | contract RefundableCrowdsale is FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;
/**
* @dev Constructor, creates RefundEsc... | /**
* @title RefundableCrowdsale
* @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users
* getting a refund if goal is not met.
*
* Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal
* is met, the... | NatSpecMultiLine | goalReached | function goalReached() public view returns (bool) {
return weiRaised() >= _goal;
}
| /**
* @dev Checks whether funding goal was reached.
* @return Whether funding goal was reached
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1326,
1424
]
} | 11,955 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/RefundableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundableCrowdsale | contract RefundableCrowdsale is FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;
/**
* @dev Constructor, creates RefundEsc... | /**
* @title RefundableCrowdsale
* @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users
* getting a refund if goal is not met.
*
* Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal
* is met, the... | NatSpecMultiLine | _finalization | function _finalization() internal {
if (goalReached()) {
//escrow used to get transferred here, but that allows people to withdraw tokens before LP is created
} else {
_escrow.enableRefunds();
}
super._finalization();
}
| /**
* @dev Escrow finalization task, called when finalize() is called.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1514,
1798
]
} | 11,956 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/RefundableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundableCrowdsale | contract RefundableCrowdsale is FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;
/**
* @dev Constructor, creates RefundEsc... | /**
* @title RefundableCrowdsale
* @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users
* getting a refund if goal is not met.
*
* Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal
* is met, the... | NatSpecMultiLine | withdrawETH | function withdrawETH() onlyOwner public {
require(goalReached(), "RefundableCrowdsale: goal not reached");
//require(hasClosed(), "PostDeliveryCrowdsale: not closed");
_escrow.close();
_escrow.beneficiaryWithdraw();
}
| /**
* @dev Escrow withdraw, called seperately from finalize().
This is called prior to finalize() to allow ETH + Token to be added to LP. Once added, finalize can be called
to allow token withdrawal and trading.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
2053,
2307
]
} | 11,957 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/RefundableCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundableCrowdsale | contract RefundableCrowdsale is FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;
/**
* @dev Constructor, creates RefundEsc... | /**
* @title RefundableCrowdsale
* @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users
* getting a refund if goal is not met.
*
* Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal
* is met, the... | NatSpecMultiLine | _forwardFunds | function _forwardFunds() internal {
_escrow.deposit.value(msg.value)(msg.sender);
}
| /**
* @dev Overrides Crowdsale fund forwarding, sending funds to escrow.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
2399,
2498
]
} | 11,958 | ||
KyberConverter | contracts/libs/SafeTransfer.sol | 0xb26177640eb73b0ac8d6b7f298e40764eff52bdc | Solidity | SafeTransfer | library SafeTransfer {
/**
* @dev Transfer token for a specified address
* @param _token erc20 The address of the ERC20 contract
* @param _to address The address which you want to transfer to
* @param _value uint256 the _value of tokens to be transferred
*/
function safeTransfer(IERC2... | /**
* @dev Library to perform transfer for ERC20 tokens.
* Not all the tokens transfer method has a return value (bool) neither revert for insufficient funds or
* unathorized _value
*/ | NatSpecMultiLine | safeTransfer | function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {
uint256 prevBalance = _token.balanceOf(address(this));
require(prevBalance >= _value, "Insufficient funds");
_token.transfer(_to, _value);
require(prevBalance - _value == _token.balanceOf(address(this))... | /**
* @dev Transfer token for a specified address
* @param _token erc20 The address of the ERC20 contract
* @param _to address The address which you want to transfer to
* @param _value uint256 the _value of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69ba92e98511c1a8edf6aec2c862f0f4b932d5e4e43562938959c8cfa2c9f86a | {
"func_code_index": [
289,
682
]
} | 11,959 | |
KyberConverter | contracts/libs/SafeTransfer.sol | 0xb26177640eb73b0ac8d6b7f298e40764eff52bdc | Solidity | SafeTransfer | library SafeTransfer {
/**
* @dev Transfer token for a specified address
* @param _token erc20 The address of the ERC20 contract
* @param _to address The address which you want to transfer to
* @param _value uint256 the _value of tokens to be transferred
*/
function safeTransfer(IERC2... | /**
* @dev Library to perform transfer for ERC20 tokens.
* Not all the tokens transfer method has a return value (bool) neither revert for insufficient funds or
* unathorized _value
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
IERC20 _token,
address _from,
address _to,
uint256 _value
) internal returns (bool)
{
uint256 prevBalance = _token.balanceOf(_from);
require(prevBalance >= _value, "Insufficient funds");
require(_token.allowance(_from, address(this)) >= _value, "Insuff... | /**
* @dev Transfer tokens from one address to another
* @param _token erc20 The address of the ERC20 contract
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the _value of tokens to be transferred
*... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69ba92e98511c1a8edf6aec2c862f0f4b932d5e4e43562938959c8cfa2c9f86a | {
"func_code_index": [
1030,
1581
]
} | 11,960 | |
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | PostDeliveryCrowdsale | contract PostDeliveryCrowdsale is TimedCrowdsale, FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
mapping(address => uint256) private _balances;
__unstable__TokenVault private _vault;
constructor (uint256 goal) public {... | /**
* @title PostDeliveryCrowdsale
* @dev Crowdsale that locks tokens from withdrawal until it ends.
*/ | NatSpecMultiLine | withdrawTokens | function withdrawTokens(address beneficiary) public {
require(goalReached(), "RefundableCrowdsale: goal not reached");
//require(hasClosed(), "PostDeliveryCrowdsale: not closed");
require(finalized(), "Withdraw Tokens: crowdsale not finalized");
uint256 amount = _balances[beneficiary];
require(amount >... | /**
* @dev Withdraw tokens only after crowdsale ends.
* @param beneficiary Whose tokens will be withdrawn.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
587,
1172
]
} | 11,961 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | PostDeliveryCrowdsale | contract PostDeliveryCrowdsale is TimedCrowdsale, FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
mapping(address => uint256) private _balances;
__unstable__TokenVault private _vault;
constructor (uint256 goal) public {... | /**
* @title PostDeliveryCrowdsale
* @dev Crowdsale that locks tokens from withdrawal until it ends.
*/ | NatSpecMultiLine | goalReached | function goalReached() public view returns (bool) {
return weiRaised() >= _goal;
}
| /**
* @dev Checks whether funding goal was reached.
* @return Whether funding goal was reached
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1292,
1390
]
} | 11,962 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | PostDeliveryCrowdsale | contract PostDeliveryCrowdsale is TimedCrowdsale, FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
mapping(address => uint256) private _balances;
__unstable__TokenVault private _vault;
constructor (uint256 goal) public {... | /**
* @title PostDeliveryCrowdsale
* @dev Crowdsale that locks tokens from withdrawal until it ends.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @return the balance of an account.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1450,
1562
]
} | 11,963 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | PostDeliveryCrowdsale | contract PostDeliveryCrowdsale is TimedCrowdsale, FinalizableCrowdsale {
using SafeMath for uint256;
// minimum amount of funds to be raised in weis
uint256 private _goal;
mapping(address => uint256) private _balances;
__unstable__TokenVault private _vault;
constructor (uint256 goal) public {... | /**
* @title PostDeliveryCrowdsale
* @dev Crowdsale that locks tokens from withdrawal until it ends.
*/ | NatSpecMultiLine | _processPurchase | function _processPurchase(address beneficiary, uint256 tokenAmount) internal {
_balances[beneficiary] = _balances[beneficiary].add(tokenAmount);
// _deliverTokens(address(_vault), tokenAmount); //so taxes are avoided
}
| /**
* @dev Overrides parent by storing due balances, and delivering tokens to the vault instead of the end user. This
* ensures that the tokens will be available by the time they are withdrawn (which may not be the case if
* `_deliverTokens` was called later).
* @param beneficiary Token purchaser
* @param tokenAmo... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1947,
2188
]
} | 11,964 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/validation/TimedCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | TimedCrowdsale | contract TimedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* Event for crowdsale extending
* @param newClosingTime new closing time
* @param prevClosingTime old closing time
*/
event TimedCrowdsaleExtended(... | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/ | NatSpecMultiLine | openingTime | function openingTime() public view returns (uint256) {
return _openingTime;
}
| /**
* @return the crowdsale opening time.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1246,
1339
]
} | 11,965 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/validation/TimedCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | TimedCrowdsale | contract TimedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* Event for crowdsale extending
* @param newClosingTime new closing time
* @param prevClosingTime old closing time
*/
event TimedCrowdsaleExtended(... | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/ | NatSpecMultiLine | closingTime | function closingTime() public view returns (uint256) {
return _closingTime;
}
| /**
* @return the crowdsale closing time.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1400,
1493
]
} | 11,966 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/validation/TimedCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | TimedCrowdsale | contract TimedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* Event for crowdsale extending
* @param newClosingTime new closing time
* @param prevClosingTime old closing time
*/
event TimedCrowdsaleExtended(... | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/ | NatSpecMultiLine | isOpen | function isOpen() public view returns (bool) {
// solhint-disable-next-line not-rely-on-time
return block.timestamp >= _openingTime && block.timestamp <= _closingTime;
}
| /**
* @return true if the crowdsale is open, false otherwise.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1574,
1767
]
} | 11,967 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/validation/TimedCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | TimedCrowdsale | contract TimedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* Event for crowdsale extending
* @param newClosingTime new closing time
* @param prevClosingTime old closing time
*/
event TimedCrowdsaleExtended(... | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/ | NatSpecMultiLine | hasClosed | function hasClosed() public view returns (bool) {
// solhint-disable-next-line not-rely-on-time
return block.timestamp > _closingTime;
}
| /**
* @dev Checks whether the period in which the crowdsale is open has already elapsed.
* @return Whether crowdsale period has elapsed
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1927,
2087
]
} | 11,968 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/validation/TimedCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | TimedCrowdsale | contract TimedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* Event for crowdsale extending
* @param newClosingTime new closing time
* @param prevClosingTime old closing time
*/
event TimedCrowdsaleExtended(... | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/ | NatSpecMultiLine | _preValidatePurchase | function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal onlyWhileOpen view {
super._preValidatePurchase(beneficiary, weiAmount);
}
| /**
* @dev Extend parent behavior requiring to be within contributing period.
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
2276,
2445
]
} | 11,969 | ||
KojiCrowdSale | @openzeppelin/contracts/crowdsale/validation/TimedCrowdsale.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | TimedCrowdsale | contract TimedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* Event for crowdsale extending
* @param newClosingTime new closing time
* @param prevClosingTime old closing time
*/
event TimedCrowdsaleExtended(... | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/ | NatSpecMultiLine | _extendTime | function _extendTime(uint256 newClosingTime) internal {
require(!hasClosed(), "TimedCrowdsale: already closed");
// solhint-disable-next-line max-line-length
require(newClosingTime > _closingTime, "TimedCrowdsale: new closing time is before current closing time");
emit TimedCrowdsaleExtended(_closingTi... | /**
* @dev Extend crowdsale.
* @param newClosingTime Crowdsale closing time
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
2545,
2950
]
} | 11,970 | ||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
261,
321
]
} | 11,971 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
644,
820
]
} | 11,972 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | Contactable | contract Contactable is Ownable{
string public contactInformation;
/**
* @dev Allows the owner to set a string with their contact information.
* @param info The contact information to attach to the contract.
*/
function setContactInformation(string info) onlyOwner public {
... | setContactInformation | function setContactInformation(string info) onlyOwner public {
contactInformation = info;
}
| /**
* @dev Allows the owner to set a string with their contact information.
* @param info The contact information to attach to the contract.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
244,
356
]
} | 11,973 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
268,
659
]
} | 11,974 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
865,
977
]
} | 11,975 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
401,
853
]
} | 11,976 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
1485,
1675
]
} | 11,977 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
1999,
2130
]
} | 11,978 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
2596,
2860
]
} | 11,979 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
Approval(msg... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
3331,
3741
]
} | 11,980 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | MagnusCoin | contract MagnusCoin is StandardToken, Ownable, Contactable {
string public name = "Magnus Coin";
string public symbol = "MGS";
uint256 public constant decimals = 18;
mapping (address => bool) internal allowedOverrideAddresses;
bool public tokenActive = false;
uint256 endtime = 15... | approve | function approve(address _spender, uint256 _value) public onlyIfTokenActiveOrOverride onlyIfValidAddress(_spender) returns (bool) {
return super.approve(_spender, _value);
}
| /// @dev Same ERC20 behavior, but reverts if not yet active.
/// @param _spender address The address which will spend the funds.
/// @param _value uint256 The amount of tokens to be spent. | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
1495,
1687
]
} | 11,981 | |||
MagnusCoin | MagnusCoin.sol | 0x1a7cc52ca652ac5df72a7fa4b131cb9312dd3423 | Solidity | MagnusCoin | contract MagnusCoin is StandardToken, Ownable, Contactable {
string public name = "Magnus Coin";
string public symbol = "MGS";
uint256 public constant decimals = 18;
mapping (address => bool) internal allowedOverrideAddresses;
bool public tokenActive = false;
uint256 endtime = 15... | transfer | function transfer(address _to, uint256 _value) public onlyIfTokenActiveOrOverride onlyIfValidAddress(_to) returns (bool) {
return super.transfer(_to, _value);
}
| /// @dev Same ERC20 behavior, but reverts if not yet active.
/// @param _to address The address to transfer to.
/// @param _value uint256 The amount to be transferred. | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://4c8699023a7e7b9b6b63abe13255835ded8f6d78f080b13423f3f0ae3ce0ecd5 | {
"func_code_index": [
1873,
2052
]
} | 11,982 | |||
KojiCrowdSale | @openzeppelin/contracts/payment/escrow/RefundEscrow.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundEscrow | contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
... | /**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and al... | NatSpecMultiLine | state | function state() public view returns (State) {
return _state;
}
| /**
* @return The current state of the escrow.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
602,
681
]
} | 11,983 | ||
KojiCrowdSale | @openzeppelin/contracts/payment/escrow/RefundEscrow.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundEscrow | contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
... | /**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and al... | NatSpecMultiLine | beneficiary | function beneficiary() public view returns (address) {
return _beneficiary;
}
| /**
* @return The beneficiary of the escrow.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
745,
838
]
} | 11,984 | ||
KojiCrowdSale | @openzeppelin/contracts/payment/escrow/RefundEscrow.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundEscrow | contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
... | /**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and al... | NatSpecMultiLine | deposit | function deposit(address refundee) public payable {
require(_state == State.Active, "RefundEscrow: can only deposit while active");
super.deposit(refundee);
}
| /**
* @dev Stores funds that may later be refunded.
* @param refundee The address funds will be sent to if a refund occurs.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
986,
1168
]
} | 11,985 | ||
KojiCrowdSale | @openzeppelin/contracts/payment/escrow/RefundEscrow.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundEscrow | contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
... | /**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and al... | NatSpecMultiLine | close | function close() public onlyPrimary {
require(_state == State.Active, "RefundEscrow: can only close while active");
_state = State.Closed;
emit RefundsClosed();
}
| /**
* @dev Allows for the beneficiary to withdraw their funds, rejecting
* further deposits.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1285,
1479
]
} | 11,986 | ||
KojiCrowdSale | @openzeppelin/contracts/payment/escrow/RefundEscrow.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundEscrow | contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
... | /**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and al... | NatSpecMultiLine | enableRefunds | function enableRefunds() public onlyPrimary {
require(_state == State.Active, "RefundEscrow: can only enable refunds while active");
_state = State.Refunding;
emit RefundsEnabled();
}
| /**
* @dev Allows for refunds to take place, rejecting further deposits.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1571,
1786
]
} | 11,987 | ||
KojiCrowdSale | @openzeppelin/contracts/payment/escrow/RefundEscrow.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundEscrow | contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
... | /**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and al... | NatSpecMultiLine | beneficiaryWithdraw | function beneficiaryWithdraw() public {
require(_state == State.Closed, "RefundEscrow: beneficiary can only withdraw while closed");
_beneficiary.transfer(address(this).balance);
}
| /**
* @dev Withdraws the beneficiary's funds.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
1851,
2055
]
} | 11,988 | ||
KojiCrowdSale | @openzeppelin/contracts/payment/escrow/RefundEscrow.sol | 0x70988224d9b203cf10fabd550249e383f39f3707 | Solidity | RefundEscrow | contract RefundEscrow is ConditionalEscrow {
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsEnabled();
State private _state;
address payable private _beneficiary;
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
*/
... | /**
* @title RefundEscrow
* @dev Escrow that holds funds for a beneficiary, deposited from multiple
* parties.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
* @dev The primary account (that is, the contract that instantiates this
* contract) may deposit, close the deposit period, and al... | NatSpecMultiLine | withdrawalAllowed | function withdrawalAllowed(address) public view returns (bool) {
return _state == State.Refunding;
}
| /**
* @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a
* 'payee' argument, but we ignore it here since the condition is global, not per-payee.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | {
"func_code_index": [
2282,
2398
]
} | 11,989 | ||
HappyTokenPool | contracts/IQLF.sol | 0x198457da5e7f7b7fd916006837417dcf663f692d | Solidity | IQLF | abstract contract IQLF is IERC165 {
/**
* @dev Returns if the given address is qualified, implemented on demand.
*/
function ifQualified (address account) virtual external view returns (bool);
/**
* @dev Logs if the given address is qualified, implemented on demand.
*/
func... | ifQualified | function ifQualified (address account) virtual external view returns (bool);
| /**
* @dev Returns if the given address is qualified, implemented on demand.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://514567ac97ce2a52346891fb1fa79398719dfc3625c962f89ef81e693295dbc7 | {
"func_code_index": [
134,
215
]
} | 11,990 | ||
HappyTokenPool | contracts/IQLF.sol | 0x198457da5e7f7b7fd916006837417dcf663f692d | Solidity | IQLF | abstract contract IQLF is IERC165 {
/**
* @dev Returns if the given address is qualified, implemented on demand.
*/
function ifQualified (address account) virtual external view returns (bool);
/**
* @dev Logs if the given address is qualified, implemented on demand.
*/
func... | logQualified | function logQualified (address account, uint256 ito_start_time) virtual external returns (bool);
| /**
* @dev Logs if the given address is qualified, implemented on demand.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://514567ac97ce2a52346891fb1fa79398719dfc3625c962f89ef81e693295dbc7 | {
"func_code_index": [
312,
413
]
} | 11,991 | ||
HappyTokenPool | contracts/IQLF.sol | 0x198457da5e7f7b7fd916006837417dcf663f692d | Solidity | IQLF | abstract contract IQLF is IERC165 {
/**
* @dev Returns if the given address is qualified, implemented on demand.
*/
function ifQualified (address account) virtual external view returns (bool);
/**
* @dev Logs if the given address is qualified, implemented on demand.
*/
func... | supportsInterface | function supportsInterface(bytes4 interfaceId) virtual external override pure returns (bool) {
return interfaceId == this.supportsInterface.selector ||
interfaceId == (this.ifQualified.selector ^ this.logQualified.selector);
}
| /**
* @dev Ensure that custom contract implements `ifQualified` amd `logQualified` correctly.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://514567ac97ce2a52346891fb1fa79398719dfc3625c962f89ef81e693295dbc7 | {
"func_code_index": [
530,
789
]
} | 11,992 | ||
TokenSale | contracts/SafeMath.sol | 0xcca36039cfdd0753d3aa9f1b4bf35b606c8ed971 | Solidity | SafeMath | library SafeMath {
// @notice 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;
}
// @notice Integer division of two numbers, truncati... | // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
// @title SafeMath: overflow/underflow checks
// @notice Math operations with safety checks that throw on error | LineComment | 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;
}
| // @notice Multiplies two numbers, throws on overflow. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://f215848823315686a8490e24f02524a5f1cfb14494d6377095ade591033dabc4 | {
"func_code_index": [
80,
263
]
} | 11,993 | |
TokenSale | contracts/SafeMath.sol | 0xcca36039cfdd0753d3aa9f1b4bf35b606c8ed971 | Solidity | SafeMath | library SafeMath {
// @notice 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;
}
// @notice Integer division of two numbers, truncati... | // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
// @title SafeMath: overflow/underflow checks
// @notice Math operations with safety checks that throw on error | LineComment | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| // @notice Integer division of two numbers, truncating the quotient. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://f215848823315686a8490e24f02524a5f1cfb14494d6377095ade591033dabc4 | {
"func_code_index": [
338,
618
]
} | 11,994 | |
TokenSale | contracts/SafeMath.sol | 0xcca36039cfdd0753d3aa9f1b4bf35b606c8ed971 | Solidity | SafeMath | library SafeMath {
// @notice 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;
}
// @notice Integer division of two numbers, truncati... | // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
// @title SafeMath: overflow/underflow checks
// @notice Math operations with safety checks that throw on error | LineComment | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| // @notice Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://f215848823315686a8490e24f02524a5f1cfb14494d6377095ade591033dabc4 | {
"func_code_index": [
723,
839
]
} | 11,995 | |
TokenSale | contracts/SafeMath.sol | 0xcca36039cfdd0753d3aa9f1b4bf35b606c8ed971 | Solidity | SafeMath | library SafeMath {
// @notice 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;
}
// @notice Integer division of two numbers, truncati... | // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
// @title SafeMath: overflow/underflow checks
// @notice Math operations with safety checks that throw on error | LineComment | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| // @notice Adds two numbers, throws on overflow. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://f215848823315686a8490e24f02524a5f1cfb14494d6377095ade591033dabc4 | {
"func_code_index": [
894,
1030
]
} | 11,996 | |
Whitelist | Whitelist.sol | 0x1758e5afccd53f6eaaa3039bc44d0e1f7bf6e476 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* acc... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://dac15bd5093b5c31ad52c354985c1218b30a8115aeb6496b2a1eac5c672db46d | {
"func_code_index": [
813,
930
]
} | 11,997 | |
Whitelist | Whitelist.sol | 0x1758e5afccd53f6eaaa3039bc44d0e1f7bf6e476 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* acc... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://dac15bd5093b5c31ad52c354985c1218b30a8115aeb6496b2a1eac5c672db46d | {
"func_code_index": [
1095,
1203
]
} | 11,998 | |
Whitelist | Whitelist.sol | 0x1758e5afccd53f6eaaa3039bc44d0e1f7bf6e476 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* acc... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://dac15bd5093b5c31ad52c354985c1218b30a8115aeb6496b2a1eac5c672db46d | {
"func_code_index": [
1341,
1519
]
} | 11,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.