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
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
getAbonus
function getAbonus(address token) public { uint256 tokenAmount = _tokenSave.checkAmount(address(msg.sender), token); require(tokenAmount > 0, "Insufficient storage balance"); reloadTime(); reloadToken(token); ...
/** * @dev Receiving * @param token Receiving token address */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 10038, 11235 ] }
57,861
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
reloadTime
function reloadTime() private { uint256 nowTime = now; // The current time must exceed the bonus time if (nowTime >= _nextTime) { uint256 time = (nowTime.sub(_nextTime)).div(_timeLimit); ui...
/** * @dev Update bonus time and stage ledger */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 11306, 12257 ] }
57,862
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
reloadToken
function reloadToken(address token) private { if (!_snapshot[token][_times.sub(1)]) { levelingResult(token); _abonusMapping[token] = _abonusContract.getETHNum(token); _tokenAllValueMapping[token] =...
/** * @dev Snapshot of the amount of tokens * @param token Receiving token address */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 12370, 12875 ] }
57,863
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
levelingResult
function levelingResult(address token) private { uint256 steps; if (token == address(_nestContract)) { steps = allValue(token).div(_expectedSpanForNest); } else { steps = allValue(token).div(_expectedSpanForNToken); } uint256 minimumAbonus = _expectedMinimum; for (uint256...
/** * @dev Leveling settlement * @param token Receiving token address */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 12975, 14650 ] }
57,864
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
getInfo
function getInfo(address token) public view returns (uint256 nextTime, uint256 getAbonusTime, uint256 ethNum, uint256 tokenValue, uint256 myJoinToken, uint256 getEth, uint256 allowNum, uint256 leftNum, bool allowAbonus) { uint256 nowTime = now; if (nowTime >= _nextTime.sub(_timeLimit) && nowTime <= _nextTime...
// Next bonus time, current bonus deadline, ETH number, NEST number, NEST participating in bonus, bonus to receive, approved amount, balance, whether bonus can be paid
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 14832, 16286 ] }
57,865
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
getNextTime
function getNextTime() public view returns (uint256) { uint256 nowTime = now; if (_nextTime > nowTime) { return _nextTime; } else { uint256 time = (nowTime.sub(_nextTime)).div(_timeLimit); return _nextTime.add(_timeLimit.mul(time.add(1))); } }
/** * @dev View next bonus time * @return Next bonus time */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 16376, 16706 ] }
57,866
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
allValue
function allValue(address token) public view returns (uint256) { if (token == address(_nestContract)) { uint256 all = 10000000000 ether; uint256 leftNum = all.sub(_nestContract.balanceOf(address(_voteFactory.checkAddress("nest.v3.miningSave")))).sub(_nestContract.balanceOf(address(_destructionAdd...
/** * @dev View total circulation * @return Total circulation */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 16799, 17257 ] }
57,867
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkTimeLimit
function checkTimeLimit() public view returns (uint256) { return _timeLimit; }
/** * @dev View bonus period * @return Bonus period */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 17339, 17436 ] }
57,868
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkGetAbonusTimeLimit
function checkGetAbonusTimeLimit() public view returns (uint256) { return _getAbonusTimeLimit; }
/** * @dev View duration of triggering calculation of bonus * @return Bonus period */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 17549, 17664 ] }
57,869
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkMinimumAbonus
function checkMinimumAbonus(address token) public view returns (uint256) { uint256 miningAmount; if (token == address(_nestContract)) { miningAmount = allValue(token).div(_expectedSpanForNest); } else { miningAmount = allValue(token).div(_expectedSpanForNToken); } uint256 mini...
/** * @dev View current lowest expected bonus * @return Current lowest expected bonus */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 17780, 18361 ] }
57,870
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkSnapshot
function checkSnapshot(address token) public view returns (bool) { return _snapshot[token][_times.sub(1)]; }
/** * @dev Check whether the bonus token is snapshoted * @param token Token address * @return Whether snapshoted */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 18509, 18636 ] }
57,871
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkeExpectedIncrement
function checkeExpectedIncrement() public view returns (uint256) { return _expectedIncrement; }
/** * @dev Check the expected bonus incremental ratio * @return Expected bonus increment ratio */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 18761, 18875 ] }
57,872
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkExpectedMinimum
function checkExpectedMinimum() public view returns (uint256) { return _expectedMinimum; }
/** * @dev View expected minimum bonus * @return Expected minimum bonus */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 18977, 19086 ] }
57,873
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkSavingLevelOne
function checkSavingLevelOne() public view returns (uint256) { return _savingLevelOne; }
/** * @dev View savings threshold * @return Save threshold */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 19175, 19282 ] }
57,874
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkTokenAllValueHistory
function checkTokenAllValueHistory(address token, uint256 times) public view returns (uint256) { return _tokenAllValueHistory[token][times]; }
/** * @dev View NEST liquidity snapshot * @param token Locked token address * @param times Bonus snapshot period */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 19650, 19811 ] }
57,875
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkTokenSelfHistory
function checkTokenSelfHistory(address token, uint256 times, address user) public view returns (uint256) { return _tokenSelfHistory[token][times][user]; }
/** * @dev View personal lock-up NEST snapshot * @param times Bonus snapshot period * @param user User address * @return The number of personal locked NEST snapshots */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 20017, 20190 ] }
57,876
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkTimes
function checkTimes() public view returns (uint256) { return _times; }
// View the period number of bonus
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 20237, 20326 ] }
57,877
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkExpectedSpanForNest
function checkExpectedSpanForNest() public view returns (uint256) { return _expectedSpanForNest; }
// NEST expected bonus increment threshold
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 20381, 20498 ] }
57,878
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkExpectedSpanForNToken
function checkExpectedSpanForNToken() public view returns (uint256) { return _expectedSpanForNToken; }
// NToken expected bonus increment threshold
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 20555, 20676 ] }
57,879
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkSavingLevelTwoSub
function checkSavingLevelTwoSub() public view returns (uint256) { return _savingLevelTwoSub; }
// View the function parameters of savings threshold level 3
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 20749, 20862 ] }
57,880
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
checkSavingLevelThreeSub
function checkSavingLevelThreeSub() public view returns (uint256) { return _savingLevelThreeSub; }
// View the function parameters of savings threshold level 3
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 20935, 21052 ] }
57,881
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeTimeLimit
function changeTimeLimit(uint256 hour) public onlyOwner { require(hour > 0, "Parameter needs to be greater than 0"); _timeLimit = hour.mul(1 hours); }
/** * @dev Update bonus period * @param hour Bonus period (hours) */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 21148, 21326 ] }
57,882
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeGetAbonusTimeLimit
function changeGetAbonusTimeLimit(uint256 hour) public onlyOwner { require(hour > 0, "Parameter needs to be greater than 0"); _getAbonusTimeLimit = hour; }
/** * @dev Update collection period * @param hour Collection period (hours) */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 21432, 21615 ] }
57,883
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeExpectedIncrement
function changeExpectedIncrement(uint256 num) public onlyOwner { require(num > 0, "Parameter needs to be greater than 0"); _expectedIncrement = num; }
/** * @dev Update expected bonus increment ratio * @param num Expected bonus increment ratio */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 21738, 21916 ] }
57,884
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeExpectedMinimum
function changeExpectedMinimum(uint256 num) public onlyOwner { require(num > 0, "Parameter needs to be greater than 0"); _expectedMinimum = num; }
/** * @dev Update expected minimum bonus * @param num Expected minimum bonus */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 22023, 22197 ] }
57,885
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeSavingLevelOne
function changeSavingLevelOne(uint256 threshold) public onlyOwner { _savingLevelOne = threshold; }
/** * @dev Update saving threshold * @param threshold Saving threshold */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 22299, 22416 ] }
57,886
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeSavingLevelTwoSub
function changeSavingLevelTwoSub(uint256 num) public onlyOwner { _savingLevelTwoSub = num; }
/** * @dev Update the function parameters of savings threshold level 2 */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 22752, 22863 ] }
57,887
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeSavingLevelThreeSub
function changeSavingLevelThreeSub(uint256 num) public onlyOwner { _savingLevelThreeSub = num; }
/** * @dev Update the function parameters of savings threshold level 3 */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 22959, 23074 ] }
57,888
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeExpectedSpanForNest
function changeExpectedSpanForNest(uint256 num) public onlyOwner { _expectedSpanForNest = num; }
/** * @dev Update NEST expected bonus incremental threshold * @param num Threshold */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 23187, 23302 ] }
57,889
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_TokenAbonus
contract Nest_3_TokenAbonus { using address_make_payable for address; using SafeMath for uint256; ERC20 _nestContract; Nest_3_TokenSave _tokenSave; // Lock-up contract Nest_3_Abonus _abonusContract; ...
/** * @title Dividend logic * @dev Some operations about dividend,logic and asset separation */
NatSpecMultiLine
changeExpectedSpanForNToken
function changeExpectedSpanForNToken(uint256 num) public onlyOwner { _expectedSpanForNToken = num; }
/** * @dev Update NToken expected bonus incremental threshold * @param num Threshold */
NatSpecMultiLine
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 23417, 23536 ] }
57,890
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_VoteFactory
interface Nest_3_VoteFactory { // Check if there is a vote currently participating function checkVoteNow(address user) external view returns(bool); // Check address function checkAddress(string calldata name) external view returns (address contractAddress); // Check whether the administrator functi...
// Voting factory contract
LineComment
checkVoteNow
function checkVoteNow(address user) external view returns(bool);
// Check if there is a vote currently participating
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 89, 158 ] }
57,891
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_VoteFactory
interface Nest_3_VoteFactory { // Check if there is a vote currently participating function checkVoteNow(address user) external view returns(bool); // Check address function checkAddress(string calldata name) external view returns (address contractAddress); // Check whether the administrator functi...
// Voting factory contract
LineComment
checkAddress
function checkAddress(string calldata name) external view returns (address contractAddress);
// Check address
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 181, 275 ] }
57,892
Nest_3_TokenAbonus
Nest_3_TokenAbonus.sol
0x19e1d193a448bd13097efc2aea867468726e67c5
Solidity
Nest_3_VoteFactory
interface Nest_3_VoteFactory { // Check if there is a vote currently participating function checkVoteNow(address user) external view returns(bool); // Check address function checkAddress(string calldata name) external view returns (address contractAddress); // Check whether the administrator functi...
// Voting factory contract
LineComment
checkOwners
function checkOwners(address man) external view returns (bool);
// Check whether the administrator
LineComment
v0.6.0+commit.26b70077
GNU GPLv3
ipfs://a1c7e604d5c5c0a6323d906036e369370f2d48c7dff1a479979d56bee48ef1ea
{ "func_code_index": [ 313, 378 ] }
57,893
PoolTogetherEVMBridgeRoot
contracts/PoolTogetherEVMBridgeRoot.sol
0xfe6c5ae087366a7119f12946d07e04c94bb7a048
Solidity
PoolTogetherEVMBridgeRoot
contract PoolTogetherEVMBridgeRoot is Ownable, FxBaseRootTunnel { /// @notice Emitted when a message is sent to the child chain event SentMessagesToChild(Message[] data); /// @notice Structure of a message to be sent to the child chain struct Message { uint8 callType; address to; ...
/// @title PoolTogetherEVMBridgeRoot lives on the parent chain (e.g. eth mainnet) and sends messages to a child chain
NatSpecSingleLine
execute
function execute(Message[] calldata messages) external onlyOwner returns (bool) { bytes memory encodedMessages; for(uint i =0; i < messages.length; i++){ encodedMessages = abi.encodePacked( encodedMessages, messages[i].callType, messages[i].t...
/// @notice Structure of a message to be sent to the child chain /// @param messages Array of Message's that will be encoded and sent to the child chain
NatSpecSingleLine
v0.7.3+commit.9bfce1f6
MIT
{ "func_code_index": [ 952, 1567 ] }
57,894
PoolTogetherEVMBridgeRoot
contracts/PoolTogetherEVMBridgeRoot.sol
0xfe6c5ae087366a7119f12946d07e04c94bb7a048
Solidity
PoolTogetherEVMBridgeRoot
contract PoolTogetherEVMBridgeRoot is Ownable, FxBaseRootTunnel { /// @notice Emitted when a message is sent to the child chain event SentMessagesToChild(Message[] data); /// @notice Structure of a message to be sent to the child chain struct Message { uint8 callType; address to; ...
/// @title PoolTogetherEVMBridgeRoot lives on the parent chain (e.g. eth mainnet) and sends messages to a child chain
NatSpecSingleLine
_processMessageFromChild
function _processMessageFromChild(bytes memory message) internal override { // no-op }
/// @notice Function called as callback from child network /// @param message The message from the child chain
NatSpecSingleLine
v0.7.3+commit.9bfce1f6
MIT
{ "func_code_index": [ 1688, 1790 ] }
57,895
StrategyStEth
contracts/StrategyETH.sol
0x2cf1ab3a110ed495e38df9b5f67ee2381c7bb572
Solidity
StrategyETH
abstract contract StrategyETH is IStrategyETH { using SafeERC20 for IERC20; using SafeMath for uint; address public override admin; address public override controller; address public immutable override vault; // Placeholder address to indicate that this is ETH strategy address publi...
// used inside harvest
LineComment
totalAssets
function totalAssets() external view override returns (uint) { return _totalAssets(); }
/* @notice Returns amount of ETH locked in this contract */
Comment
v0.6.11+commit.5ef660b1
Unknown
ipfs://b6ba645a470307459caa5d8c87e70ea0efd7f2cce82473b17587258c4c8803be
{ "func_code_index": [ 3732, 3838 ] }
57,896
StrategyStEth
contracts/StrategyETH.sol
0x2cf1ab3a110ed495e38df9b5f67ee2381c7bb572
Solidity
StrategyETH
abstract contract StrategyETH is IStrategyETH { using SafeERC20 for IERC20; using SafeMath for uint; address public override admin; address public override controller; address public immutable override vault; // Placeholder address to indicate that this is ETH strategy address publi...
// used inside harvest
LineComment
deposit
function deposit() external payable override onlyAuthorized { require(msg.value > 0, "deposit = 0"); _increaseDebt(msg.value); _deposit(); }
/* @notice Deposit ETH into this strategy */
Comment
v0.6.11+commit.5ef660b1
Unknown
ipfs://b6ba645a470307459caa5d8c87e70ea0efd7f2cce82473b17587258c4c8803be
{ "func_code_index": [ 3946, 4125 ] }
57,897
StrategyStEth
contracts/StrategyETH.sol
0x2cf1ab3a110ed495e38df9b5f67ee2381c7bb572
Solidity
StrategyETH
abstract contract StrategyETH is IStrategyETH { using SafeERC20 for IERC20; using SafeMath for uint; address public override admin; address public override controller; address public immutable override vault; // Placeholder address to indicate that this is ETH strategy address publi...
// used inside harvest
LineComment
_getTotalShares
function _getTotalShares() internal view virtual returns (uint);
/* @notice Returns total shares owned by this contract for depositing ETH into external Defi */
Comment
v0.6.11+commit.5ef660b1
Unknown
ipfs://b6ba645a470307459caa5d8c87e70ea0efd7f2cce82473b17587258c4c8803be
{ "func_code_index": [ 4252, 4321 ] }
57,898
StrategyStEth
contracts/StrategyETH.sol
0x2cf1ab3a110ed495e38df9b5f67ee2381c7bb572
Solidity
StrategyETH
abstract contract StrategyETH is IStrategyETH { using SafeERC20 for IERC20; using SafeMath for uint; address public override admin; address public override controller; address public immutable override vault; // Placeholder address to indicate that this is ETH strategy address publi...
// used inside harvest
LineComment
withdraw
function withdraw(uint _ethAmount) external override onlyAuthorized { require(_ethAmount > 0, "withdraw = 0"); uint totalEth = _totalAssets(); require(_ethAmount <= totalEth, "withdraw > total"); uint shares = _getShares(_ethAmount, totalEth); if (shares > 0) { _withdraw(shares); ...
/* @notice Withdraw ETH to vault @param _ethAmount Amount of ETH to withdraw @dev Caller should implement guard against slippage */
Comment
v0.6.11+commit.5ef660b1
Unknown
ipfs://b6ba645a470307459caa5d8c87e70ea0efd7f2cce82473b17587258c4c8803be
{ "func_code_index": [ 5091, 5902 ] }
57,899
StrategyStEth
contracts/StrategyETH.sol
0x2cf1ab3a110ed495e38df9b5f67ee2381c7bb572
Solidity
StrategyETH
abstract contract StrategyETH is IStrategyETH { using SafeERC20 for IERC20; using SafeMath for uint; address public override admin; address public override controller; address public immutable override vault; // Placeholder address to indicate that this is ETH strategy address publi...
// used inside harvest
LineComment
withdrawAll
function withdrawAll() external override onlyAuthorized { _withdrawAll(); }
/* @notice Withdraw all ETH to vault @dev Caller should implement guard agains slippage */
Comment
v0.6.11+commit.5ef660b1
Unknown
ipfs://b6ba645a470307459caa5d8c87e70ea0efd7f2cce82473b17587258c4c8803be
{ "func_code_index": [ 6378, 6472 ] }
57,900
StrategyStEth
contracts/StrategyETH.sol
0x2cf1ab3a110ed495e38df9b5f67ee2381c7bb572
Solidity
StrategyETH
abstract contract StrategyETH is IStrategyETH { using SafeERC20 for IERC20; using SafeMath for uint; address public override admin; address public override controller; address public immutable override vault; // Placeholder address to indicate that this is ETH strategy address publi...
// used inside harvest
LineComment
harvest
function harvest() external virtual override;
/* @notice Sell any staking rewards for ETH and then deposit ETH */
Comment
v0.6.11+commit.5ef660b1
Unknown
ipfs://b6ba645a470307459caa5d8c87e70ea0efd7f2cce82473b17587258c4c8803be
{ "func_code_index": [ 6558, 6608 ] }
57,901
StrategyStEth
contracts/StrategyETH.sol
0x2cf1ab3a110ed495e38df9b5f67ee2381c7bb572
Solidity
StrategyETH
abstract contract StrategyETH is IStrategyETH { using SafeERC20 for IERC20; using SafeMath for uint; address public override admin; address public override controller; address public immutable override vault; // Placeholder address to indicate that this is ETH strategy address publi...
// used inside harvest
LineComment
skim
function skim() external override onlyAuthorized { uint totalEth = _totalAssets(); require(totalEth > totalDebt, "total ETH < debt"); uint profit = totalEth - totalDebt; // protect against price manipulation uint max = totalDebt.mul(delta) / DELTA_MIN; if (totalEth <= max) { /...
/* @notice Increase total debt if profit > 0 and total assets <= max, otherwise transfers profit to vault. @dev Guard against manipulation of external price feed by checking that total assets is below factor of total debt */
Comment
v0.6.11+commit.5ef660b1
Unknown
ipfs://b6ba645a470307459caa5d8c87e70ea0efd7f2cce82473b17587258c4c8803be
{ "func_code_index": [ 6879, 8362 ] }
57,902
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 94, 154 ] }
57,903
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 237, 310 ] }
57,904
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 534, 616 ] }
57,905
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 895, 983 ] }
57,906
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1647, 1726 ] }
57,907
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2039, 2141 ] }
57,908
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 259, 445 ] }
57,909
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 723, 864 ] }
57,910
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1162, 1359 ] }
57,911
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1613, 2089 ] }
57,912
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2560, 2697 ] }
57,913
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 3188, 3471 ] }
57,914
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 3931, 4066 ] }
57,915
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 4546, 4717 ] }
57,916
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
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
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 606, 1230 ] }
57,917
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2160, 2562 ] }
57,918
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 3318, 3496 ] }
57,919
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 3721, 3922 ] }
57,920
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 4292, 4523 ] }
57,921
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 4774, 5095 ] }
57,922
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 902, 990 ] }
57,923
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1104, 1196 ] }
57,924
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1829, 1917 ] }
57,925
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1977, 2082 ] }
57,926
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2140, 2264 ] }
57,927
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2472, 2652 ] }
57,928
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2710, 2866 ] }
57,929
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 3008, 3182 ] }
57,930
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 3651, 3977 ] }
57,931
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 4381, 4604 ] }
57,932
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 5102, 5376 ] }
57,933
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 5861, 6405 ] }
57,934
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 6681, 7064 ] }
57,935
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 7391, 7814 ] }
57,936
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 8249, 8600 ] }
57,937
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 8927, 9022 ] }
57,938
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 9620, 9717 ] }
57,939
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 497, 581 ] }
57,940
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1139, 1292 ] }
57,941
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 1442, 1691 ] }
57,942
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
BeerToken
contract BeerToken is ERC20("BeerToken", "BEER"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// BeerToken with Governance.
LineComment
mint
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); }
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 159, 326 ] }
57,943
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
BeerToken
contract BeerToken is ERC20("BeerToken", "BEER"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// BeerToken with Governance.
LineComment
delegates
function delegates(address delegator) external view returns (address) { return _delegates[delegator]; }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2322, 2476 ] }
57,944
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
BeerToken
contract BeerToken is ERC20("BeerToken", "BEER"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// BeerToken with Governance.
LineComment
delegate
function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 2615, 2724 ] }
57,945
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
BeerToken
contract BeerToken is ERC20("BeerToken", "BEER"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// BeerToken with Governance.
LineComment
delegateBySig
function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), ...
/** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECD...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 3153, 4336 ] }
57,946
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
BeerToken
contract BeerToken is ERC20("BeerToken", "BEER"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// BeerToken with Governance.
LineComment
getCurrentVotes
function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; }
/** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 4532, 4792 ] }
57,947
BeerToken
BeerToken.sol
0x9e456d4edcb55fb8d3025739b91efd0bfe1b0ef4
Solidity
BeerToken
contract BeerToken is ERC20("BeerToken", "BEER"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// BeerToken with Governance.
LineComment
getPriorVotes
function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "BEER::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First c...
/** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://c0e9650e7469b859b0ee43b643901eab8b2bc227ef32d2018a9ed734e2e4cde0
{ "func_code_index": [ 5218, 6476 ] }
57,948
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
SafeMath
library SafeMath { // Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). function sub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; } // Adds two numbers, throws on overflow. function add(uint a, uint b) int...
// Math operations with safety checks that throw on error
LineComment
sub
function sub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; }
// Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 116, 235 ] }
57,949
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
SafeMath
library SafeMath { // Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). function sub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; } // Adds two numbers, throws on overflow. function add(uint a, uint b) int...
// Math operations with safety checks that throw on error
LineComment
add
function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; assert(c >= a); return c; }
// Adds two numbers, throws on overflow.
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 284, 424 ] }
57,950
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
AdvancedToken
contract AdvancedToken is ERC20, Support { using SafeMath for uint; uint internal MAX_SUPPLY = 110000000 * 1 ether; address public migrationAgent; mapping (address => uint) internal balances; enum State { Waiting, ICO, Running, Migration } State public state = State.Waiting; e...
setMigrationAgent
function setMigrationAgent(address _agent) public onlyOwner { require(state == State.Running); migrationAgent = _agent; }
/** * The migration process to transfer tokens to the new token contract, when in the contract, a sufficiently large * number of investors that the company can't cover a miner fees to transfer all tokens, this will * be used in the following cases: * 1. If a critical error is found in the contract * 2. When w...
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 894, 1043 ] }
57,951
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
AdvancedToken
contract AdvancedToken is ERC20, Support { using SafeMath for uint; uint internal MAX_SUPPLY = 110000000 * 1 ether; address public migrationAgent; mapping (address => uint) internal balances; enum State { Waiting, ICO, Running, Migration } State public state = State.Waiting; e...
startMigration
function startMigration() public onlyOwner { require(migrationAgent != address(0)); require(state == State.Running); state = State.Migration; NewState(state); }
// Called after setMigrationAgent function to make sure that a new contract address is valid
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 1144, 1350 ] }
57,952
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
AdvancedToken
contract AdvancedToken is ERC20, Support { using SafeMath for uint; uint internal MAX_SUPPLY = 110000000 * 1 ether; address public migrationAgent; mapping (address => uint) internal balances; enum State { Waiting, ICO, Running, Migration } State public state = State.Waiting; e...
cancelMigration
function cancelMigration() public onlyOwner { require(state == State.Migration); require(totalSupply == MAX_SUPPLY); migrationAgent = address(0); state = State.Running; NewState(state); }
// Migration can be canceled if tokens have not yet been sent to the new contract
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 1440, 1682 ] }
57,953
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
AdvancedToken
contract AdvancedToken is ERC20, Support { using SafeMath for uint; uint internal MAX_SUPPLY = 110000000 * 1 ether; address public migrationAgent; mapping (address => uint) internal balances; enum State { Waiting, ICO, Running, Migration } State public state = State.Waiting; e...
manualMigrate
function manualMigrate(address _who) public supportOrOwner { require(state == State.Migration); require(_who != address(this)); require(balances[_who] > 0); uint value = balances[_who]; balances[_who] = balances[_who].sub(value); totalSupply = totalSupply.sub(value); Burn(_who, value)...
// Manual migration if someone has problems moving
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 1741, 2168 ] }
57,954
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
AdvancedToken
contract AdvancedToken is ERC20, Support { using SafeMath for uint; uint internal MAX_SUPPLY = 110000000 * 1 ether; address public migrationAgent; mapping (address => uint) internal balances; enum State { Waiting, ICO, Running, Migration } State public state = State.Waiting; e...
migrate
function migrate() public { require(state == State.Migration); require(balances[msg.sender] > 0); uint value = balances[msg.sender]; balances[msg.sender] = balances[msg.sender].sub(value); totalSupply = totalSupply.sub(value); Burn(msg.sender, value); MigrationAgent(migrationAgent).mi...
// Migrate the holder's tokens to a new contract and burn the holder's tokens on the current contract
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 2278, 2667 ] }
57,955
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
AdvancedToken
contract AdvancedToken is ERC20, Support { using SafeMath for uint; uint internal MAX_SUPPLY = 110000000 * 1 ether; address public migrationAgent; mapping (address => uint) internal balances; enum State { Waiting, ICO, Running, Migration } State public state = State.Waiting; e...
withdrawTokens
function withdrawTokens(uint _value) public onlyOwner { require(state == State.Running || state == State.Migration); require(balances[address(this)] > 0 && balances[address(this)] >= _value); balances[address(this)] = balances[address(this)].sub(_value); balances[msg.sender] = balances[msg.sender].a...
// The withdraw of Tokens from the contract after the end of ICO
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 2740, 3153 ] }
57,956
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
AdvancedToken
contract AdvancedToken is ERC20, Support { using SafeMath for uint; uint internal MAX_SUPPLY = 110000000 * 1 ether; address public migrationAgent; mapping (address => uint) internal balances; enum State { Waiting, ICO, Running, Migration } State public state = State.Waiting; e...
withdrawEther
function withdrawEther(uint256 _value) public onlyOwner { require(this.balance >= _value); owner.transfer(_value); }
// The withdraw of Ether from the contract
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 3204, 3348 ] }
57,957
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
Crowdsale
contract Crowdsale is AdvancedToken { uint internal endOfFreeze = 1522569600; // Sun, 01 Apr 2018 00:00:00 PST uint private tokensForSalePhase2; uint public tokensPerEther; address internal reserve = 0x4B046B05C29E535E152A3D9c8FB7540a8e15c7A6; function Crowdsale() internal { assert...
setTokensPerEther
function setTokensPerEther(uint _tokens) public supportOrOwner { require(state == State.ICO || state == State.Waiting); require(_tokens > 100 ether); // Min 100 tokens ^ 18 tokensPerEther = _tokens; }
// Setting the number of tokens to buy for 1 Ether, changes automatically by owner or support account
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 1223, 1460 ] }
57,958
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
Crowdsale
contract Crowdsale is AdvancedToken { uint internal endOfFreeze = 1522569600; // Sun, 01 Apr 2018 00:00:00 PST uint private tokensForSalePhase2; uint public tokensPerEther; address internal reserve = 0x4B046B05C29E535E152A3D9c8FB7540a8e15c7A6; function Crowdsale() internal { assert...
function () internal payable { require(msg.sender != address(0)); require(state == State.ICO || state == State.Migration); if (state == State.ICO) { // The minimum ether to participate require(msg.value >= 0.01 ether); // Counting and sending tokens to the investor uin...
// The payable function to buy Skraps tokens
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 1513, 2438 ] }
57,959
Skraps
Skraps.sol
0xfdfe8b7ab6cf1bd1e3d14538ef40686296c42052
Solidity
Crowdsale
contract Crowdsale is AdvancedToken { uint internal endOfFreeze = 1522569600; // Sun, 01 Apr 2018 00:00:00 PST uint private tokensForSalePhase2; uint public tokensPerEther; address internal reserve = 0x4B046B05C29E535E152A3D9c8FB7540a8e15c7A6; function Crowdsale() internal { assert...
startICO
function startICO() public supportOrOwner { require(state == State.Waiting); state = State.ICO; NewState(state); }
// Start ISO manually because the block timestamp is not mean the current time
LineComment
v0.4.20+commit.3155dd80
bzzr://b8ece78acfc7f5a80fe3a6dc139e5772225c589ca46f007597d561ab2ab3e5e4
{ "func_code_index": [ 2525, 2676 ] }
57,960