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
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _toAddress, uint _amountOfTokens) public returns(bool) { // Setup variables address _customerAddress = _from; bytes memory empty; // Make sure we own the tokens we're transferring, are ALLOWED to transfer that many tokens, // and are transferring at lea...
/** * Transfer tokens from the caller to a new holder: the Used By Smart Contracts edition. * No charge incurred for the transfer. No seriously, we'd make a terrible bank. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 13838, 14506 ] }
25,000
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return tokenSupply; }
// Who'd have thought we'd need this thing floating around?
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 15090, 15189 ] }
25,001
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
publicStartRegularPhase
function publicStartRegularPhase() public { require(now > (icoOpenTime + 2 weeks) && icoOpenTime != 0); icoPhase = false; regularPhase = true; }
// Anyone can start the regular phase 2 weeks after the ICO phase starts. // In case the devs die. Or something.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 15311, 15488 ] }
25,002
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
startICOPhase
function startICOPhase() onlyAdministrator() public { // Prevent us from startaring the ICO phase again require(icoOpenTime == 0); icoPhase = true; icoOpenTime = now; }
// Fire the starting gun and then duck for cover.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 15608, 15811 ] }
25,003
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
endICOPhase
function endICOPhase() onlyAdministrator() public { icoPhase = false; }
// Fire the ... ending gun?
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 15845, 15936 ] }
25,004
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
setAdministrator
function setAdministrator(address _newAdmin, bool _status) onlyAdministrator() public { administrators[_newAdmin] = _status; }
// The death of a great man demands the birth of a great son.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 16191, 16337 ] }
25,005
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
totalEthereumBalance
function totalEthereumBalance() public view returns(uint) { return address(this).balance; }
/*---------- HELPERS AND CALCULATORS ----------*/
Comment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 16999, 17113 ] }
25,006
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
getMyDividendRate
function getMyDividendRate() public view returns(uint8) { address _customerAddress = msg.sender; require(userSelectedRate[_customerAddress]); return userDividendRate[_customerAddress]; }
/** * Retrieves your currently selected dividend rate. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 17305, 17524 ] }
25,007
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
getFrontEndTokenSupply
function getFrontEndTokenSupply() public view returns(uint) { return tokenSupply; }
/** * Retrieve the total frontend token supply */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 17588, 17694 ] }
25,008
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
getDividendTokenSupply
function getDividendTokenSupply() public view returns(uint) { return divTokenSupply; }
/** * Retreive the total dividend token supply */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 17758, 17867 ] }
25,009
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
myFrontEndTokens
function myFrontEndTokens() public view returns(uint) { address _customerAddress = msg.sender; return getFrontEndTokenBalanceOf(_customerAddress); }
/** * Retrieve the frontend tokens owned by the caller */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 17939, 18115 ] }
25,010
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
myDividendTokens
function myDividendTokens() public view returns(uint) { address _customerAddress = msg.sender; return getDividendTokenBalanceOf(_customerAddress); }
/** * Retrieve the dividend tokens owned by the caller */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 18187, 18363 ] }
25,011
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
sellPrice
function sellPrice() public view returns(uint) { uint price; if (icoPhase || currentEthInvested < ethInvestedDuringICO) { price = tokenPriceInitial_; } else { // Calculate the tokens received for 100 finney. // Divide to find the average, to calculate the price. uint tokensReceivedF...
// Get the sell price at the user's average dividend rate
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 19812, 20464 ] }
25,012
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
buyPrice
function buyPrice(uint dividendRate) public view returns(uint) { uint price; if (icoPhase || currentEthInvested < ethInvestedDuringICO) { price = tokenPriceInitial_; } else { // Calculate the tokens received for 100 finney. // Divide to find the average, to calculate the price. uint...
// Get the buy price at a particular dividend rate
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 20521, 21147 ] }
25,013
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
calculateEthereumReceived
function calculateEthereumReceived(uint _tokensToSell) public view returns(uint) { require(_tokensToSell <= tokenSupply); uint _ethereum = tokensToEthereum_(_tokensToSell); uint userAverageDividendRate = getUserAverageDividendRate(msg.sender); uint _dividends = (_ethereum.mul(...
// When selling tokens, we need to calculate the user's current dividend rate. // This is different from their selected dividend rate.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 21643, 22129 ] }
25,014
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
getUserAverageDividendRate
function getUserAverageDividendRate(address user) public view returns (uint) { return (magnitude * dividendTokenBalanceLedger_[user]).div(frontTokenBalanceLedger_[user]); }
/* * Get's a user's average dividend rate - which is just their divTokenBalance / tokenBalance * We multiply by magnitude to avoid precision errors. */
Comment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 22301, 22484 ] }
25,015
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
purchaseTokens
function purchaseTokens(uint _incomingEthereum, address _referredBy) internal returns(uint) { // require(_incomingEthereum >= MIN_ETH_BUYIN || msg.sender == bankrollAddress, "Tried to buy below the min eth buyin threshold."); uint toBankRoll; uint toReferrer; uint toTokenHolders; uint toDivCardHolder...
/* Purchase tokens with Ether. During ICO phase, dividends should go to the bankroll During normal operation: 0.5% should go to the master dividend card 0.5% should go to the matching dividend card 25% of dividends should go to the referrer, if any is provided. */
Comment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 23064, 28335 ] }
25,016
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
ethereumToTokens_
function ethereumToTokens_(uint _ethereumAmount) public view returns(uint) { require(_ethereumAmount > MIN_ETH_BUYIN, "Tried to buy tokens with too little eth."); if (icoPhase) { return _ethereumAmount.div(tokenPriceInitial_) * 1e18; } /* * i = investment, p = price, t = number of tokens ...
// How many tokens one gets from a certain amount of ethereum.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 28404, 32602 ] }
25,017
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
tokensToEthereum_
function tokensToEthereum_(uint _tokens) public view returns(uint) { require (_tokens >= MIN_TOKEN_SELL_AMOUNT, "Tried to sell too few tokens."); /* * i = investment, p = price, t = number of tokens * * i_current = p_initial * t_current (for t_current <= t_initial) * i_c...
// How much Ether we get from selling N tokens
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 32655, 36235 ] }
25,018
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
withdrawFrom
function withdrawFrom(address _customerAddress) internal { // Setup data uint _dividends = theDividendsOf(false, _customerAddress); // update dividend tracker payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); // add ref. bonus _dividends ...
// Called from transferFrom. Always checks if _customerAddress has dividends.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 38783, 39348 ] }
25,019
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
injectEther
function injectEther() public payable onlyAdministrator { }
/*======================= = RESET FUNCTIONS = ======================*/
Comment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 39442, 39521 ] }
25,020
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
toPowerOfThreeHalves
function toPowerOfThreeHalves(uint x) public pure returns (uint) { // m = 3, n = 2 // sqrt(x^3) return sqrt(x**3); }
/*======================= = MATHS FUNCTIONS = ======================*/
Comment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 39613, 39750 ] }
25,021
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 172, 399 ] }
25,022
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 547, 746 ] }
25,023
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 896, 1404 ] }
25,024
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 1555, 1755 ] }
25,025
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 1916, 2116 ] }
25,026
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 2358, 2461 ] }
25,027
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 2739, 2842 ] }
25,028
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 3096, 3199 ] }
25,029
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 3495, 3598 ] }
25,030
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 4060, 4163 ] }
25,031
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 4637, 4882 ] }
25,032
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 5375, 5619 ] }
25,033
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SafeMathUpgradeable
library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; ...
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 6277, 6521 ] }
25,034
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
OwnableUpgradeable
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownabl...
__Ownable_init
function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); }
/** * @dev Initializes the contract setting the deployer as the initial owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 299, 433 ] }
25,035
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
OwnableUpgradeable
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownabl...
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 616, 708 ] }
25,036
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
OwnableUpgradeable
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownabl...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 1267, 1366 ] }
25,037
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
OwnableUpgradeable
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownabl...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 1516, 1713 ] }
25,038
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
BaseTransferRule
abstract contract BaseTransferRule is Initializable, OwnableUpgradeable, ITransferRules { address public chainRuleAddr; address public _src20; address public doTransferCaller; modifier onlyDoTransferCaller { require(msg.sender == address(doTransferCaller)); _; } ...
cleanSRC
function cleanSRC() public onlyOwner() { _src20 = address(0); doTransferCaller = address(0); //_setChain(address(0)); }
//--------------------------------------------------------------------------------- // public section //---------------------------------------------------------------------------------
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 527, 683 ] }
25,039
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
BaseTransferRule
abstract contract BaseTransferRule is Initializable, OwnableUpgradeable, ITransferRules { address public chainRuleAddr; address public _src20; address public doTransferCaller; modifier onlyDoTransferCaller { require(msg.sender == address(doTransferCaller)); _; } ...
setSRC
function setSRC(address src20) override external returns (bool) { require(doTransferCaller == address(0), "external contract already set"); require(address(_src20) == address(0), "external contract already set"); require(src20 != address(0), "src20 can not be zero"); doTransferCaller = _msgSender();...
/** * @dev Set for what contract this rules are. * * @param src20 - Address of src20 contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 1318, 1713 ] }
25,040
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
BaseTransferRule
abstract contract BaseTransferRule is Initializable, OwnableUpgradeable, ITransferRules { address public chainRuleAddr; address public _src20; address public doTransferCaller; modifier onlyDoTransferCaller { require(msg.sender == address(doTransferCaller)); _; } ...
doTransfer
function doTransfer(address from, address to, uint256 value) override external onlyDoTransferCaller returns (bool) { (from,to,value) = _doTransfer(from, to, value); if (isChainExists()) { require(ITransferRules(chainRuleAddr).doTransfer(msg.sender, to, value), "chain doTransfer failed"); } else ...
/** * @dev Do transfer and checks where funds should go. If both from and to are * on the whitelist funds should be transferred but if one of them are on the * grey list token-issuer/owner need to approve transfer. * * param from The address to transfer from. * param to The address to send tokens to. * @p...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 2110, 2637 ] }
25,041
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
BaseTransferRule
abstract contract BaseTransferRule is Initializable, OwnableUpgradeable, ITransferRules { address public chainRuleAddr; address public _src20; address public doTransferCaller; modifier onlyDoTransferCaller { require(msg.sender == address(doTransferCaller)); _; } ...
__BaseTransferRule_init
function __BaseTransferRule_init() internal initializer { __Ownable_init(); }
//--------------------------------------------------------------------------------- // internal section //---------------------------------------------------------------------------------
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 2842, 2940 ] }
25,042
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
BaseTransferRule
abstract contract BaseTransferRule is Initializable, OwnableUpgradeable, ITransferRules { address public chainRuleAddr; address public _src20; address public doTransferCaller; modifier onlyDoTransferCaller { require(msg.sender == address(doTransferCaller)); _; } ...
_tryExternalSetSRC
function _tryExternalSetSRC(address chainAddr) private returns (bool) { try ITransferRules(chainAddr).setSRC(_src20) returns (bool) { return (true); } catch Error(string memory /*reason*/) { // This is executed in case // revert was called inside getData // and a reason str...
//--------------------------------------------------------------------------------- // private section //---------------------------------------------------------------------------------
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 3425, 4120 ] }
25,043
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
init
function init( ) public initializer { __SimpleTransferRule_init(); }
/** * init method */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 977, 1105 ] }
25,044
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
haltTrading
function haltTrading() public onlyOwner(){ isTrading = 0; }
/** * @dev clean ERC777. available only for owner */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 1193, 1271 ] }
25,045
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
minimumsView
function minimumsView( address addr ) public view returns (uint256) { return _minimumsGet(addr, block.timestamp); }
/** * @dev viewing minimum holding in addr sener during period from now to timestamp. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 1874, 2055 ] }
25,046
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
__SimpleTransferRule_init
function __SimpleTransferRule_init( ) internal initializer { __BaseTransferRule_init(); //uniswapV2Pair = 0x03B0da178FecA0b0BBD5D76c431f16261D0A76aa; uniswapV2Pairs.push(0x03B0da178FecA0b0BBD5D76c431f16261D0A76aa); _src20 = 0x6Ef5febbD2A56FAb23f18a69d3fB9F4E2A70440B; ...
/** * init internal */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 2462, 3039 ] }
25,047
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
_doTransfer
function _doTransfer( address from, address to, uint256 value ) override internal returns ( address _from, address _to, uint256 _value ) { (_from,_to,_value) = (from,to,value); // owner does anything if (t...
/** * @dev Do transfer and checks where funds should go. If both from and to are * on the whitelist funds should be transferred but if one of them are on the * grey list token-issuer/owner need to approve transfer. * * @param from The address to transfer from. * @param to The address to send tokens to. * ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 3656, 5582 ] }
25,048
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
getAmountIn
function getAmountIn(uint256 token, uint256 reserve0, uint256 reserve1) internal pure returns (uint256 calcEth) { uint256 numerator = reserve1.mul(token).mul(1000); uint256 denominator = reserve0.sub(token).mul(997); calcEth = (numerator / denominator).add(1); }
/* * copy as UniswapV2Library function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) */
Comment
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 5988, 6287 ] }
25,049
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
getReserves
function getReserves(address uniswapV2Pair) internal returns (uint256 reserveA, uint256 reserveB) { (reserveA, reserveB,) = IUniswapV2Pair(uniswapV2Pair).getReserves(); (reserveA, reserveB) = (_src20 == IUniswapV2Pair(uniswapV2Pair).token0()) ? (reserveA, reserveB) : (reserveB, reserveA); }
// reserveA is reserves of src20
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 6332, 6654 ] }
25,050
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
_minimumsAdd
function _minimumsAdd( address addr, uint256 amount, uint256 duration, bool gradual ) internal { Minimum memory minimum = Minimum({ amount: amount, startTime: block.timestamp, endTime: block.timestamp.add(duration), gradual...
/** * amount to lock up */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 7438, 7880 ] }
25,051
SimpleTransferRule
SimpleTransferRule.sol
0x4226d666079653656f8db5b5b22803525abcb11d
Solidity
SimpleTransferRule
contract SimpleTransferRule is BaseTransferRule { using SafeMathUpgradeable for uint256; //using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; address internal escrowAddr; mapping (address => uint256) _lastTransactionBlock; //address uniswapV2Pair; add...
/* * @title TransferRules contract * @dev Contract that is checking if on-chain rules for token transfers are concluded. */
Comment
_minimumsGet
function _minimumsGet( address addr, uint256 currentTime ) internal view returns (uint256) { uint256 minimum = 0; uint256 c = _minimums[addr].length; uint256 m; for (uint256 i=0; i<c; i++) { if ( _minimums[addr][i].startTime > ...
/** * amount that locked up for `addr` in `currentTime` */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b12b5338af55a8ab023649d1e976d2cad2a590e9cfcbada8b7db72eadc73eb1d
{ "func_code_index": [ 7965, 8820 ] }
25,052
CRPFactory
contracts/templates/ElasticSupplyPool.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
ElasticSupplyPool
contract ElasticSupplyPool is ConfigurableRightsPool { using BalancerSafeMath for uint; // Event declarations // Have to redeclare in the subclass, to be emitted from this contract event LogCall( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; eve...
/** * @author Ampleforth engineering team & Balancer Labs * * Reference: * https://github.com/balancer-labs/configurable-rights-pool/blob/master/contracts/templates/ElasticSupplyPool.sol * * @title Ampl Elastic Configurable Rights Pool. * * @dev Extension of Balancer labs' configurable rights pool (smart-pool...
NatSpecMultiLine
createPool
function createPool( uint, // initialSupply uint, // minimumWeightChangeBlockPeriod uint // addTokenTimeLockInBlocks ) external override { revert("ERR_UNSUPPORTED_OPERATION"); }
/** * @notice ElasticSupply pools don't have updateWeightsGradually, so cannot call this * param initialSupply starting token balance * param minimumWeightChangeBlockPeriod - Enforce a minimum time between the start and end blocks * param addTokenTimeLockInBlocks - Enforce a mandatory wait time between updates * ...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1802, 2043 ] }
25,053
CRPFactory
contracts/templates/ElasticSupplyPool.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
ElasticSupplyPool
contract ElasticSupplyPool is ConfigurableRightsPool { using BalancerSafeMath for uint; // Event declarations // Have to redeclare in the subclass, to be emitted from this contract event LogCall( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; eve...
/** * @author Ampleforth engineering team & Balancer Labs * * Reference: * https://github.com/balancer-labs/configurable-rights-pool/blob/master/contracts/templates/ElasticSupplyPool.sol * * @title Ampl Elastic Configurable Rights Pool. * * @dev Extension of Balancer labs' configurable rights pool (smart-pool...
NatSpecMultiLine
updateWeight
function updateWeight( address, // token uint // newWeight ) external logs onlyOwner needsBPool override { revert("ERR_UNSUPPORTED_OPERATION"); }
/** * @notice Update the weight of an existing token - cannot do this in ElasticSupplyPools * param token - token to be reweighted * param newWeight - new weight of the token */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2246, 2471 ] }
25,054
CRPFactory
contracts/templates/ElasticSupplyPool.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
ElasticSupplyPool
contract ElasticSupplyPool is ConfigurableRightsPool { using BalancerSafeMath for uint; // Event declarations // Have to redeclare in the subclass, to be emitted from this contract event LogCall( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; eve...
/** * @author Ampleforth engineering team & Balancer Labs * * Reference: * https://github.com/balancer-labs/configurable-rights-pool/blob/master/contracts/templates/ElasticSupplyPool.sol * * @title Ampl Elastic Configurable Rights Pool. * * @dev Extension of Balancer labs' configurable rights pool (smart-pool...
NatSpecMultiLine
updateWeightsGradually
function updateWeightsGradually( uint[] calldata, // newWeights uint, // startBlock uint // endBlock ) external logs onlyOwner needsBPool override { revert("ERR_UNSUPPORTED_OPERATION"); }
/** * @notice Update weights in a predetermined way, between startBlock and endBlock, * through external calls to pokeWeights -- cannot do this in ElasticSupplyPools * @dev Makes sure we aren't already in a weight update scheme * Must call pokeWeights at least once past the end for it to do the final u...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3123, 3397 ] }
25,055
CRPFactory
contracts/templates/ElasticSupplyPool.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
ElasticSupplyPool
contract ElasticSupplyPool is ConfigurableRightsPool { using BalancerSafeMath for uint; // Event declarations // Have to redeclare in the subclass, to be emitted from this contract event LogCall( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; eve...
/** * @author Ampleforth engineering team & Balancer Labs * * Reference: * https://github.com/balancer-labs/configurable-rights-pool/blob/master/contracts/templates/ElasticSupplyPool.sol * * @title Ampl Elastic Configurable Rights Pool. * * @dev Extension of Balancer labs' configurable rights pool (smart-pool...
NatSpecMultiLine
pokeWeights
function pokeWeights() external logs needsBPool override { revert("ERR_UNSUPPORTED_OPERATION"); }
/** * @notice External function called to make the contract update weights according to plan * Unsupported in ElasticSupplyPools */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3557, 3705 ] }
25,056
CRPFactory
contracts/templates/ElasticSupplyPool.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
ElasticSupplyPool
contract ElasticSupplyPool is ConfigurableRightsPool { using BalancerSafeMath for uint; // Event declarations // Have to redeclare in the subclass, to be emitted from this contract event LogCall( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; eve...
/** * @author Ampleforth engineering team & Balancer Labs * * Reference: * https://github.com/balancer-labs/configurable-rights-pool/blob/master/contracts/templates/ElasticSupplyPool.sol * * @title Ampl Elastic Configurable Rights Pool. * * @dev Extension of Balancer labs' configurable rights pool (smart-pool...
NatSpecMultiLine
resyncWeight
function resyncWeight(address token) external logs lock needsBPool virtual { require(gradualUpdate.startBlock == 0, "ERR_NO_UPDATE_DURING_GRADUAL"); require(IBPool(address(bPool)).isBound(token), "ERR_NOT_BOUND"); // get cached balance uint tokenBalanceBefore = IBPool(address(bPool)...
/** * @notice Update the weight of a token without changing the price (or transferring tokens) * @param token The address of the token in the underlying BPool to be weight adjusted. * @dev Checks if the token's current pool balance has deviated from cached balance, * if so it adjusts the token's weights propor...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 4301, 6518 ] }
25,057
BOXToken
BOXToken.sol
0x63f584fa56e60e4d0fe8802b27c7e6e3b33e007f
Solidity
BOXToken
contract BOXToken is StandardToken, Ownable { string public name = "BOX Token"; string public symbol = "BOX"; uint public decimals = 18; // The token allocation uint public constant TOTAL_SUPPLY = 3000000000e18; uint public constant ALLOC_ECOSYSTEM = 900000000e18; // 30% ...
BOXToken
function BOXToken() public { balances[msg.sender] = TOTAL_SUPPLY; totalSupply = TOTAL_SUPPLY; // do the distribution of the token, in token transfer transfer(WALLET_ECOSYSTEM, ALLOC_ECOSYSTEM); transfer(WALLET_FOUNDATION, ALLOC_FOUNDATION); transfer(WALLET_TEAM, ALLOC_TEAM); transfe...
// FUNCTIONS
LineComment
v0.4.18+commit.9cf6e910
bzzr://8aa93948a2d9096564f89fc44d7f64f4e82517b4e2bd2e3daf81bae4addc8894
{ "func_code_index": [ 2180, 2617 ] }
25,058
BOXToken
BOXToken.sol
0x63f584fa56e60e4d0fe8802b27c7e6e3b33e007f
Solidity
BOXToken
contract BOXToken is StandardToken, Ownable { string public name = "BOX Token"; string public symbol = "BOX"; uint public decimals = 18; // The token allocation uint public constant TOTAL_SUPPLY = 3000000000e18; uint public constant ALLOC_ECOSYSTEM = 900000000e18; // 30% ...
getLockedAmount_contributors
function getLockedAmount_contributors(address _contributor) public nstant turns (uint256) uint256 countdownDate = contributors_countdownDate[_contributor]; uint256 lockedAmt = contributors_locked[_contributor]; if (now <= countdownDate + (180 * 1 days)) {return lockedAmt;} if (now <= count...
// get contributors' locked amount of token // this lockup will be released in 8 batches which take place every 180 days
LineComment
v0.4.18+commit.9cf6e910
bzzr://8aa93948a2d9096564f89fc44d7f64f4e82517b4e2bd2e3daf81bae4addc8894
{ "func_code_index": [ 2752, 3714 ] }
25,059
BOXToken
BOXToken.sol
0x63f584fa56e60e4d0fe8802b27c7e6e3b33e007f
Solidity
BOXToken
contract BOXToken is StandardToken, Ownable { string public name = "BOX Token"; string public symbol = "BOX"; uint public decimals = 18; // The token allocation uint public constant TOTAL_SUPPLY = 3000000000e18; uint public constant ALLOC_ECOSYSTEM = 900000000e18; // 30% ...
getLockedAmount_investors
function getLockedAmount_investors(address _investor) public nstant turns (uint256) uint256 delieveryDate = investors_deliveryDate[_investor]; uint256 lockedAmt = investors_locked[_investor]; if (now <= delieveryDate) {return lockedAmt;} if (now <= delieveryDate + 90 days) {return lockedAmt...
// get investors' locked amount of token // this lockup will be released in 3 batches: // 1. on delievery date // 2. three months after the delivery date // 3. six months after the delivery date
LineComment
v0.4.18+commit.9cf6e910
bzzr://8aa93948a2d9096564f89fc44d7f64f4e82517b4e2bd2e3daf81bae4addc8894
{ "func_code_index": [ 3938, 4420 ] }
25,060
BOXToken
BOXToken.sol
0x63f584fa56e60e4d0fe8802b27c7e6e3b33e007f
Solidity
BOXToken
contract BOXToken is StandardToken, Ownable { string public name = "BOX Token"; string public symbol = "BOX"; uint public decimals = 18; // The token allocation uint public constant TOTAL_SUPPLY = 3000000000e18; uint public constant ALLOC_ECOSYSTEM = 900000000e18; // 30% ...
setLockup_contributors
function setLockup_contributors(address _contributor, uint256 _value, uint256 _countdownDate) public onlyOwner { require(_contributor != address(0)); contributors_locked[_contributor] = _value; contributors_countdownDate[_contributor] = _countdownDate; UpdatedLockingState("contributor",...
// set lockup for contributors
LineComment
v0.4.18+commit.9cf6e910
bzzr://8aa93948a2d9096564f89fc44d7f64f4e82517b4e2bd2e3daf81bae4addc8894
{ "func_code_index": [ 4460, 4859 ] }
25,061
BOXToken
BOXToken.sol
0x63f584fa56e60e4d0fe8802b27c7e6e3b33e007f
Solidity
BOXToken
contract BOXToken is StandardToken, Ownable { string public name = "BOX Token"; string public symbol = "BOX"; uint public decimals = 18; // The token allocation uint public constant TOTAL_SUPPLY = 3000000000e18; uint public constant ALLOC_ECOSYSTEM = 900000000e18; // 30% ...
setLockup_investors
function setLockup_investors(address _investor, uint256 _value, uint256 _delieveryDate) public onlyOwner { require(_investor != address(0)); investors_locked[_investor] = _value; investors_deliveryDate[_investor] = _delieveryDate; UpdatedLockingState("investor", _investor, _value, _deli...
// set lockup for strategic investor
LineComment
v0.4.18+commit.9cf6e910
bzzr://8aa93948a2d9096564f89fc44d7f64f4e82517b4e2bd2e3daf81bae4addc8894
{ "func_code_index": [ 4904, 5275 ] }
25,062
BOXToken
BOXToken.sol
0x63f584fa56e60e4d0fe8802b27c7e6e3b33e007f
Solidity
BOXToken
contract BOXToken is StandardToken, Ownable { string public name = "BOX Token"; string public symbol = "BOX"; uint public decimals = 18; // The token allocation uint public constant TOTAL_SUPPLY = 3000000000e18; uint public constant ALLOC_ECOSYSTEM = 900000000e18; // 30% ...
transfer
function transfer(address _to, uint _value) public canTransfer(msg.sender, _value) turns (bool success) return super.transfer(_to, _value); }
// Transfer amount of tokens from sender account to recipient.
LineComment
v0.4.18+commit.9cf6e910
bzzr://8aa93948a2d9096564f89fc44d7f64f4e82517b4e2bd2e3daf81bae4addc8894
{ "func_code_index": [ 5343, 5530 ] }
25,063
BOXToken
BOXToken.sol
0x63f584fa56e60e4d0fe8802b27c7e6e3b33e007f
Solidity
BOXToken
contract BOXToken is StandardToken, Ownable { string public name = "BOX Token"; string public symbol = "BOX"; uint public decimals = 18; // The token allocation uint public constant TOTAL_SUPPLY = 3000000000e18; uint public constant ALLOC_ECOSYSTEM = 900000000e18; // 30% ...
transferFrom
function transferFrom(address _from, address _to, uint _value) public canTransfer(_from, _value) turns (bool success) return super.transferFrom(_from, _to, _value); }
// Transfer amount of tokens from a specified address to a recipient.
LineComment
v0.4.18+commit.9cf6e910
bzzr://8aa93948a2d9096564f89fc44d7f64f4e82517b4e2bd2e3daf81bae4addc8894
{ "func_code_index": [ 5605, 5817 ] }
25,064
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; }...
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0),"Use new owner address."); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 682, 905 ] }
25,065
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
function () external payable { tokensale(msg.sender); }
// Payable method // @notice Anyone can buy the tokens on tokensale by paying ether
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 5209, 5291 ] }
25,066
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
tokensale
function tokensale(address recipient) internal saleIsOpen isActive { require(recipient != address(0x0)); require(validPurchase()); require(whitelisted(recipient)); uint256 weiAmount = msg.value; uint256 numberToken = weiAmount.mul(RATE).div(1 ether); numberToken = applyBonus(nu...
// @notice tokensale // @param recipient The address of the recipient // @return the transaction address and send the event as Transfer
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 5445, 6688 ] }
25,067
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
transferToAll
function transferToAll(address[] memory tos, uint256[] memory values) public onlyOwner canTradable isActive { require( tos.length == values.length ); for(uint256 i = 0; i < tos.length; i++){ require(_icoSupply >= values[i]); totalNumberTokenSoldMainSale = total...
// used to transfer manually when senders are using BTC
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 8364, 8870 ] }
25,068
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
forwardFunds
function forwardFunds() internal { multisig.transfer(msg.value); }
// send ether to the fund collection wallet // override to create custom fund forwarding mechanisms
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 9889, 9974 ] }
25,069
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
validPurchase
function validPurchase() internal view returns (bool) { bool withinPeriod = (now >= mainSaleStartTime && now <= mainSaleEndTime) || (now >= preSaleStartTime && now <= preSaleEndTime); bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; }
// @return true if the transaction can buy tokens
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 10038, 10339 ] }
25,070
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
hasEnded
function hasEnded() public view returns (bool) { return now > mainSaleEndTime; }
// @return true if crowdsale current lot event has ended
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 10404, 10503 ] }
25,071
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
changeMultiSignatureWallet
function changeMultiSignatureWallet(address payable _multisig) public onlyOwner isActive { multisig = _multisig; }
// Set/change Multi-signature wallet address
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 10664, 10797 ] }
25,072
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
changeTokenRate
function changeTokenRate(uint _tokenPrice) public onlyOwner isActive { RATE = _tokenPrice; }
// Change ETH/Token exchange rate
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 10839, 10950 ] }
25,073
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
finishMinting
function finishMinting() public onlyOwner isActive { mintingFinished = true; emit MintFinished(); }
// Set Finish Minting.
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 10981, 11108 ] }
25,074
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
startTradable
function startTradable(bool _tradable) public onlyOwner isActive { tradable = _tradable; if (tradable) emit StartTradable(); else emit PauseTradable(); }
// Start or pause tradable to Transfer token
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 11161, 11377 ] }
25,075
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
changeMainSaleStartTime
function changeMainSaleStartTime(uint256 _mainSaleStartTime) public onlyOwner { mainSaleStartTime = _mainSaleStartTime; }
//Change mainSaleStartTime to start ICO manually
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 11535, 11675 ] }
25,076
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
changeMainSaleEndTime
function changeMainSaleEndTime(uint256 _mainSaleEndTime) public onlyOwner { mainSaleEndTime = _mainSaleEndTime; }
//Change mainSaleEndTime to end ICO manually
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 11728, 11860 ] }
25,077
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
changePreSaleEndTime
function changePreSaleEndTime(uint256 _preSaleEndTime) public onlyOwner { preSaleEndTime = _preSaleEndTime; }
//Change mainSaleEndTime to end ICO manually
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 12052, 12180 ] }
25,078
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
changeTotalSupply
function changeTotalSupply(uint256 newSupply) public onlyOwner { _totalSupply = newSupply; }
//Change total supply
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 12210, 12321 ] }
25,079
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
changeICOSupply
function changeICOSupply(uint256 newICOSupply) public onlyOwner { _icoSupply = newICOSupply; }
// In case multiple ICOs are planned, use this with the totalSupply function
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 12406, 12519 ] }
25,080
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
getRate
function getRate() public view returns (uint256 result) { return RATE; }
// Get current price of a Token // @return the price or token value for a ether
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 12612, 12703 ] }
25,081
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
balanceOf
function balanceOf(address who) public view returns (uint256) { return balances[who]; }
// ERC223 Methods // What is the balance of a particular account? // @param who The address of the particular account // @return the balance the particular account
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 13281, 13387 ] }
25,082
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
// @return total tokens supplied
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 13528, 13624 ] }
25,083
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
transfer
function transfer(address _to, uint _value, bytes memory _data) public { // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . uint codeLength; assembly { // Retrieve the size of the code on target address, this needs ass...
/** * @dev Transfer the specified amount of tokens to the specified address. * Invokes the `tokenFallback` function if the recipient is a contract. * The token transfer fails if the recipient is a contract * but does not implement the `tokenFallback` function * or the fallback function to ...
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 14428, 15481 ] }
25,084
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
transfer
function transfer(address _to, uint _value) public { uint codeLength; bytes memory empty; assembly { // Retrieve the size of the code on target address, this needs assembly . codeLength := extcodesize(_to) } if(role[msg.sender] == 2) { require(now >= projsealDate,...
/** * @dev Transfer the specified amount of tokens to the specified address. * This function works the same with the previous one * but doesn't contain `_data` param. * Added due to backwards compatibility reasons. * * @param _to Receiver address. * @param _value Amount of tokens that wi...
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 15869, 16786 ] }
25,085
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
transferFrom
function transferFrom(address from, address to, uint256 value) public canTradable isActive { require ( allowed[from][msg.sender] >= value && balances[from] >= value && value > 0 ); if(role[from] == 2) { require(now >= projsealDate,"you can not transfer yet"); } if(role[fr...
// @notice send `value` token to `to` from `from` // @param from The address of the sender // @param to The address of the recipient // @param value The amount of token to be transferred // @return the transaction address and send the event as Transfer
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 17067, 17772 ] }
25,086
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
approve
function approve(address spender, uint256 value) public isActive { require ( balances[msg.sender] >= value && value > 0 ); allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); }
// Allow spender to withdraw from your account, multiple times, up to the value amount. // If this function is called again it overwrites the current allowance with value. // @param spender The address of the sender // @param value The amount to be approved // @return the transaction address and send the event as Appro...
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 18122, 18386 ] }
25,087
WRTToken
WRTToken.sol
0x3f215ce0a5a0e10b61b04a1543106734aeec1b9b
Solidity
WRTToken
contract WRTToken is Ownable, ERC223 { using SafeMath for uint256; // Token properties string public name = "Warrior Token"; string public symbol = "WRT"; uint256 public decimals = 18; uint256 public numberDecimal18 = 1000000000000000000; uint256 public RATE = 360e18; // Distri...
allowance
function allowance(address _owner, address spender) public view returns (uint256) { return allowed[_owner][spender]; }
// Check the allowed value for the spender to withdraw from owner // @param owner The address of the owner // @param spender The address of the spender // @return the amount which spender is still allowed to withdraw from owner
LineComment
v0.5.3+commit.10d17f24
bzzr://70b0bf2ab7ddf9299930a50745e47b053b1ba9a8ed9f6388ac23433409314e95
{ "func_code_index": [ 18635, 18776 ] }
25,088
BounceERC1155WithSign
@openzeppelin/contracts/access/Ownable.sol
0x2b7cd781b2dff89cdcf3067015f2f961a84fe60a
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender =...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://658056408e7d929f1a543b1ad139914bed9fffb20fe295d21a49b80c2e12002a
{ "func_code_index": [ 506, 598 ] }
25,089
BounceERC1155WithSign
@openzeppelin/contracts/access/Ownable.sol
0x2b7cd781b2dff89cdcf3067015f2f961a84fe60a
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender =...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://658056408e7d929f1a543b1ad139914bed9fffb20fe295d21a49b80c2e12002a
{ "func_code_index": [ 1157, 1310 ] }
25,090
BounceERC1155WithSign
@openzeppelin/contracts/access/Ownable.sol
0x2b7cd781b2dff89cdcf3067015f2f961a84fe60a
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender =...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://658056408e7d929f1a543b1ad139914bed9fffb20fe295d21a49b80c2e12002a
{ "func_code_index": [ 1460, 1709 ] }
25,091
DistributeTokens
DistributeTokens.sol
0x7f58a73fdc40a5be5a65b3462d4bff37ad97adcd
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://c9e5e0ae65dd1dd67cd77131feab7f1ad274f8c2d5084781bf6da99812fb2789
{ "func_code_index": [ 261, 314 ] }
25,092
DistributeTokens
DistributeTokens.sol
0x7f58a73fdc40a5be5a65b3462d4bff37ad97adcd
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://c9e5e0ae65dd1dd67cd77131feab7f1ad274f8c2d5084781bf6da99812fb2789
{ "func_code_index": [ 637, 813 ] }
25,093
DistributeTokens
DistributeTokens.sol
0x7f58a73fdc40a5be5a65b3462d4bff37ad97adcd
Solidity
DistributeTokens
contract DistributeTokens is Ownable{ // uint[] public balances; // address[] public addresses; token tokenReward = token(0xd62e9252F1615F5c1133F060CF091aCb4b0faa2b); function register(address[] _addrs, uint[] _bals) onlyOwner{ // addresses = _addrs; // balances = _bals; // distribute(); for(uin...
withdrawTokens
function withdrawTokens(uint _amount) onlyOwner { tokenReward.transfer(owner,_amount); }
// function distribute() onlyOwner { // for(uint i = 0; i < addresses.length; ++i){ // tokenReward.transfer(addresses[i],balances[i]*10**18); // } // }
LineComment
v0.4.19+commit.c4cbbb05
bzzr://c9e5e0ae65dd1dd67cd77131feab7f1ad274f8c2d5084781bf6da99812fb2789
{ "func_code_index": [ 587, 682 ] }
25,094
ChainLinkPricer
/contracts/pricers/ChainlinkPricer.sol
0x0890e86f880ed85cf821a448e707d47715dd4378
Solidity
ChainLinkPricer
contract ChainLinkPricer is OpynPricerInterface { using SafeMath for uint256; /// @dev base decimals uint256 internal constant BASE = 8; /// @notice chainlink response decimals uint256 public aggregatorDecimals; /// @notice the opyn oracle address OracleInterface public oracle; /// @n...
/** * @notice A Pricer contract for one asset as reported by Chainlink */
NatSpecMultiLine
setExpiryPriceInOracle
function setExpiryPriceInOracle(uint256 _expiryTimestamp, uint80 _roundId) external { (, int256 price, , uint256 roundTimestamp, ) = aggregator.getRoundData(_roundId); require(_expiryTimestamp <= roundTimestamp, "ChainLinkPricer: roundId not first after expiry"); require(price >= 0, "ChainLinkPricer: inval...
/** * @notice set the expiry price in the oracle, can only be called by Bot address * @dev a roundId must be provided to confirm price validity, which is the first Chainlink price provided after the expiryTimestamp * @param _expiryTimestamp expiry to set a price for * @param _roundId the first roundId after expiryT...
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
{ "func_code_index": [ 1827, 3011 ] }
25,095
ChainLinkPricer
/contracts/pricers/ChainlinkPricer.sol
0x0890e86f880ed85cf821a448e707d47715dd4378
Solidity
ChainLinkPricer
contract ChainLinkPricer is OpynPricerInterface { using SafeMath for uint256; /// @dev base decimals uint256 internal constant BASE = 8; /// @notice chainlink response decimals uint256 public aggregatorDecimals; /// @notice the opyn oracle address OracleInterface public oracle; /// @n...
/** * @notice A Pricer contract for one asset as reported by Chainlink */
NatSpecMultiLine
getPrice
function getPrice() external view override returns (uint256) { (, int256 answer, , , ) = aggregator.latestRoundData(); require(answer > 0, "ChainLinkPricer: price is lower than 0"); // chainlink's answer is already 1e8 return _scaleToBase(uint256(answer)); }
/** * @notice get the live price for the asset * @dev overides the getPrice function in OpynPricerInterface * @return price of the asset in USD, scaled by 1e8 */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
{ "func_code_index": [ 3199, 3497 ] }
25,096
ChainLinkPricer
/contracts/pricers/ChainlinkPricer.sol
0x0890e86f880ed85cf821a448e707d47715dd4378
Solidity
ChainLinkPricer
contract ChainLinkPricer is OpynPricerInterface { using SafeMath for uint256; /// @dev base decimals uint256 internal constant BASE = 8; /// @notice chainlink response decimals uint256 public aggregatorDecimals; /// @notice the opyn oracle address OracleInterface public oracle; /// @n...
/** * @notice A Pricer contract for one asset as reported by Chainlink */
NatSpecMultiLine
getHistoricalPrice
function getHistoricalPrice(uint80 _roundId) external view override returns (uint256, uint256) { (, int256 price, , uint256 roundTimestamp, ) = aggregator.getRoundData(_roundId); return (_scaleToBase(uint256(price)), roundTimestamp); }
/** * @notice get historical chainlink price * @param _roundId chainlink round id * @return round price and timestamp */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
{ "func_code_index": [ 3644, 3903 ] }
25,097
ChainLinkPricer
/contracts/pricers/ChainlinkPricer.sol
0x0890e86f880ed85cf821a448e707d47715dd4378
Solidity
ChainLinkPricer
contract ChainLinkPricer is OpynPricerInterface { using SafeMath for uint256; /// @dev base decimals uint256 internal constant BASE = 8; /// @notice chainlink response decimals uint256 public aggregatorDecimals; /// @notice the opyn oracle address OracleInterface public oracle; /// @n...
/** * @notice A Pricer contract for one asset as reported by Chainlink */
NatSpecMultiLine
_scaleToBase
function _scaleToBase(uint256 _price) internal view returns (uint256) { if (aggregatorDecimals > BASE) { uint256 exp = aggregatorDecimals.sub(BASE); _price = _price.div(10**exp); } else if (aggregatorDecimals < BASE) { uint256 exp = BASE.sub(aggregatorDecimals); _price = _price.m...
/** * @notice scale aggregator response to base decimals (1e8) * @param _price aggregator price * @return price scaled to 1e8 */
NatSpecMultiLine
v0.6.10+commit.00c0fcaf
{ "func_code_index": [ 4058, 4458 ] }
25,098
MilkCrate
MilkCrate.sol
0x672309b435ae53604d4a8a67b963d9b8f96f4dfa
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipien...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://af6809813f35a3bbbc08bb7c09adf1c0f8d5c2b89d387cc5b671c9731ba6f9a8
{ "func_code_index": [ 163, 236 ] }
25,099