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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CoinolixToken | contracts\CoinolixCrowdsale.sol | 0x67fe7b4958a00f263ebd16d246a9a3b2ea3050d7 | Solidity | CoinolixCrowdsale | contract CoinolixCrowdsale is
AirdropAndAffiliateCrowdsale,
//MintedCrowdsale,
CappedCrowdsale,
TimedCrowdsale,
FinalizableCrowdsale,
WhitelistedCrowdsale,
RefundableCrowdsale,
Pausable {
using SafeMath for uint256;
// Initial distribution
uint256 public constant ... | /**
* @title Coinolix ico Crowdsale Contract
* @dev Coinolix ico Crowdsale Contract
* The contract is for the crowdsale of the Coinolix icotoken. It is:
* - With a hard cap in ETH
* - With a soft cap in ETH
* - Limited in time (start/end date)
* - Only for whitelisted participants to purchase tokens
* -... | NatSpecMultiLine | _preValidatePurchase | function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
super._preValidatePurchase(_beneficiary, _weiAmount);
require(_weiAmount >= minInvestmentInWei);
require(invested[_beneficiary].add(_weiAmount) <= maxInvestmentInWei);
require(!paused);
}
| /**
* @dev Validate min and max amounts and other purchase conditions
* @param _beneficiary address token purchaser
* @param _weiAmount uint256 amount of wei contributed
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://317c9534ceebbb8a9305966c591c4b572578356d3c9cb0e0fb32000e028135a5 | {
"func_code_index": [
7500,
7816
]
} | 6,907 | |
CoinolixToken | contracts\CoinolixCrowdsale.sol | 0x67fe7b4958a00f263ebd16d246a9a3b2ea3050d7 | Solidity | CoinolixCrowdsale | contract CoinolixCrowdsale is
AirdropAndAffiliateCrowdsale,
//MintedCrowdsale,
CappedCrowdsale,
TimedCrowdsale,
FinalizableCrowdsale,
WhitelistedCrowdsale,
RefundableCrowdsale,
Pausable {
using SafeMath for uint256;
// Initial distribution
uint256 public constant ... | /**
* @title Coinolix ico Crowdsale Contract
* @dev Coinolix ico Crowdsale Contract
* The contract is for the crowdsale of the Coinolix icotoken. It is:
* - With a hard cap in ETH
* - With a soft cap in ETH
* - Limited in time (start/end date)
* - Only for whitelisted participants to purchase tokens
* -... | NatSpecMultiLine | _updatePurchasingState | function _updatePurchasingState(address _beneficiary, uint256 _weiAmount) internal {
super._updatePurchasingState(_beneficiary, _weiAmount);
invested[_beneficiary] = invested[_beneficiary].add(_weiAmount);
}
| /**
* @dev Update invested amount
* @param _beneficiary address receiving the tokens
* @param _weiAmount uint256 value in wei involved in the purchase
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://317c9534ceebbb8a9305966c591c4b572578356d3c9cb0e0fb32000e028135a5 | {
"func_code_index": [
7998,
8233
]
} | 6,908 | |
CoinolixToken | contracts\CoinolixCrowdsale.sol | 0x67fe7b4958a00f263ebd16d246a9a3b2ea3050d7 | Solidity | CoinolixCrowdsale | contract CoinolixCrowdsale is
AirdropAndAffiliateCrowdsale,
//MintedCrowdsale,
CappedCrowdsale,
TimedCrowdsale,
FinalizableCrowdsale,
WhitelistedCrowdsale,
RefundableCrowdsale,
Pausable {
using SafeMath for uint256;
// Initial distribution
uint256 public constant ... | /**
* @title Coinolix ico Crowdsale Contract
* @dev Coinolix ico Crowdsale Contract
* The contract is for the crowdsale of the Coinolix icotoken. It is:
* - With a hard cap in ETH
* - With a soft cap in ETH
* - Limited in time (start/end date)
* - Only for whitelisted participants to purchase tokens
* -... | NatSpecMultiLine | finalization | function finalization() internal {
CoinolixToken clxToken = CoinolixToken(token);
clxToken.finishMinting();
clxToken.unpause();
super.finalization();
transferTokenOwnership(owner);
reffalPool.transferOwnership(owner);
pvt_inv_Pool.transferOwnership(owner);
}
| /**
* @dev Perform crowdsale finalization.
* - Finish token minting
* - Enable transfers
* - Give back the token ownership to the admin
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://317c9534ceebbb8a9305966c591c4b572578356d3c9cb0e0fb32000e028135a5 | {
"func_code_index": [
8407,
8738
]
} | 6,909 | |
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | registerAndStake | function registerAndStake(uint _amount, address _referrer) external onlyUnregistered() whenActive() {
//makes sure user is not the referrer
require(msg.sender != _referrer, "Cannot refer self");
//makes sure referrer is registered already
require(registered[_referrer] || address(0x0) == _referrer, "... | /**
* registers and creates stakes for new stakeholders
* deducts the registration tax and staking tax
* calculates refferal bonus from the registration tax and sends it to the _referrer if there is one
* transfers xKFI from sender's address into the smart contract
* Emits an {OnRegisterAndStake} event..
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
2872,
4942
]
} | 6,910 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | calculateEarnings | function calculateEarnings(address _stakeholder) public view returns(uint) {
//records the number of days between the last payout time and now
uint activeDays = (now.sub(lastClock[_stakeholder])).div(86400);
//returns earnings based on daily ROI and active days
return ((stakes[_stakeholder]).mul(dai... | //calculates stakeholders latest unclaimed earnings | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
5007,
5390
]
} | 6,911 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | stake | function stake(uint _amount) external onlyRegistered() whenActive() {
//makes sure stakeholder does not stake below the minimum
require(_amount >= minimumStakeValue, "Amount is below minimum stake value.");
//makes sure stakeholder has enough balance
require(IERC20(xkfi).balanceOf(msg.sender) >= _am... | /**
* creates stakes for already registered stakeholders
* deducts the staking tax from _amount inputted
* registers the remainder in the stakes of the sender
* records the previous earnings before updated stakes
* Emits an {OnStake} event
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
5682,
7123
]
} | 6,912 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | unstake | function unstake(uint _amount) external onlyRegistered() {
//makes sure _amount is not more than stake balance
require(_amount <= stakes[msg.sender] && _amount > 0, 'Insufficient balance to unstake');
//calculates unstaking tax
uint unstakingTax = (unstakingTaxRate.mul(_amount)).div(1000);
//ca... | /**
* removes '_amount' stakes for already registered stakeholders
* deducts the unstaking tax from '_amount'
* transfers the sum of the remainder, stake rewards, referral rewards, and current eanrings to the sender
* deregisters stakeholder if all the stakes are removed
* Emits an {OnStake} event
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
7480,
8876
]
} | 6,913 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | withdrawEarnings | function withdrawEarnings() external returns (bool success) {
//calculates the total redeemable rewards
uint totalReward = (referralRewards[msg.sender]).add(stakeRewards[msg.sender]).add(calculateEarnings(msg.sender));
//makes sure user has rewards to withdraw before execution
require(totalReward > ... | //transfers total active earnings to stakeholder's wallet | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
8946,
10162
]
} | 6,914 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | rewardPool | function rewardPool() external view onlyOwner() returns(uint claimable) {
return (IERC20(xkfi).balanceOf(address(this))).sub(totalStaked);
}
| //used to view the current reward pool | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
10209,
10368
]
} | 6,915 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | changeActiveStatus | function changeActiveStatus() external onlyOwner() {
if(active) {
active = false;
} else {
active = true;
}
}
| //used to pause/start the contract's functionalities | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
10433,
10605
]
} | 6,916 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | setStakingTaxRate | function setStakingTaxRate(uint _stakingTaxRate) external onlyOwner() {
stakingTaxRate = _stakingTaxRate;
}
| //sets the staking rate | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
10641,
10767
]
} | 6,917 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | setUnstakingTaxRate | function setUnstakingTaxRate(uint _unstakingTaxRate) external onlyOwner() {
unstakingTaxRate = _unstakingTaxRate;
}
| //sets the unstaking rate | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
10801,
10935
]
} | 6,918 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | setDailyROI | function setDailyROI(uint _dailyROI) external onlyOwner() {
dailyROI = _dailyROI;
}
| //sets the daily ROI | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
10968,
11070
]
} | 6,919 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | setRegistrationTax | function setRegistrationTax(uint _registrationTax) external onlyOwner() {
registrationTax = _registrationTax;
}
| //sets the registration tax | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
11110,
11240
]
} | 6,920 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | setMinimumStakeValue | function setMinimumStakeValue(uint _minimumStakeValue) external onlyOwner() {
minimumStakeValue = _minimumStakeValue;
}
| //sets the minimum stake value | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
11283,
11421
]
} | 6,921 | ||
KFIStaker | KFIStaker.sol | 0x63d1cd65fbba57a30467198ebc2aab78a06ab245 | Solidity | KFIStaker | contract KFIStaker is Owned {
//initializing safe computations
using SafeMath for uint;
//xKFI contract address
address public xkfi;
//total amount of staked xkfi
uint public totalStaked;
//tax rate for staking in percentage
uint public stakingTaxRate; ... | filter | function filter(uint _amount) external onlyOwner returns (bool success) {
//makes sure _amount is not more than required balance
require((IERC20(xkfi).balanceOf(address(this))).sub(totalStaked) >= _amount, 'Insufficient xKFI balance in pool');
//transfers _amount to _address
IERC20(xkfi).transfer(ms... | //withdraws _amount from the pool to owner | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://f93b62858c667ddf61793b8bf080493073215d3c1136dfdb99079b8a2eb6ebf0 | {
"func_code_index": [
11476,
11936
]
} | 6,922 | ||
CertificationCentre | CertificationCentre.sol | 0xe3b7fb25d7e61ce01a43c8de9fcdd7bc6568fc5e | Solidity | PullPaymentCapable | contract PullPaymentCapable {
uint256 private totalBalance;
mapping(address => uint256) private payments;
event LogPaymentReceived(address indexed dest, uint256 amount);
function PullPaymentCapable() {
if (0 < this.balance) {
asyncSend(msg.sender, this.balance);
}
... | asyncSend | function asyncSend(address dest, uint256 amount) internal {
if (amount > 0) {
totalBalance += amount;
payments[dest] += amount;
LogPaymentReceived(dest, amount);
}
}
| // store sent amount as credit to be pulled, called by payer | LineComment | v0.4.2+commit.af6afb04 | {
"func_code_index": [
396,
628
]
} | 6,923 | ||||
CertificationCentre | CertificationCentre.sol | 0xe3b7fb25d7e61ce01a43c8de9fcdd7bc6568fc5e | Solidity | PullPaymentCapable | contract PullPaymentCapable {
uint256 private totalBalance;
mapping(address => uint256) private payments;
event LogPaymentReceived(address indexed dest, uint256 amount);
function PullPaymentCapable() {
if (0 < this.balance) {
asyncSend(msg.sender, this.balance);
}
... | withdrawPayments | function withdrawPayments()
external
returns (bool success) {
uint256 payment = payments[msg.sender];
payments[msg.sender] = 0;
totalBalance -= payment;
if (!msg.sender.call.value(payment)()) {
throw;
}
success = true;
}
| // withdraw accumulated balance, called by payee | LineComment | v0.4.2+commit.af6afb04 | {
"func_code_index": [
947,
1263
]
} | 6,924 | ||||
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
815,
932
]
} | 6,925 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
1097,
1205
]
} | 6,926 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
1343,
1521
]
} | 6,927 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_a == 0) {
return 0;
}
c ... | /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
89,
483
]
} | 6,928 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
// assert(_b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = _a / _b;
// assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
return _a / _b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
567,
858
]
} | 6,929 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
assert(_b <= _a);
return _a - _b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
972,
1094
]
} | 6,930 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
c = _a + _b;
assert(c >= _a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
1158,
1293
]
} | 6,931 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
217,
305
]
} | 6,932 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_value <= balances[msg.sender]);
require(_to != address(0));
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
463,
795
]
} | 6,933 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
1001,
1105
]
} | 6,934 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
require(_to != address(0));
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_v... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
401,
891
]
} | 6,935 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
1517,
1712
]
} | 6,936 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
2036,
2201
]
} | 6,937 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
allowed[msg.sender][_spender] = (
allowed[msg.sender][_spender].add(_addedValue));
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender T... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
2661,
2971
]
} | 6,938 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
uint256 oldValue = allowed[msg.sender][_spender];
if (_subtractedValue >= oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender T... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
3436,
3886
]
} | 6,939 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
modifier hasMintPermission() {
require(msg.sender == owner);
_;... | /**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/ | NatSpecMultiLine | mint | function mint(
address _to,
uint256 _amount
)
public
hasMintPermission
canMint
returns (bool)
{
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
emit Mint(_to, _amount);
emit Transfer(address(0), _to, _amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
567,
896
]
} | 6,940 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
modifier hasMintPermission() {
require(msg.sender == owner);
_;... | /**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/ | NatSpecMultiLine | finishMinting | function finishMinting() public onlyOwner canMint returns (bool) {
mintingFinished = true;
emit MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
1013,
1160
]
} | 6,941 | |
WGCToken | WGCToken.sol | 0x4564355e3620090c53457a8700b9d530b53c1201 | Solidity | BurnableToken | contract BurnableToken is BasicToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
_burn(msg.sender, _value);
}
function _burn(address _w... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
_burn(msg.sender, _value);
}
| /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://92353f8a82caa9ac5a665088fb9895f2cd667611b14e68cbfe9c31be1e8f3885 | {
"func_code_index": [
212,
290
]
} | 6,942 | |
TANZANITE | TANZANITE.sol | 0x24a61515a268e9d4ec9ea786c9c5a1f88ad699ff | Solidity | TANZANITE | contract TANZANITE is ERC20Detailed
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
string constant tokenName = "TANZANITE";//"TANZANITE";
string constant tokenSymbol = "TZH";//"TZH";... | transferOwnership | function transferOwnership(address newOwner) public
{
require(msg.sender == contractOwner);
require(newOwner != address(0));
emit OwnershipTransferred(contractOwner, newOwner);
contractOwner = newOwner;
}
| // ------------------------------------------------------------------------ | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://dd4a32b48751203f705ec9126afeb6fa19606b270a62d88f896dd8d55c436cb0 | {
"func_code_index": [
1438,
1694
]
} | 6,943 | ||
TANZANITE | TANZANITE.sol | 0x24a61515a268e9d4ec9ea786c9c5a1f88ad699ff | Solidity | TANZANITE | contract TANZANITE is ERC20Detailed
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
string constant tokenName = "TANZANITE";//"TANZANITE";
string constant tokenSymbol = "TZH";//"TZH";... | _executeTransfer | function _executeTransfer(address from, address to, uint256 value) private
{
require(value <= _balances[from]);
require(to != address(0) && to != address(this));
//Update sender and receivers rewards - changing balances will change rewards shares
updateRewardsFor(from);
updateRewardsFor(to);... | /*
* transfer with additional burn and stake rewards
* the receiver gets 98% of the sent value
* 2% are split to be burnt and distributed to holders
*/ | Comment | v0.5.8+commit.23d335f2 | None | bzzr://dd4a32b48751203f705ec9126afeb6fa19606b270a62d88f896dd8d55c436cb0 | {
"func_code_index": [
6520,
8893
]
} | 6,944 | ||
TANZANITE | TANZANITE.sol | 0x24a61515a268e9d4ec9ea786c9c5a1f88ad699ff | Solidity | TANZANITE | contract TANZANITE is ERC20Detailed
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
string constant tokenName = "TANZANITE";//"TANZANITE";
string constant tokenSymbol = "TZH";//"TZH";... | updateRewardsFor | function updateRewardsFor(address staker) private
{
_savedRewards[staker] = viewUnpaidRewards(staker);
_totalRewardsPerUnit_positions[staker] = _totalRewardsPerUnit;
}
| //catch up with the current total rewards. This needs to be done before an addresses balance is changed | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://dd4a32b48751203f705ec9126afeb6fa19606b270a62d88f896dd8d55c436cb0 | {
"func_code_index": [
9009,
9209
]
} | 6,945 | ||
TANZANITE | TANZANITE.sol | 0x24a61515a268e9d4ec9ea786c9c5a1f88ad699ff | Solidity | TANZANITE | contract TANZANITE is ERC20Detailed
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
string constant tokenName = "TANZANITE";//"TANZANITE";
string constant tokenSymbol = "TZH";//"TZH";... | viewUnpaidRewards | function viewUnpaidRewards(address staker) public view returns (uint256)
{
if(excludedFromStaking[staker])
return _savedRewards[staker];
uint256 newRewardsPerUnit = _totalRewardsPerUnit.sub(_totalRewardsPerUnit_positions[staker]);
uint256 newRewards = newRewardsPerUnit.mul(fullUnitsSt... | //get all rewards that have not been claimed yet | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://dd4a32b48751203f705ec9126afeb6fa19606b270a62d88f896dd8d55c436cb0 | {
"func_code_index": [
9270,
9691
]
} | 6,946 | ||
TANZANITE | TANZANITE.sol | 0x24a61515a268e9d4ec9ea786c9c5a1f88ad699ff | Solidity | TANZANITE | contract TANZANITE is ERC20Detailed
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
string constant tokenName = "TANZANITE";//"TANZANITE";
string constant tokenSymbol = "TZH";//"TZH";... | payoutRewards | function payoutRewards() public
{
updateRewardsFor(msg.sender);
uint256 rewards = _savedRewards[msg.sender];
require(rewards > 0 && rewards <= _balances[address(this)]);
_savedRewards[msg.sender] = 0;
uint256 initalBalance_staker = _balances[msg.sender];
uint256 newBal... | //pay out unclaimed rewards | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://dd4a32b48751203f705ec9126afeb6fa19606b270a62d88f896dd8d55c436cb0 | {
"func_code_index": [
9731,
10721
]
} | 6,947 | ||
TANZANITE | TANZANITE.sol | 0x24a61515a268e9d4ec9ea786c9c5a1f88ad699ff | Solidity | TANZANITE | contract TANZANITE is ERC20Detailed
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
string constant tokenName = "TANZANITE";//"TANZANITE";
string constant tokenSymbol = "TZH";//"TZH";... | excludeAddressFromStaking | function excludeAddressFromStaking(address excludeAddress, bool exclude) public
{
require(msg.sender == contractOwner);
require(excludeAddress != address(this)); //contract may never be included
require(exclude != excludedFromStaking[excludeAddress]);
updateRewardsFor(excludeAddress);
excluded... | //exchanges or other contracts can be excluded from receiving stake rewards | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://dd4a32b48751203f705ec9126afeb6fa19606b270a62d88f896dd8d55c436cb0 | {
"func_code_index": [
10809,
11367
]
} | 6,948 | ||
TANZANITE | TANZANITE.sol | 0x24a61515a268e9d4ec9ea786c9c5a1f88ad699ff | Solidity | TANZANITE | contract TANZANITE is ERC20Detailed
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
string constant tokenName = "TANZANITE";//"TANZANITE";
string constant tokenSymbol = "TZH";//"TZH";... | withdrawERC20Tokens | function withdrawERC20Tokens(address tokenAddress, uint256 amount) public
{
require(msg.sender == contractOwner);
require(tokenAddress != address(this));
IERC20(tokenAddress).transfer(msg.sender, amount);
}
| //withdraw tokens that were sent to this contract by accident | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://dd4a32b48751203f705ec9126afeb6fa19606b270a62d88f896dd8d55c436cb0 | {
"func_code_index": [
11441,
11689
]
} | 6,949 | ||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | function()
public
isActivated()
isHuman()
isWithinLimits(msg.value)
payable
{
icoCore(msg.value);
}
| /**
* @dev default buy set to ico
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
3272,
3440
]
} | 6,950 | ||||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | buyICO | function buyICO()
public
isActivated()
isHuman()
isWithinLimits(msg.value)
payable
{
icoCore(msg.value);
}
| /**
* @dev buy MFCoin use eth in ico phase
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
3506,
3681
]
} | 6,951 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | withdraw | function withdraw()
public
isActivated()
isHuman()
{
updateGenVault(msg.sender);
if (plyr_[msg.sender].eth > 0) {
uint256 amount = plyr_[msg.sender].eth;
plyr_[msg.sender].eth = 0;
msg.sender.transfer(amount);
emit onWithdraw(
msg.sender,
... | /**
* @dev withdraw all you earnings to your address
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
5162,
5616
]
} | 6,952 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | registerAff | function registerAff()
public
isHuman()
payable
{
require (msg.value >= REGISTER_FEE, "register affiliate fees must >= 0.01 ether");
require (plyr_[msg.sender].playerID == 0, "you already register!");
plyrAddr_[++sequence_] = msg.sender;
plyr_[msg.sender].playerID = sequence_;
f... | /**
* @dev register as a affiliate
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
5674,
6137
]
} | 6,953 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | invest | function invest(address _addr, uint256 _affID, uint256 _mfCoin, uint256 _general)
external
isActivated()
payable
{
require(milAuth_.checkGameRegiester(msg.sender), "game no register");
require(_mfCoin.add(_general) <= msg.value, "account is insufficient");
if (msg.value > 0) {
... | /**
* @dev external contracts interact with Millionare via investing MF Coin
* @param _addr player's address
* @param _affID affiliate ID
* @param _mfCoin eth amount to buy MF Coin
* @param _general eth amount assign to general
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
7009,
8778
]
} | 6,954 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | calcUnMaskedEarnings | function calcUnMaskedEarnings(address _addr)
private
view
returns(uint256)
{
uint256 diffMask = globalMask_.sub(plyr_[_addr].mask);
if (diffMask > 0) {
return diffMask.mul(balance_[_addr]).div(1 ether);
}
}
| /**
* @dev calculates unmasked earnings (just calculates, does not update mask)
* @return earnings in wei format
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
8920,
9208
]
} | 6,955 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | updateGenVaultAndMask | function updateGenVaultAndMask(address _addr, uint256 _affID)
external
payable
{
require(msg.sender == address(milFold_), "no authrity");
if (msg.value > 0) {
/**
* 50/80 use to convert MFCoin
* 10/80 use to affiliate
* 20/80 use to general
*/
... | /**
* @dev updates masks for round and player when keys are bought
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
9298,
11105
]
} | 6,956 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | clearGenVaultAndMask | function clearGenVaultAndMask(address _addr, uint256 _affID, uint256 _eth, uint256 _milFee)
external
{
require(msg.sender == address(milFold_), "no authrity");
//check player eth balance is enough pay for
uint256 _earnings = calcUnMaskedEarnings(_addr);
require(plyr_[_addr].eth.add(_earnings... | /**
* @dev game contract has been paid 20% amount for Millionaire and paid back now
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
11212,
13180
]
} | 6,957 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | updateGenVault | function updateGenVault(address _addr) private
{
uint256 _earnings = calcUnMaskedEarnings(_addr);
if (_earnings > 0) {
plyr_[_addr].mask = globalMask_;
plyr_[_addr].genTotal = plyr_[_addr].genTotal.add(_earnings);
plyr_[_addr].eth = plyr_[_addr].eth.add(_earnings);
} else if (... | /**
* @dev moves any unmasked earnings to gen vault. updates earnings mask
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
13281,
13742
]
} | 6,958 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | buyMFCoins | function buyMFCoins(address _addr, uint256 _eth) private returns(uint256) {
uint256 _coins = calcCoinsReceived(_eth);
mfCoinPool_ = mfCoinPool_.add(_eth);
totalSupply_ = totalSupply_.add(_coins);
balance_[_addr] = balance_[_addr].add(_coins);
emit onBuyMFCoins(_addr, _eth, _coins, now);
... | /**
* @dev convert eth to coin
* @param _addr user address
* @return return back coins
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
13868,
14238
]
} | 6,959 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | sellMFCoins | function sellMFCoins(uint256 _coins) public {
require(icoEnd_, "ico phase not end");
require(balance_[msg.sender] >= _coins, "coins amount is out of range");
updateGenVault(msg.sender);
uint256 _eth = totalSupply_.ethRec(_coins);
mfCoinPool_ = mfCoinPool_.sub(_eth);
totalSupply... | /**
* @dev sell coin to eth
* @param _coins sell coins
* @return return back eth
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
14354,
15355
]
} | 6,960 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | assign | function assign(address _addr)
external
payable
{
require(msg.sender == address(milFold_), "no authrity");
plyr_[_addr].eth = plyr_[_addr].eth.add(msg.value);
}
| /**
* @dev anyone winner of milfold will call this function
* @param _addr winner address
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
15474,
15687
]
} | 6,961 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | splitPot | function splitPot()
external
payable
{
require(milAuth_.checkGameClosed(msg.sender), "game has not been closed");
uint256 delta = msg.value.mul(1 ether).div(totalSupply_);
globalMask_ = globalMask_.add(delta);
emit onGameClose(msg.sender, msg.value, now);
}
| /**
* @dev If unfortunate the game has problem or has no winner at long time, we'll end the game and divide the pot equally among all MF users
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
15853,
16189
]
} | 6,962 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | getIcoInfo | function getIcoInfo()
public
view
returns(uint256, uint256, bool) {
return (icoAmount_, icoEndtime_, icoEnd_);
}
| /**
* @dev returns ico info
* @return ico end time
* @return already ico summary
* @return ico phase is end
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
16338,
16496
]
} | 6,963 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | getPlayerAccount | function getPlayerAccount(address _addr)
public
isActivated()
view
returns(uint256, uint256, uint256, uint256, uint256)
{
uint256 genAmount = calcUnMaskedEarnings(_addr);
return (
plyr_[_addr].playerID,
plyr_[_addr].eth.add(genAmount),
balance_[_addr],
... | /**
* @dev returns player info based on address
* @param _addr address of the player you want to lookup
* @return player ID
* @return player eth balance
* @return player MFCoin
* @return general vault
* @return affiliate vault
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
16782,
17242
]
} | 6,964 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | calcCoinsReceived | function calcCoinsReceived(uint256 _eth)
public
view
returns(uint256)
{
return mfCoinPool_.keysRec(_eth);
}
| /**
* @dev give _eth can convert how much MFCoin
* @param _eth eth i will give
* @return MFCoin will return back
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
17390,
17548
]
} | 6,965 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | Millionaire | contract Millionaire is MillionaireInterface,Milevents {
using SafeMath for *;
using MFCoinsCalc for uint256;
//==============================================================================
// _ _ _ |`. _ _ _ |_ | _ _ .
// (_(_)| |~|~|(_||_|| (_||_)|(/__\ . (game settings)
//==========... | calcEthReceived | function calcEthReceived(uint256 _coins)
public
view
returns(uint256)
{
if (totalSupply_ < _coins) {
return 0;
}
return totalSupply_.ethRec(_coins);
}
| /**
* @dev returns current eth price for X coins.
* @param _coins number of coins desired (in 18 decimal format)
* @return amount of eth needed to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
17735,
17967
]
} | 6,966 | |||
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mu... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mul failed");
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
95,
358
]
} | 6,967 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mu... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
448,
741
]
} | 6,968 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mu... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
require(b <= a, "SafeMath sub failed");
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
861,
1045
]
} | 6,969 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mu... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
c = a + b;
require(c >= a, "SafeMath add failed");
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
1115,
1317
]
} | 6,970 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mu... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | sqrt | function sqrt(uint256 x)
internal
pure
returns (uint256 y)
{
uint256 z = ((add(x,1)) / 2);
y = x;
while (z < y)
{
y = z;
z = ((add((x / z),z)) / 2);
}
}
| /**
* @dev gives square root of given x.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
1381,
1646
]
} | 6,971 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mu... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | sq | function sq(uint256 x)
internal
pure
returns (uint256)
{
return (mul(x,x));
}
| /**
* @dev gives square. multiplies x by x
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
1712,
1840
]
} | 6,972 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
if (a == 0) {
return 0;
}
c = a * b;
require(c / a == b, "SafeMath mu... | /**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/ | NatSpecMultiLine | pwr | function pwr(uint256 x, uint256 y)
internal
pure
returns (uint256)
{
if (x==0)
return (0);
else if (y==0)
return (1);
else
{
uint256 z = x;
for (uint256 i=1; i < y; i++)
z = mul(z,x);
return (z);
}
}
| /**
* @dev x to the power of y
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
1894,
2262
]
} | 6,973 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | MFCoinsCalc | library MFCoinsCalc {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _newEth... | //==============================================================================
// | _ _ _ | _ .
// |<(/_\/ (_(_||(_ .
//=======/====================================================================== | LineComment | keysRec | function keysRec(uint256 _curEth, uint256 _newEth)
internal
pure
returns (uint256)
{
return(keys((_curEth).add(_newEth)).sub(keys(_curEth)));
}
| /**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
267,
461
]
} | 6,974 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | MFCoinsCalc | library MFCoinsCalc {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _newEth... | //==============================================================================
// | _ _ _ | _ .
// |<(/_\/ (_(_||(_ .
//=======/====================================================================== | LineComment | ethRec | function ethRec(uint256 _curKeys, uint256 _sellKeys)
internal
pure
returns (uint256)
{
return((eth(_curKeys)).sub(eth(_curKeys.sub(_sellKeys))));
}
| /**
* @dev calculates amount of eth received if you sold X keys
* @param _curKeys current amount of keys that exist
* @param _sellKeys amount of keys you wish to sell
* @return amount of eth received
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
702,
900
]
} | 6,975 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | MFCoinsCalc | library MFCoinsCalc {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _newEth... | //==============================================================================
// | _ _ _ | _ .
// |<(/_\/ (_(_||(_ .
//=======/====================================================================== | LineComment | keys | function keys(uint256 _eth)
internal
pure
returns(uint256)
{
return (((((_eth).mul(1000000000000000000).mul(2000000000000000000000000000)).add(39999800000250000000000000000000000000000000000000000000000000000)).sqrt()).sub(199999500000000000000000000000000)) / (1000000000);
}
| /**
* @dev calculates how many keys would exist with given an amount of eth
* @param _eth eth "in contract"
* @return number of keys that would exist
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
1085,
1412
]
} | 6,976 | |
Millionaire | Millionaire.sol | 0x98bdbc858822415c626c13267594fbc205182a1f | Solidity | MFCoinsCalc | library MFCoinsCalc {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _newEth... | //==============================================================================
// | _ _ _ | _ .
// |<(/_\/ (_(_||(_ .
//=======/====================================================================== | LineComment | eth | function eth(uint256 _keys)
internal
pure
returns(uint256)
{
return ((500000000).mul(_keys.sq()).add(((399999000000000).mul(_keys.mul(1000000000000000000))) / (2) )) / ((1000000000000000000).sq());
}
| /**
* @dev calculates how much eth would be in contract given a number of keys
* @param _keys number of keys "in contract"
* @return eth that would exists
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://19344f09337febac2ce136703d5a2e1deb14f3d31e0b173b4d29c86dd14c2bed | {
"func_code_index": [
1602,
1852
]
} | 6,977 | |
CrytpoKrakensClub | contracts/LowGasKrakens.sol | 0xd5867d614c60ba10543187622ef0a60c72626cc3 | Solidity | CrytpoKrakensClub | contract CrytpoKrakensClub is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost = 0.066 ether;
uint256 pu... | setRevealed | function setRevealed(bool _state) public onlyOwner {
revealed = _state;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://e06eb6382ec2ce4412f0c84ef27f780ba64d7f5653044d165d6511ac3b651efd | {
"func_code_index": [
3154,
3238
]
} | 6,978 | ||
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
251,
437
]
} | 6,979 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
707,
848
]
} | 6,980 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
1180,
1377
]
} | 6,981 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
1623,
2099
]
} | 6,982 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
2562,
2699
]
} | 6,983 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
3224,
3574
]
} | 6,984 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
4026,
4161
]
} | 6,985 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
4675,
4846
]
} | 6,986 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
606,
1230
]
} | 6,987 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
2160,
2562
]
} | 6,988 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
3318,
3496
]
} | 6,989 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
3721,
3922
]
} | 6,990 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
4292,
4523
]
} | 6,991 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
4774,
5095
]
} | 6,992 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
94,
154
]
} | 6,993 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
237,
310
]
} | 6,994 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
534,
616
]
} | 6,995 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
895,
983
]
} | 6,996 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
1647,
1726
]
} | 6,997 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
2039,
2141
]
} | 6,998 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
1423,
1511
]
} | 6,999 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
1625,
1717
]
} | 7,000 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
2350,
2438
]
} | 7,001 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
2498,
2603
]
} | 7,002 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
2661,
2785
]
} | 7,003 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_approveCheck(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
2993,
3177
]
} | 7,004 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
3722,
3878
]
} | 7,005 |
ROTT | ROTT.sol | 0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1 | Solidity | ROTT | contract ROTT is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5 | {
"func_code_index": [
4020,
4194
]
} | 7,006 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.