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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EthPledgePool | EthPledgePool.sol | 0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73 | Solidity | EthPledgePool | contract EthPledgePool is PledgePoolBase {
using SafeMath for uint256;
using AddressUtils for address;
// -----------------------------------------
// TokenPool external interface
// -----------------------------------------
/**
* @dev fallback function
*/
function() external payable {}
... | /**
* @title eth pledge pool.
* @dev the tokenPool for ETH.
*/ | NatSpecMultiLine | _processWithdraw | function _processWithdraw(address _maker, uint256 _num, uint256 _pledgeId) internal {
super._processWithdraw(_maker, _num, _pledgeId);
require(address(this).balance >= _num);
_maker.transfer(_num);
}
| /**
* @dev Withdraw pledge token.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c | {
"func_code_index": [
1545,
1765
]
} | 3,800 | |
IdleStrategyWBTCMainnet | contracts/hardworkInterface/IVault.sol | 0xb8e9db02262d37233442932e1a6626d88c649c6e | Solidity | IVault | interface IVault {
function underlyingBalanceInVault() external view returns (uint256);
function underlyingBalanceWithInvestment() external view returns (uint256);
// function store() external view returns (address);
function governance() external view returns (address);
function controller... | governance | function governance() external view returns (address);
| // function store() external view returns (address); | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://c0dd9563bd94314d73c3583a2dec6a96c718f825c39f3c637edf981f1b33b27f | {
"func_code_index": [
237,
296
]
} | 3,801 | ||
IdleStrategyWBTCMainnet | contracts/hardworkInterface/IVault.sol | 0xb8e9db02262d37233442932e1a6626d88c649c6e | Solidity | IVault | interface IVault {
function underlyingBalanceInVault() external view returns (uint256);
function underlyingBalanceWithInvestment() external view returns (uint256);
// function store() external view returns (address);
function governance() external view returns (address);
function controller... | doHardWork | function doHardWork() external;
| // hard work should be callable only by the controller (by the hard worker) or by governance | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://c0dd9563bd94314d73c3583a2dec6a96c718f825c39f3c637edf981f1b33b27f | {
"func_code_index": [
1117,
1153
]
} | 3,802 | ||
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
981,
1102
]
} | 3,803 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
1322,
1451
]
} | 3,804 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
1795,
2077
]
} | 3,805 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
2355,
2568
]
} | 3,806 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
3099,
3462
]
} | 3,807 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
3745,
3901
]
} | 3,808 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
4256,
4578
]
} | 3,809 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
4770,
4829
]
} | 3,810 | ||
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
5062,
5251
]
} | 3,811 | |
SodaCoin | SodaCoin.sol | 0x1dd7c1a2be393644bf56420aa64d53058a3c430a | Solidity | SodaCoin | contract SodaCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupplyIncrease | function totalSupplyIncrease(uint256 _supply) public onlyOwner{
_totalSupply = _totalSupply + _supply;
balances[msg.sender] = balances[msg.sender] + _supply;
}
| // Increase issuance. | LineComment | v0.4.24+commit.e67f0147 | bzzr://59b0d8d4cec1be13bf0c9d0a9913f1b9abc681a8bee176b35fb05fe2b1ad93ea | {
"func_code_index": [
5279,
5448
]
} | 3,812 | |
CurrentCrowdsale | contracts/CurrentCrowdsale.sol | 0x778e7132383bfe51d8a3b73d641f959deb3c8f03 | Solidity | CurrentCrowdsale | contract CurrentCrowdsale is Pausable, TokenRate {
using SafeMath for uint256;
uint256 constant private DECIMALS = 18;
uint256 constant public HARDCAP_TOKENS_PRE_ICO = 100e6 * (10 ** DECIMALS);
uint256 constant public HARDCAP_TOKENS_ICO = 499e8 * (10 ** DECIMALS);
uint256 public startPhase1... | CurrentCrowdsale | function CurrentCrowdsale(
uint256 _maxcap,
uint256 _startPhase1,
uint256 _startPhase2,
uint256 _startPhase3,
uint256 _endOfPhase3,
address _withdrawalWallet,
uint256 _rate,
CurrentToken _token,
Whitelist _whitelist
) TokenRate(_rate) public
{
require(_withdrawalWall... | /**
* @dev Constructor for CurrentCrowdsale contract.
* @dev Set the owner who can manage whitelist and token.
* @param _maxcap The maxcap value.
* @param _startPhase1 The phase1 ICO start time.
* @param _startPhase2 The phase2 ICO start time.
* @param _startPhase3 The phase3 ICO start time.
* @param _end... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69f0797bf871f56f74bf43c4b4a5e008b055e14afab1758d5b57ce67c4533b67 | {
"func_code_index": [
1688,
2838
]
} | 3,813 | |||
CurrentCrowdsale | contracts/CurrentCrowdsale.sol | 0x778e7132383bfe51d8a3b73d641f959deb3c8f03 | Solidity | CurrentCrowdsale | contract CurrentCrowdsale is Pausable, TokenRate {
using SafeMath for uint256;
uint256 constant private DECIMALS = 18;
uint256 constant public HARDCAP_TOKENS_PRE_ICO = 100e6 * (10 ** DECIMALS);
uint256 constant public HARDCAP_TOKENS_ICO = 499e8 * (10 ** DECIMALS);
uint256 public startPhase1... | function() public payable {
if (isIco()) {
sellTokensIco();
} else {
revert();
}
}
| /**
* @dev Fallback function can be used to buy tokens.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69f0797bf871f56f74bf43c4b4a5e008b055e14afab1758d5b57ce67c4533b67 | {
"func_code_index": [
2915,
3060
]
} | 3,814 | ||||
CurrentCrowdsale | contracts/CurrentCrowdsale.sol | 0x778e7132383bfe51d8a3b73d641f959deb3c8f03 | Solidity | CurrentCrowdsale | contract CurrentCrowdsale is Pausable, TokenRate {
using SafeMath for uint256;
uint256 constant private DECIMALS = 18;
uint256 constant public HARDCAP_TOKENS_PRE_ICO = 100e6 * (10 ** DECIMALS);
uint256 constant public HARDCAP_TOKENS_ICO = 499e8 * (10 ** DECIMALS);
uint256 public startPhase1... | isIco | function isIco() public constant returns (bool) {
return now >= startPhase1 && now <= endOfPhase3;
}
| /**
* @dev Check whether the ICO is active at the moment.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69f0797bf871f56f74bf43c4b4a5e008b055e14afab1758d5b57ce67c4533b67 | {
"func_code_index": [
3139,
3258
]
} | 3,815 | |||
CurrentCrowdsale | contracts/CurrentCrowdsale.sol | 0x778e7132383bfe51d8a3b73d641f959deb3c8f03 | Solidity | CurrentCrowdsale | contract CurrentCrowdsale is Pausable, TokenRate {
using SafeMath for uint256;
uint256 constant private DECIMALS = 18;
uint256 constant public HARDCAP_TOKENS_PRE_ICO = 100e6 * (10 ** DECIMALS);
uint256 constant public HARDCAP_TOKENS_ICO = 499e8 * (10 ** DECIMALS);
uint256 public startPhase1... | manualSendTokens | function manualSendTokens(address _beneficiary, uint256 _tokensAmount) public onlyOwner {
require(_beneficiary != address(0));
require(_tokensAmount > 0);
token.transfer(_beneficiary, _tokensAmount);
tokensSoldIco = tokensSoldIco.add(_tokensAmount);
tokensSoldTotal = tokensSoldTotal.add(_tok... | /**
* @dev Manual send tokens to the specified address.
* @param _beneficiary The address of a investor.
* @param _tokensAmount Amount of tokens.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69f0797bf871f56f74bf43c4b4a5e008b055e14afab1758d5b57ce67c4533b67 | {
"func_code_index": [
3898,
4330
]
} | 3,816 | |||
CurrentCrowdsale | contracts/CurrentCrowdsale.sol | 0x778e7132383bfe51d8a3b73d641f959deb3c8f03 | Solidity | CurrentCrowdsale | contract CurrentCrowdsale is Pausable, TokenRate {
using SafeMath for uint256;
uint256 constant private DECIMALS = 18;
uint256 constant public HARDCAP_TOKENS_PRE_ICO = 100e6 * (10 ** DECIMALS);
uint256 constant public HARDCAP_TOKENS_ICO = 499e8 * (10 ** DECIMALS);
uint256 public startPhase1... | sellTokens | function sellTokens(address referral) beforeReachingHardCap whenWhitelisted(msg.sender) whenNotPaused internal {
require(isIco());
require(msg.value > 0);
uint256 weiAmount = msg.value;
uint256 excessiveFunds = 0;
uint256 plannedWeiTotal = weiRaisedIco.add(weiAmount);
if (plannedWeiT... | /**
* @dev Sell tokens during ICO with referral.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69f0797bf871f56f74bf43c4b4a5e008b055e14afab1758d5b57ce67c4533b67 | {
"func_code_index": [
4400,
6261
]
} | 3,817 | |||
FuddCrowdsale | FuddCrowdsale.sol | 0xf0fd80b2cce26d5b0441250a0414e8174f315b73 | Solidity | FuddCrowdsale | contract FuddCrowdsale {
using SafeMath for uint256;
mapping (address => uint256) balances;
Token public fuddToken;
// Crowdsale details
address public beneficiary;
address public creator;
address public confirmedBy; ... | FuddCrowdsale | function FuddCrowdsale(address _tokenAddress, address _beneficiary, address _creator) {
fuddToken = Token(_tokenAddress);
beneficiary = _beneficiary;
creator = _creator;
}
| /**
* Constructor
*
* @param _tokenAddress The address of the token contact
* @param _beneficiary The address of the wallet for the beneficiary
* @param _creator The address of the wallet for the creator
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://acc983dced9655ea5c9c72a7385af2b2d2d726a29708ddb669f1718548e6b8df | {
"func_code_index": [
921,
1129
]
} | 3,818 | |||
FuddCrowdsale | FuddCrowdsale.sol | 0xf0fd80b2cce26d5b0441250a0414e8174f315b73 | Solidity | FuddCrowdsale | contract FuddCrowdsale {
using SafeMath for uint256;
mapping (address => uint256) balances;
Token public fuddToken;
// Crowdsale details
address public beneficiary;
address public creator;
address public confirmedBy; ... | balanceOf | function balanceOf(address _investor) constant returns (uint256 balance) {
return balances[_investor];
}
| /**
* Get balance of `_investor`
*
* @param _investor The address from which the balance will be retrieved
* @return The balance
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://acc983dced9655ea5c9c72a7385af2b2d2d726a29708ddb669f1718548e6b8df | {
"func_code_index": [
1852,
1975
]
} | 3,819 | |||
FuddCrowdsale | FuddCrowdsale.sol | 0xf0fd80b2cce26d5b0441250a0414e8174f315b73 | Solidity | FuddCrowdsale | contract FuddCrowdsale {
using SafeMath for uint256;
mapping (address => uint256) balances;
Token public fuddToken;
// Crowdsale details
address public beneficiary;
address public creator;
address public confirmedBy; ... | withdraw | function withdraw() onlyBeneficiary atStage(Stages.Ended) {
uint256 ethBalance = this.balance;
beneficiary.transfer(ethBalance);
stage = Stages.Withdrawn;
}
| /**
* Transfer raised amount to the beneficiary address
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://acc983dced9655ea5c9c72a7385af2b2d2d726a29708ddb669f1718548e6b8df | {
"func_code_index": [
3572,
3765
]
} | 3,820 | |||
FuddCrowdsale | FuddCrowdsale.sol | 0xf0fd80b2cce26d5b0441250a0414e8174f315b73 | Solidity | FuddCrowdsale | contract FuddCrowdsale {
using SafeMath for uint256;
mapping (address => uint256) balances;
Token public fuddToken;
// Crowdsale details
address public beneficiary;
address public creator;
address public confirmedBy; ... | confirmBeneficiary | function confirmBeneficiary() onlyBeneficiary {
confirmedBy = msg.sender;
}
| /**
* For testing purposes
*
* @return The beneficiary address
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://acc983dced9655ea5c9c72a7385af2b2d2d726a29708ddb669f1718548e6b8df | {
"func_code_index": [
3859,
3953
]
} | 3,821 | |||
FuddCrowdsale | FuddCrowdsale.sol | 0xf0fd80b2cce26d5b0441250a0414e8174f315b73 | Solidity | FuddCrowdsale | contract FuddCrowdsale {
using SafeMath for uint256;
mapping (address => uint256) balances;
Token public fuddToken;
// Crowdsale details
address public beneficiary;
address public creator;
address public confirmedBy; ... | function () payable atStage(Stages.InProgress) {
hasEnded();
require(purchasingAllowed);
if (msg.value == 0) { return; }
uint256 weiAmount = msg.value;
address investor = msg.sender;
uint256 received = weiAmount.div(10e7);
uint256 tokens = (received).mul(rate);
if (msg.value >=... | /**
* Receives Eth and issue tokens to the sender
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://acc983dced9655ea5c9c72a7385af2b2d2d726a29708ddb669f1718548e6b8df | {
"func_code_index": [
4088,
5253
]
} | 3,822 | ||||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to])... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
1646,
2493
]
} | 3,823 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
require(!blacklist[msg.sender]);
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
2699,
2898
]
} | 3,824 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | ban | function ban(address addr) public {
require(msg.sender == admin);
blacklist[addr] = true;
}
| /**
* Ban address
*
* @param addr ban addr
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
2977,
3096
]
} | 3,825 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | enable | function enable(address addr) public {
require(msg.sender == admin);
blacklist[addr] = false;
}
| /**
* Enable address
*
* @param addr enable addr
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
3182,
3305
]
} | 3,826 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(!blacklist[msg.sender]);
require(!blacklist[_from]);
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _v... | /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
3580,
3960
]
} | 3,827 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
require(!blacklist[msg.sender]);
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
4224,
4493
]
} | 3,828 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
require(!blacklist[msg.sender]);
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
... | /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
4887,
5273
]
} | 3,829 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | burn | function burn(uint256 _value) public returns (bool success) {
require(!blacklist[msg.sender]);
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
require(_value <= totalSupply);
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _va... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
5443,
5905
]
} | 3,830 | ||
TokenGBTG | TokenGBTG.sol | 0xa0a25c992b5b5e019573fb0e571b3f3c81070dfb | Solidity | TokenGBTG | contract TokenGBTG {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
mapping (address => bool) public blacklist;
address admin;... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(!blacklist[msg.sender]);
require(!blacklist[_from]);
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check al... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | None | bzzr://a1095513b599c11351c07bd6d2947e74e033a8d00eb53f2e0d2294f86f7aef26 | {
"func_code_index": [
6163,
6899
]
} | 3,831 | ||
CYBERGAME | CYBERGAME.sol | 0xea5eb17d519a9165fd2d7e024d83856f314958d1 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://0d9eb25989fc8dfd3924e7553c0403222204dcde1b0f4f714371fd8695238eef | {
"func_code_index": [
60,
124
]
} | 3,832 | |||
CYBERGAME | CYBERGAME.sol | 0xea5eb17d519a9165fd2d7e024d83856f314958d1 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://0d9eb25989fc8dfd3924e7553c0403222204dcde1b0f4f714371fd8695238eef | {
"func_code_index": [
232,
309
]
} | 3,833 | |||
CYBERGAME | CYBERGAME.sol | 0xea5eb17d519a9165fd2d7e024d83856f314958d1 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://0d9eb25989fc8dfd3924e7553c0403222204dcde1b0f4f714371fd8695238eef | {
"func_code_index": [
546,
623
]
} | 3,834 | |||
CYBERGAME | CYBERGAME.sol | 0xea5eb17d519a9165fd2d7e024d83856f314958d1 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://0d9eb25989fc8dfd3924e7553c0403222204dcde1b0f4f714371fd8695238eef | {
"func_code_index": [
946,
1042
]
} | 3,835 | |||
CYBERGAME | CYBERGAME.sol | 0xea5eb17d519a9165fd2d7e024d83856f314958d1 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://0d9eb25989fc8dfd3924e7553c0403222204dcde1b0f4f714371fd8695238eef | {
"func_code_index": [
1326,
1407
]
} | 3,836 | |||
CYBERGAME | CYBERGAME.sol | 0xea5eb17d519a9165fd2d7e024d83856f314958d1 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://0d9eb25989fc8dfd3924e7553c0403222204dcde1b0f4f714371fd8695238eef | {
"func_code_index": [
1615,
1712
]
} | 3,837 | |||
CYBERGAME | CYBERGAME.sol | 0xea5eb17d519a9165fd2d7e024d83856f314958d1 | Solidity | CYBERGAME | contract CYBERGAME is StandardToken {
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces mi... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, th... | /* Approves and then calls the receiving contract */ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://0d9eb25989fc8dfd3924e7553c0403222204dcde1b0f4f714371fd8695238eef | {
"func_code_index": [
1704,
2097
]
} | 3,838 | |||
Treasury | contracts/Treasury.sol | 0xa6236cba34883c983ca5c9dee8349d072192ed5c | Solidity | Treasury | contract Treasury is Ownable, ITreasury {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public override defaultToken;
SwapRouter public swapRouter;
address public ecoFund;
address public gov;
address internal govSetter;
mapping(address => uint256) public ecoF... | withdraw | function withdraw(uint256 amount, address withdrawAddress) external override {
require(msg.sender == gov, "caller not gov");
require(balanceOf(defaultToken) >= amount, "insufficient funds");
defaultToken.safeTransfer(withdrawAddress, amount);
}
| // only default token withdrawals allowed | LineComment | v0.6.2+commit.bacdbe57 | MIT | ipfs://b681445e14e2d0d9634bf2cbc4b058851c8a0ed66e37adda9e148b9898f0d8e9 | {
"func_code_index": [
1864,
2145
]
} | 3,839 | ||
ChainGifts | contracts/ChainGifts.sol | 0x15462a7aba4c6caa55a78a9ff9a2763d67f17975 | Solidity | Base64 | library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
uint256 len = data.length;
if (len == 0... | /// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <brecht@loopring.org> | NatSpecSingleLine | encode | function encode(bytes memory data) internal pure returns (string memory) {
uint256 len = data.length;
if (len == 0) return "";
// multiply by 4/3 rounded up
uint256 encodedLen = 4 * ((len + 2) / 3);
// Add some extra buffer at the end
bytes memory result = new bytes(encodedLen + 32);
byte... | /// @notice Encodes some bytes to the base64 representation | NatSpecSingleLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
186,
1747
]
} | 3,840 | ||
HFIToken | contracts/HFIToken.sol | 0xc8c1a2d3ba6228e044f5b7564b9752c69ca85e25 | Solidity | HFIToken | contract HFIToken is ERC20("HFIToken", "HFI"), 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);
... | // HFIToken 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 | None | ipfs://e18ca33f7612371bc73fbbf6507d98698fe2fc8d0ac952a01b9af99bd85c1e69 | {
"func_code_index": [
156,
323
]
} | 3,841 |
HFIToken | contracts/HFIToken.sol | 0xc8c1a2d3ba6228e044f5b7564b9752c69ca85e25 | Solidity | HFIToken | contract HFIToken is ERC20("HFIToken", "HFI"), 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);
... | // HFIToken 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 | None | ipfs://e18ca33f7612371bc73fbbf6507d98698fe2fc8d0ac952a01b9af99bd85c1e69 | {
"func_code_index": [
2319,
2473
]
} | 3,842 |
HFIToken | contracts/HFIToken.sol | 0xc8c1a2d3ba6228e044f5b7564b9752c69ca85e25 | Solidity | HFIToken | contract HFIToken is ERC20("HFIToken", "HFI"), 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);
... | // HFIToken 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 | None | ipfs://e18ca33f7612371bc73fbbf6507d98698fe2fc8d0ac952a01b9af99bd85c1e69 | {
"func_code_index": [
2612,
2721
]
} | 3,843 |
HFIToken | contracts/HFIToken.sol | 0xc8c1a2d3ba6228e044f5b7564b9752c69ca85e25 | Solidity | HFIToken | contract HFIToken is ERC20("HFIToken", "HFI"), 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);
... | // HFIToken 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 | None | ipfs://e18ca33f7612371bc73fbbf6507d98698fe2fc8d0ac952a01b9af99bd85c1e69 | {
"func_code_index": [
3150,
4330
]
} | 3,844 |
HFIToken | contracts/HFIToken.sol | 0xc8c1a2d3ba6228e044f5b7564b9752c69ca85e25 | Solidity | HFIToken | contract HFIToken is ERC20("HFIToken", "HFI"), 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);
... | // HFIToken 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 | None | ipfs://e18ca33f7612371bc73fbbf6507d98698fe2fc8d0ac952a01b9af99bd85c1e69 | {
"func_code_index": [
4526,
4786
]
} | 3,845 |
HFIToken | contracts/HFIToken.sol | 0xc8c1a2d3ba6228e044f5b7564b9752c69ca85e25 | Solidity | HFIToken | contract HFIToken is ERC20("HFIToken", "HFI"), 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);
... | // HFIToken with Governance. | LineComment | getPriorVotes | function getPriorVotes(address account, uint blockNumber)
external
view
returns (uint256)
{
require(blockNumber < block.number, "HFI::getPriorVotes: not yet determined");
uint32 nCheckpoints = numCheckpoints[account];
if (nCheckpoints == 0) {
return 0;
}
// First ch... | /**
* @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 | None | ipfs://e18ca33f7612371bc73fbbf6507d98698fe2fc8d0ac952a01b9af99bd85c1e69 | {
"func_code_index": [
5212,
6469
]
} | 3,846 |
OXG | contracts/NodeManager.sol | 0xc52bd5194e3163faf48ef482daa2af7e4af45ab8 | Solidity | NodeManager | contract NodeManager is Ownable, Pausable {
using SafeMath for uint256;
using IterableMapping for IterableMapping.Map;
struct NodeEntity {
string name;
uint256 creationTime;
uint256 lastClaimTime;
uint256 amount;
uint256 tier;
uint256 totalClaimed;
uint256 borrowedRewards;
... | _isNameAvailable | function _isNameAvailable(address account, string memory nodeName)
private
view
returns (bool)
{
NodeEntity[] memory nodes = _nodesOfUser[account];
for (uint256 i = 0; i < nodes.length; i++) {
if (keccak256(bytes(nodes[i].name)) == keccak256(bytes(nodeName))) {
return false;
}
}
r... | // Private methods | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://20decf58842156897d98ab79d984540e98d9dc9d52eab19bc329196766f161a1 | {
"func_code_index": [
1798,
2159
]
} | 3,847 | ||
OXG | contracts/NodeManager.sol | 0xc52bd5194e3163faf48ef482daa2af7e4af45ab8 | Solidity | NodeManager | contract NodeManager is Ownable, Pausable {
using SafeMath for uint256;
using IterableMapping for IterableMapping.Map;
struct NodeEntity {
string name;
uint256 creationTime;
uint256 lastClaimTime;
uint256 amount;
uint256 tier;
uint256 totalClaimed;
uint256 borrowedRewards;
... | upgradeNode | function upgradeNode(address account, uint256 blocktime)
external
onlyGuard
whenNotPaused
{
require(blocktime > 0, "NODE: CREATIME must be higher than zero");
NodeEntity[] storage nodes = _nodesOfUser[account];
require(
nodes.length > 0,
"CASHOUT ERROR: You don't have node... | // External methods | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://20decf58842156897d98ab79d984540e98d9dc9d52eab19bc329196766f161a1 | {
"func_code_index": [
4956,
5444
]
} | 3,848 | ||
OXG | contracts/NodeManager.sol | 0xc52bd5194e3163faf48ef482daa2af7e4af45ab8 | Solidity | NodeManager | contract NodeManager is Ownable, Pausable {
using SafeMath for uint256;
using IterableMapping for IterableMapping.Map;
struct NodeEntity {
string name;
uint256 creationTime;
uint256 lastClaimTime;
uint256 amount;
uint256 tier;
uint256 totalClaimed;
uint256 borrowedRewards;
... | unbondNFT | function unbondNFT(uint256 _creationTime, uint256 _tokenId) external {
address account = _msgSender();
require(_creationTime > 0, "NODE: CREATIME must be higher than zero");
NodeEntity[] storage nodes = _nodesOfUser[account];
require(
nodes.length > 0,
"You don't own any nodes"
);
NodeEntity... | // function to unbond NFT | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://20decf58842156897d98ab79d984540e98d9dc9d52eab19bc329196766f161a1 | {
"func_code_index": [
10554,
11442
]
} | 3,849 | ||
OXG | contracts/NodeManager.sol | 0xc52bd5194e3163faf48ef482daa2af7e4af45ab8 | Solidity | NodeManager | contract NodeManager is Ownable, Pausable {
using SafeMath for uint256;
using IterableMapping for IterableMapping.Map;
struct NodeEntity {
string name;
uint256 creationTime;
uint256 lastClaimTime;
uint256 amount;
uint256 tier;
uint256 totalClaimed;
uint256 borrowedRewards;
... | changeNodeName | function changeNodeName(uint256 _creationTime, string memory newName)
public
{
address sender = msg.sender;
require(isNodeOwner(sender), "NOT NODE OWNER");
NodeEntity[] storage nodes = _nodesOfUser[sender];
uint256 numberOfNodes = nodes.length;
require(
numberOfNode... | // User Methods | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://20decf58842156897d98ab79d984540e98d9dc9d52eab19bc329196766f161a1 | {
"func_code_index": [
20195,
20708
]
} | 3,850 | ||
OXG | contracts/NodeManager.sol | 0xc52bd5194e3163faf48ef482daa2af7e4af45ab8 | Solidity | NodeManager | contract NodeManager is Ownable, Pausable {
using SafeMath for uint256;
using IterableMapping for IterableMapping.Map;
struct NodeEntity {
string name;
uint256 creationTime;
uint256 lastClaimTime;
uint256 amount;
uint256 tier;
uint256 totalClaimed;
uint256 borrowedRewards;
... | pause | function pause() external onlyOwner {
_pause();
}
| // Firewall methods | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://20decf58842156897d98ab79d984540e98d9dc9d52eab19bc329196766f161a1 | {
"func_code_index": [
20738,
20798
]
} | 3,851 | ||
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
94,
154
]
} | 3,852 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
237,
310
]
} | 3,853 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
534,
616
]
} | 3,854 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
895,
983
]
} | 3,855 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1647,
1726
]
} | 3,856 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
2039,
2141
]
} | 3,857 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
259,
445
]
} | 3,858 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
723,
864
]
} | 3,859 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1162,
1359
]
} | 3,860 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1613,
2089
]
} | 3,861 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
2560,
2697
]
} | 3,862 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
3188,
3471
]
} | 3,863 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
3931,
4066
]
} | 3,864 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
4546,
4717
]
} | 3,865 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
606,
1033
]
} | 3,866 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1963,
2365
]
} | 3,867 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
3121,
3299
]
} | 3,868 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
3524,
3725
]
} | 3,869 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
4095,
4326
]
} | 3,870 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
4577,
4898
]
} | 3,871 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
747,
1374
]
} | 3,872 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
2393,
3159
]
} | 3,873 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
497,
581
]
} | 3,874 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1139,
1292
]
} | 3,875 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1442,
1691
]
} | 3,876 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
902,
990
]
} | 3,877 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1104,
1196
]
} | 3,878 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1829,
1917
]
} | 3,879 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
1977,
2082
]
} | 3,880 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
2140,
2264
]
} | 3,881 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
2472,
2652
]
} | 3,882 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
2710,
2866
]
} | 3,883 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
3008,
3182
]
} | 3,884 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
3651,
3977
]
} | 3,885 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
4381,
4604
]
} | 3,886 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
5102,
5376
]
} | 3,887 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
5861,
6405
]
} | 3,888 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
6681,
7064
]
} | 3,889 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
7391,
7814
]
} | 3,890 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
8249,
8600
]
} | 3,891 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
8927,
9022
]
} | 3,892 |
TKFToken | TKFToken.sol | 0x03701347a7920e585d3c1437b6464101ea00afb2 | 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 | None | ipfs://39c4fb579840cb1fd7fc5df9a30e4c66592f05f582a3d235a5cb8f0294015a76 | {
"func_code_index": [
9620,
9717
]
} | 3,893 |
KinesisVelocityToken | KinesisVelocityToken.sol | 0x9f376b37c27209b8ed048710345d8e490555ab47 | Solidity | KinesisVelocityToken | contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495 | {
"func_code_index": [
1005,
1126
]
} | 3,894 | |
KinesisVelocityToken | KinesisVelocityToken.sol | 0x9f376b37c27209b8ed048710345d8e490555ab47 | Solidity | KinesisVelocityToken | contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495 | {
"func_code_index": [
1346,
1475
]
} | 3,895 | |
KinesisVelocityToken | KinesisVelocityToken.sol | 0x9f376b37c27209b8ed048710345d8e490555ab47 | Solidity | KinesisVelocityToken | contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495 | {
"func_code_index": [
1819,
2101
]
} | 3,896 | |
KinesisVelocityToken | KinesisVelocityToken.sol | 0x9f376b37c27209b8ed048710345d8e490555ab47 | Solidity | KinesisVelocityToken | contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.24+commit.e67f0147 | bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495 | {
"func_code_index": [
2609,
2822
]
} | 3,897 | |
KinesisVelocityToken | KinesisVelocityToken.sol | 0x9f376b37c27209b8ed048710345d8e490555ab47 | Solidity | KinesisVelocityToken | contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.24+commit.e67f0147 | bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495 | {
"func_code_index": [
3353,
3716
]
} | 3,898 | |
KinesisVelocityToken | KinesisVelocityToken.sol | 0x9f376b37c27209b8ed048710345d8e490555ab47 | Solidity | KinesisVelocityToken | contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495 | {
"func_code_index": [
3999,
4155
]
} | 3,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.