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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
KishuTreats | KishuTreats.sol | 0x3908e68839ea86c98cee0e9586e7f256e821a764 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
... | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | None | ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e | {
"func_code_index": [
1913,
2132
]
} | 29,200 | ||
KishuTreats | KishuTreats.sol | 0x3908e68839ea86c98cee0e9586e7f256e821a764 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
... | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | None | ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e | {
"func_code_index": [
2199,
2497
]
} | 29,201 | ||
KishuTreats | KishuTreats.sol | 0x3908e68839ea86c98cee0e9586e7f256e821a764 | Solidity | KishuTreats | contract KishuTreats is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address ... | // Contract implementation | LineComment | manualSwap | function manualSwap() external onlyOwner() {
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
| // We are exposing these functions to be able to manual swap and send
// in case the token is highly valued and 5M becomes too much | LineComment | v0.6.12+commit.27d51765 | None | ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e | {
"func_code_index": [
13368,
13529
]
} | 29,202 |
KishuTreats | KishuTreats.sol | 0x3908e68839ea86c98cee0e9586e7f256e821a764 | Solidity | KishuTreats | contract KishuTreats is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address ... | // Contract implementation | LineComment | //to recieve ETH from uniswapV2Router when swapping | LineComment | v0.6.12+commit.27d51765 | None | ipfs://1d46d0afa26e269d11a07a7be9096917ced687c7632c52b21989d0b6e0b5ad7e | {
"func_code_index": [
18093,
18127
]
} | 29,203 | ||
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | ShibaProtocolDAO | function ShibaProtocolDAO() public {
symbol = "SHIPRODAO";
name = "ShibaProtocolDAO";
decimals = 18;
_totalSupply = 1000000000000000000000000000000000;
balances[0xEFa8D096544d7f3Cd968E958c441ad23EaC3361E] = _totalSupply;
Transfer(address(0), 0xEFa8D096544d7f3Cd968E958c441ad23EaC3361E, _tot... | // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
463,
829
]
} | 29,204 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
1017,
1138
]
} | 29,205 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
1358,
1487
]
} | 29,206 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
1831,
2108
]
} | 29,207 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
2616,
2824
]
} | 29,208 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(from, to, tokens);
return... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
3355,
3713
]
} | 29,209 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
3996,
4152
]
} | 29,210 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
4507,
4824
]
} | 29,211 |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
5016,
5075
]
} | 29,212 | |
ShibaProtocolDAO | ShibaProtocolDAO.sol | 0x3af916f9130fbe7587af885111fda2346fc731b8 | Solidity | ShibaProtocolDAO | contract ShibaProtocolDAO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://3483a73ad11c74bd51d1b184409251bd14df9879a5367bf25c60d8a93c42a0da | {
"func_code_index": [
5308,
5497
]
} | 29,213 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | function() external payable {
purchaseTokens(msg.sender, msg.value, address(0));
}
| /**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
8288,
8389
]
} | 29,214 | |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | buy | function buy(address _referredBy) public payable {
purchaseTokens(msg.sender, msg.value, _referredBy);
}
| /**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
8518,
8641
]
} | 29,215 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | reinvest | function reinvest(
bool isAutoReinvestChecked,
uint24 period,
uint256 rewardPerInvocation,
uint256 minimumDividendValue
) public {
_reinvest(msg.sender);
// Setup Auto Reinvestment
if (isAutoReinvestChecked) {
_setupAutoReinvest(
period,
rewardPer... | /**
* Converts all of caller's dividends to tokens.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
8716,
9197
]
} | 29,216 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | exit | function exit() public {
// get token count for caller & sell them all
address _customerAddress = msg.sender;
uint256 _tokens = tokenBalanceLedger_[_customerAddress];
if (_tokens > 0) sell(_tokens);
withdraw();
}
| /**
* Alias of sell() and withdraw().
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
9258,
9525
]
} | 29,217 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | withdraw | function withdraw() public {
_withdraw(msg.sender);
}
| /**
* Withdraws all of the callers earnings.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
9593,
9665
]
} | 29,218 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | sell | function sell(uint256 _amountOfTokens) public onlyBagholders() {
// setup data
address _customerAddress = msg.sender;
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
uint256 _tokens = _amountOfTokens;
uint256 _ethereum = tokensToEthereum_(_tokens);
uint256 penalty =
... | /**
* Liquifies tokens to ethereum.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
9724,
11355
]
} | 29,219 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | disableInitialStage | function disableInitialStage() public onlyAdministrator() {
onlyAmbassadors = false;
}
| /**
* In case the amassador quota is not met, the administrator can manually disable the ambassador phase.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
11547,
11652
]
} | 29,220 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | setStakingRequirement | function setStakingRequirement(uint256 _amountOfTokens)
public
onlyAdministrator()
{
stakingRequirement = _amountOfTokens;
}
| /**
* Precautionary measures in case we need to adjust the masternode rate.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
11926,
12092
]
} | 29,221 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | setName | function setName(string memory _name) public onlyAdministrator() {
name = _name;
}
| /**
* If we want to rebrand, we can.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
12152,
12253
]
} | 29,222 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | setSymbol | function setSymbol(string memory _symbol) public onlyAdministrator() {
symbol = _symbol;
}
| /**
* If we want to rebrand, we can.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
12313,
12422
]
} | 29,223 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | setReferralName | function setReferralName(bytes32 ref_name) public returns (bool) {
referralMapping[msg.sender] = ref_name;
referralReverseMapping[ref_name] = msg.sender;
return true;
}
| /*---------- REFERRAL FUNCTIONS ----------*/ | Comment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
12479,
12684
]
} | 29,224 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | getCursor | function getCursor() public view returns (uint256, uint256) {
address _customerAddress = msg.sender;
Cursor storage cursor = tokenTimestampedBalanceCursor[_customerAddress];
return (cursor.start, cursor.end);
}
| /*------READ FUNCTIONS FOR TIMESTAMPED BALANCE LEDGER-------*/ | Comment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
13377,
13626
]
} | 29,225 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | totalEthereumBalance | function totalEthereumBalance() public view returns (uint256) {
return address(this).balance;
}
| /**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
14314,
14428
]
} | 29,226 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | totalSupply | function totalSupply() public view returns (uint256) {
return tokenSupply_;
}
| /**
* Retrieve the total token supply.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
14490,
14586
]
} | 29,227 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | myTokens | function myTokens() public view returns (uint256) {
address _customerAddress = msg.sender;
return balanceOf(_customerAddress);
}
| /**
* Retrieve the tokens owned by the caller.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
14656,
14812
]
} | 29,228 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | myDividends | function myDividends(bool _includeReferralBonus)
public
view
returns (uint256)
{
address _customerAddress = msg.sender;
return
_includeReferralBonus
? dividendsOf(_customerAddress) +
referralBalance_[_customerAddress]
: dividendsOf(_customerA... | /**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
15155,
15535
]
} | 29,229 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | balanceOf | function balanceOf(address _customerAddress) public view returns (uint256) {
return tokenBalanceLedger_[_customerAddress];
}
| /**
* Retrieve the token balance of any single address.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
15614,
15757
]
} | 29,230 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | dividendsOf | function dividendsOf(address _customerAddress)
public
view
returns (uint256)
{
return
(uint256)(
(int256)(
profitPerShare_ * tokenBalanceLedger_[_customerAddress]
) - payoutsTo_[_customerAddress]
) / magnitude;
}
| /**
* Retrieve the dividend balance of any single address.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
15839,
16183
]
} | 29,231 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | sellPrice | function sellPrice() public view returns (uint256) {
if (tokenSupply_ == 0) {
return tokenPriceInitial_ - tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_);
uint256 _taxedEthereum = SafeM... | /**
* Return the ethereum received on selling 1 individual token.
* We are not deducting the penalty over here as it's a general sell price
* the user can use the `calculateEthereumReceived` to get the sell price specific to them
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
16448,
16882
]
} | 29,232 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | buyPrice | function buyPrice() public view returns (uint256) {
if (tokenSupply_ == 0) {
return tokenPriceInitial_ + tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _taxedEthereum =
mulDiv(_ethereum, dividendFee_, (dividendFee_ - 1));
... | /**
* Return the ethereum required for buying 1 individual token.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
16971,
17364
]
} | 29,233 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | calculateTokensReceived | function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns (uint256)
{
uint256 _dividends = SafeMath.div(_ethereumToSpend, dividendFee_);
uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends);
uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);
... | /*
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/ | Comment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
17475,
17866
]
} | 29,234 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | calculateEthereumReceived | function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns (uint256)
{
require(_tokensToSell <= tokenSupply_);
require(_tokensToSell <= myTokens());
uint256 _ethereum = tokensToEthereum_(_tokensToSell);
address _customerAddress = msg.sender;
uint256 penalty ... | /**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
18374,
19188
]
} | 29,235 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | calculateAveragePenalty | function calculateAveragePenalty(
uint256 _amountOfTokens,
address _customerAddress
) public view onlyBagholders() returns (uint256) {
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
uint256 tokensFound = 0;
Cursor storage _customerCursor =
tokenTimestampedBalance... | /**
* Calculate the early exit penalty for selling x tokens
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
19690,
21726
]
} | 29,236 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | _calculatePenalty | function _calculatePenalty(uint256 timestamp)
public
view
returns (uint256)
{
uint256 gap = block.timestamp - timestamp;
if (gap > 30 days) {
return 0;
} else if (gap > 20 days) {
return 25;
} else if (gap > 10 days) {
return 50;
}
return 75;
}... | /**
* Calculate the early exit penalty for selling after x days
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
21813,
22194
]
} | 29,237 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | ethereumToTokens_ | function ethereumToTokens_(uint256 _ethereum)
public
view
returns (uint256)
{
uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
uint256 _tokensReceived =
((
SafeMath.sub(
(
sqrt(
(_tokenPriceInitial**2) ... | /**
* Calculate Token price based on an amount of incoming ethereum
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
22389,
23475
]
} | 29,238 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | tokensToEthereum_ | function tokensToEthereum_(uint256 _tokens) public view returns (uint256) {
uint256 tokens_ = (_tokens + 1e18);
uint256 _tokenSupply = (tokenSupply_ + 1e18);
uint256 _ethereumReceived =
(SafeMath.sub(
(((tokenPriceInitial_ +
(tokenPriceIncremental_ * (_tokenSupply /... | /**
* Calculate token sell value.
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
23636,
24209
]
} | 29,239 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | purchaseTokens | function purchaseTokens(
address _customerAddress,
uint256 _incomingEthereum,
address _referredBy
) internal antiEarlyWhale(_incomingEthereum) returns (uint256) {
// data setup
uint256 _undividedDividends =
SafeMath.div(_incomingEthereum, dividendFee_);
uint256 _referralBonus = S... | /*==========================================
= INTERNAL FUNCTIONS =
==========================================*/ | Comment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
24362,
27791
]
} | 29,240 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | _updateLedgerForTransfer | function _updateLedgerForTransfer(
uint256 _amountOfTokens,
address _customerAddress
) internal {
// Parse through the list of transactions
uint256 tokensFound = 0;
Cursor storage _customerCursor =
tokenTimestampedBalanceCursor[_customerAddress];
uint256 counter = _customerCursor... | /**
* Update ledger after transferring x tokens
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
29339,
30786
]
} | 29,241 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | calculateAveragePenaltyAndUpdateLedger | function calculateAveragePenaltyAndUpdateLedger(
uint256 _amountOfTokens,
address _customerAddress
) internal onlyBagholders() returns (uint256) {
// Parse through the list of transactions
uint256 tokensFound = 0;
Cursor storage _customerCursor =
tokenTimestampedBalanceCursor[_custome... | /**
* Calculate the early exit penalty for selling x tokens and edit the timestamped ledger
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
30901,
33310
]
} | 29,242 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | fullMul | function fullMul(uint256 x, uint256 y)
public
pure
returns (uint256 l, uint256 h)
{
uint256 mm = mulmod(x, y, uint256(-1));
l = x * y;
h = mm - l;
if (mm < l) h -= 1;
}
| /**
* @dev calculates x*y and outputs a emulated 512bit number as l being the lower 256bit half and h the upper 256bit half.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
33673,
33919
]
} | 29,243 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | mulDiv | function mulDiv(
uint256 x,
uint256 y,
uint256 z
) public pure returns (uint256) {
(uint256 l, uint256 h) = fullMul(x, y);
require(h < z);
uint256 mm = mulmod(x, y, z);
if (mm > l) h -= 1;
l -= mm;
uint256 pow2 = z & -z;
z /= pow2;
l /= pow2;
l += h * ((-pow2... | /**
* @dev calculates x*y/z taking care of phantom overflows.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
34004,
34649
]
} | 29,244 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | invokeAutoReinvest | function invokeAutoReinvest(address _customerAddress)
external
returns (uint256)
{
AutoReinvestEntry storage entry = autoReinvestment[_customerAddress];
if (
entry.nextExecutionTime > 0 &&
block.timestamp >= entry.nextExecutionTime
) {
// fetch dividends
u... | // Anyone can call this function and claim the reward | LineComment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
36162,
37657
]
} | 29,245 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | getAutoReinvestEntry | function getAutoReinvestEntry()
public
view
returns (
uint256,
uint256,
uint24,
uint256
)
{
address _customerAddress = msg.sender;
AutoReinvestEntry storage _autoReinvestEntry =
autoReinvestment[_customerAddress];
return (
_autoRe... | // Read function for the frontend to determine if the user has setup Auto Reinvestment or not | LineComment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
37759,
38335
]
} | 29,246 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | getAutoReinvestEntryOf | function getAutoReinvestEntryOf(address _customerAddress)
public
view
returns (
uint256,
uint256,
uint24,
uint256
)
{
AutoReinvestEntry storage _autoReinvestEntry =
autoReinvestment[_customerAddress];
return (
_autoReinvestEntry.nextEx... | // Read function for the scheduling workers determine if the user has setup Auto Reinvestment or not | LineComment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
38444,
38998
]
} | 29,247 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | stopAutoReinvest | function stopAutoReinvest() external {
address customerAddress = msg.sender;
if (autoReinvestment[customerAddress].nextExecutionTime > 0) {
delete autoReinvestment[customerAddress];
// Launch an event that this entry has been deleted
emit onAutoReinvestmentStop(customerAddress);
... | // The user can stop the autoReinvestment whenever they want | LineComment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
39067,
39428
]
} | 29,248 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | _transfer | function _transfer(
address _customerAddress,
address _toAddress,
uint256 _amountOfTokens
) internal {
require(
_customerAddress != address(0),
"ERC20: transfer from the zero address"
);
require(
_toAddress != address(0),
"ERC20: transfer to the zero ad... | /**
* @dev Moves tokens `amount` from `sender` to `recipient` after liquifying 10% of the tokens `amount` as dividens.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirem... | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
41053,
43649
]
} | 29,249 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue)
public
returns (bool)
{
uint256 final_allowance =
SafeMath.add(_allowances[msg.sender][spender], addedValue);
_approve(msg.sender, spender, final_allowance);
return true;
}
| // Atomically increases the allowance granted to `spender` by the caller. | LineComment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
43733,
44044
]
} | 29,250 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue)
public
returns (bool)
{
uint256 final_allowance =
SafeMath.sub(_allowances[msg.sender][spender], subtractedValue);
_approve(msg.sender, spender, final_allowance);
return true;
}
| //Atomically decreases the allowance granted to `spender` by the caller. | LineComment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
44125,
44446
]
} | 29,251 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | Hourglass | contract Hourglass {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// administrators can:
// -> change the name o... | /*
:'######::'########:'########::'#######::
'##... ##: ##.....::... ##..::'##.... ##:
##:::..:: ##:::::::::: ##:::: ##:::: ##:
##::::::: ######:::::: ##:::: ##:::: ##:
##::::::: ##...::::::: ##:::: ##:::: ##:
##::: ##: ##:::::::::: ##:::: ##:::: ##:
. ######:: ########:::: ##::::. #######::
:......:::.... | Comment | _approve | function _approve(
address owner,
address spender,
uint256 value
) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender,... | // Sets `amount` as the allowance of `spender` over the `owner`s tokens. | LineComment | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
44527,
44899
]
} | 29,252 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
95,
308
]
} | 29,253 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
400,
693
]
} | 29,254 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
816,
944
]
} | 29,255 |
Hourglass | Hourglass.sol | 0xf3b653933e32b58c173f3f9a77fc20207d61a589 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.5.15+commit.6a57276f | MIT | bzzr://2c4790f7928bf9a3a45a9f8993b6a67a03c0e30cb3eae470bc64181e301607b8 | {
"func_code_index": [
1016,
1168
]
} | 29,256 |
RadishesFinance | RadishesFinance.sol | 0x84b4bc8d6c7e6a0c5551ff6e286b742064e71209 | Solidity | Context | contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://1913bc17c96c109639cd9cc71a8ea705d394466cccdbf978b6d799f28554628f | {
"func_code_index": [
109,
212
]
} | 29,257 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
role.bearer[addr] = true;
}
/**
* @dev remove an address' access to this role
*/
functio... | /**
* @title Roles
* @author Francisco Giordano (@frangio)
* @dev Library for managing addresses assigned to a Role.
* See RBAC.sol for example usage.
*/ | NatSpecMultiLine | add | function add(Role storage role, address addr)
internal
{
role.bearer[addr] = true;
}
| /**
* @dev give an address access to this role
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
141,
244
]
} | 29,258 |
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
role.bearer[addr] = true;
}
/**
* @dev remove an address' access to this role
*/
functio... | /**
* @title Roles
* @author Francisco Giordano (@frangio)
* @dev Library for managing addresses assigned to a Role.
* See RBAC.sol for example usage.
*/ | NatSpecMultiLine | remove | function remove(Role storage role, address addr)
internal
{
role.bearer[addr] = false;
}
| /**
* @dev remove an address' access to this role
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
311,
418
]
} | 29,259 |
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
role.bearer[addr] = true;
}
/**
* @dev remove an address' access to this role
*/
functio... | /**
* @title Roles
* @author Francisco Giordano (@frangio)
* @dev Library for managing addresses assigned to a Role.
* See RBAC.sol for example usage.
*/ | NatSpecMultiLine | check | function check(Role storage role, address addr)
view
internal
{
require(has(role, addr), "Illegal user rights");
}
| /**
* @dev check if an address has this role
* // reverts
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
497,
635
]
} | 29,260 |
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
role.bearer[addr] = true;
}
/**
* @dev remove an address' access to this role
*/
functio... | /**
* @title Roles
* @author Francisco Giordano (@frangio)
* @dev Library for managing addresses assigned to a Role.
* See RBAC.sol for example usage.
*/ | NatSpecMultiLine | has | function has(Role storage role, address addr)
view
internal
returns (bool)
{
return role.bearer[addr];
}
| /**
* @dev check if an address has this role
* @return bool
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
716,
849
]
} | 29,261 |
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | RBAC | library RBAC
{
using Roles for Roles.Role;
struct RolesManager
{
mapping (string => Roles.Role) userRoles;
address owner;
bool isInit;
}
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
event OwnershipTr... | checkRole | function checkRole(RolesManager storage rolesManager, address addr, string memory roleName) internal view
{
rolesManager.userRoles[roleName].check(addr);
}
| /**
* @dev reverts if addr does not have role
* @param addr address
* @param roleName the name of the role
* // reverts
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
1558,
1737
]
} | 29,262 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | RBAC | library RBAC
{
using Roles for Roles.Role;
struct RolesManager
{
mapping (string => Roles.Role) userRoles;
address owner;
bool isInit;
}
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
event OwnershipTr... | hasRole | function hasRole(RolesManager storage rolesManager, address addr, string memory roleName) internal view returns (bool)
{
return rolesManager.userRoles[roleName].has(addr);
}
| /**
* @dev determine if addr has role
* @param addr address
* @param roleName the name of the role
* @return bool
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
1887,
2084
]
} | 29,263 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | RBAC | library RBAC
{
using Roles for Roles.Role;
struct RolesManager
{
mapping (string => Roles.Role) userRoles;
address owner;
bool isInit;
}
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
event OwnershipTr... | addRole | function addRole(RolesManager storage rolesManager, address addr, string memory roleName) internal onlyAdmin(rolesManager)
{
rolesManager.userRoles[roleName].add(addr);
emit RoleAdded(addr, roleName);
}
| /**
* @dev add a role to an address
* @param addr address
* @param roleName the name of the role
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
2212,
2447
]
} | 29,264 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | RBAC | library RBAC
{
using Roles for Roles.Role;
struct RolesManager
{
mapping (string => Roles.Role) userRoles;
address owner;
bool isInit;
}
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
event OwnershipTr... | removeRole | function removeRole(RolesManager storage rolesManager, address addr, string memory roleName) internal onlyAdmin(rolesManager)
{
rolesManager.userRoles[roleName].remove(addr);
emit RoleRemoved(addr, roleName);
}
| /**
* @dev remove a role from an address
* @param addr address
* @param roleName the name of the role
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
2580,
2823
]
} | 29,265 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | RBAC | library RBAC
{
using Roles for Roles.Role;
struct RolesManager
{
mapping (string => Roles.Role) userRoles;
address owner;
bool isInit;
}
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
event OwnershipTr... | renounceOwnership | function renounceOwnership(RolesManager storage rolesManager) internal
{
setOwner(rolesManager, address(0));
}
| /** set owner null
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
3122,
3257
]
} | 29,266 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | RBAC | library RBAC
{
using Roles for Roles.Role;
struct RolesManager
{
mapping (string => Roles.Role) userRoles;
address owner;
bool isInit;
}
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
event OwnershipTr... | transferOwnership | function transferOwnership(RolesManager storage rolesManager, address newOwner) internal
{
require(newOwner != address(0), "Ownable: new owner is the zero address");
setOwner(rolesManager, newOwner);
}
| /* transfer owner */ | Comment | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
3286,
3520
]
} | 29,267 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | BasicTokenLib | library BasicTokenLib {
using RBAC for RBAC.RolesManager;
event Mint(address indexed to, uint256 amount);
event MintFinished(address account);
event MintResumed(address account);
event Burn(address indexed _who, uint256 _value);
event Paused(address account);
event Unpaused(address ... | totalSupply | function totalSupply(Xrc20Token storage token) internal view returns (uint256)
{
return token._totalSupply;
}
| /* 查询总发行量 */ | Comment | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
2805,
2938
]
} | 29,268 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | BasicTokenLib | library BasicTokenLib {
using RBAC for RBAC.RolesManager;
event Mint(address indexed to, uint256 amount);
event MintFinished(address account);
event MintResumed(address account);
event Burn(address indexed _who, uint256 _value);
event Paused(address account);
event Unpaused(address ... | balanceOf | function balanceOf(Xrc20Token storage token, address _owner) internal view returns (uint256)
{
return token.balances[_owner];
}
| /* 查询用户余额 */ | Comment | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
2959,
3111
]
} | 29,269 | ||
YITZU | YITZU.sol | 0x16fe93b67c9e302498f2045dc503d31ab58781e8 | Solidity | YITZU | contract YITZU {
BasicTokenLib.Xrc20Token private xrc20Token;
using BasicTokenLib for BasicTokenLib.Xrc20Token;
constructor(){
xrc20Token.initialize(0x5DB357308BB38d74093272f9F8F2A2F52A66374D, "YITZU", "YZU", 18, 1000000000000000, "", "");
xrc20Token.mint(msg.sender, 1000000000);
... | name | function name() public view virtual returns (string memory) {
return xrc20Token.name();
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU GPLv3 | ipfs://572435e935aa23910b856425928597667944cbe80507d4d3a312df3a2bbd69e7 | {
"func_code_index": [
483,
591
]
} | 29,270 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public virtual view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
902,
998
]
} | 29,271 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public virtual view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
1112,
1212
]
} | 29,272 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public virtual view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
1845,
1941
]
} | 29,273 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public virtual view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
2001,
2114
]
} | 29,274 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public virtual view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
2172,
2304
]
} | 29,275 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
2512,
2692
]
} | 29,276 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
2750,
2906
]
} | 29,277 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
3048,
3222
]
} | 29,278 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
3691,
4017
]
} | 29,279 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
4421,
4644
]
} | 29,280 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
5142,
5416
]
} | 29,281 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
5901,
6445
]
} | 29,282 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
6721,
7104
]
} | 29,283 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
7431,
7854
]
} | 29,284 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
8289,
8640
]
} | 29,285 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
8967,
9062
]
} | 29,286 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
9660,
9757
]
} | 29,287 |
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | mint | function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
}
| /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (eBOND). | NatSpecSingleLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
1615,
1719
]
} | 29,288 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | ethereumToTokens_ | function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
uint256 _tokensReceived;
if(_progressivePrice){
_tokensReceived =
(
(
SafeMath.sub(
... | /**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
4167,
5362
]
} | 29,289 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | calculateTokensReceived | function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
uint256 _taxedEthereum = _ethereumToSpend; // SafeMath.sub(_ethereumToSpend, _dividends);
uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);
return _amountOfTokens;
}... | /**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
6218,
6575
]
} | 29,290 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | buyPrice | function buyPrice()
public
view
returns(uint256)
{
if(_totalSupply == 0){
return tokenPriceInitial_ + tokenPriceIncremental_;
} else {
uint256 _ethereum = ethereumToTokens_(1e18);
uint256 _taxedEthereum = _ethereum; //SafeMath.add(_ethereum, _dividends);... | /**
* Return the sell price of 1 individual token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
6942,
7357
]
} | 29,291 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | name | function name() public view virtual returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
7634,
7730
]
} | 29,292 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | symbol | function symbol() public view virtual returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
7844,
7944
]
} | 29,293 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | decimals | function decimals() public view virtual returns (uint8) {
return 18;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
8578,
8667
]
} | 29,294 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
8727,
8840
]
} | 29,295 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
8898,
9030
]
} | 29,296 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
9238,
9418
]
} | 29,297 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
9476,
9632
]
} | 29,298 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
9774,
9948
]
} | 29,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.