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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MultiVesting | MultiVesting.sol | 0x66e9aeedc17558cfc97b6734600b7a835f8e7ceb | Solidity | MultiVesting | contract MultiVesting is Ownable, Destroyable {
using SafeMath for uint256;
// beneficiary of tokens
struct Beneficiary {
uint256 released;
uint256 vested;
uint256 start;
uint256 cliff;
uint256 duration;
bool revoked;
bool revocable;
... | destroyBeneficiary | function destroyBeneficiary(address _beneficiary) public onlyOwner {
Beneficiary storage beneficiary = beneficiaries[_beneficiary];
uint256 balance = beneficiary.vested.sub(beneficiary.released);
token.transfer(owner, balance);
totalReleased = totalReleased.add(balance);
beneficiary.isB... | /**
* @notice Allows the owner to destroy a beneficiary. Remain tokens are returned to the owner.
* @param _beneficiary Beneficiary address
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://bd1d9802790e0281240ddbd34fb7e404a0dc8500b3639c2b04a8a6c42f0133ab | {
"func_code_index": [
5240,
5725
]
} | 56,261 | |||
MultiVesting | MultiVesting.sol | 0x66e9aeedc17558cfc97b6734600b7a835f8e7ceb | Solidity | MultiVesting | contract MultiVesting is Ownable, Destroyable {
using SafeMath for uint256;
// beneficiary of tokens
struct Beneficiary {
uint256 released;
uint256 vested;
uint256 start;
uint256 cliff;
uint256 duration;
bool revoked;
bool revocable;
... | releasableAmount | function releasableAmount(address _beneficiary) public view returns (uint256) {
return vestedAmount(_beneficiary).sub(beneficiaries[_beneficiary].released);
}
| /**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param _beneficiary Beneficiary address
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://bd1d9802790e0281240ddbd34fb7e404a0dc8500b3639c2b04a8a6c42f0133ab | {
"func_code_index": [
5883,
6060
]
} | 56,262 | |||
MultiVesting | MultiVesting.sol | 0x66e9aeedc17558cfc97b6734600b7a835f8e7ceb | Solidity | MultiVesting | contract MultiVesting is Ownable, Destroyable {
using SafeMath for uint256;
// beneficiary of tokens
struct Beneficiary {
uint256 released;
uint256 vested;
uint256 start;
uint256 cliff;
uint256 duration;
bool revoked;
bool revocable;
... | vestedAmount | function vestedAmount(address _beneficiary) public view returns (uint256) {
Beneficiary storage beneficiary = beneficiaries[_beneficiary];
uint256 totalBalance = beneficiary.vested;
if (now < beneficiary.cliff) {
return 0;
} else if (now >= beneficiary.start.add(beneficiary.duration) || b... | /**
* @dev Calculates the amount that has already vested.
* @param _beneficiary Beneficiary address
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://bd1d9802790e0281240ddbd34fb7e404a0dc8500b3639c2b04a8a6c42f0133ab | {
"func_code_index": [
6189,
6717
]
} | 56,263 | |||
MultiVesting | MultiVesting.sol | 0x66e9aeedc17558cfc97b6734600b7a835f8e7ceb | Solidity | MultiVesting | contract MultiVesting is Ownable, Destroyable {
using SafeMath for uint256;
// beneficiary of tokens
struct Beneficiary {
uint256 released;
uint256 vested;
uint256 start;
uint256 cliff;
uint256 duration;
bool revoked;
bool revocable;
... | flushEth | function flushEth() public onlyOwner {
owner.transfer(this.balance);
}
| /**
* @notice Allows the owner to flush the eth.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://bd1d9802790e0281240ddbd34fb7e404a0dc8500b3639c2b04a8a6c42f0133ab | {
"func_code_index": [
6789,
6878
]
} | 56,264 | |||
MultiVesting | MultiVesting.sol | 0x66e9aeedc17558cfc97b6734600b7a835f8e7ceb | Solidity | MultiVesting | contract MultiVesting is Ownable, Destroyable {
using SafeMath for uint256;
// beneficiary of tokens
struct Beneficiary {
uint256 released;
uint256 vested;
uint256 start;
uint256 cliff;
uint256 duration;
bool revoked;
bool revocable;
... | destroy | function destroy() public onlyOwner {
token.transfer(owner, token.balanceOf(this));
selfdestruct(owner);
}
| /**
* @notice Allows the owner to destroy the contract and return the tokens to the owner.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://bd1d9802790e0281240ddbd34fb7e404a0dc8500b3639c2b04a8a6c42f0133ab | {
"func_code_index": [
6992,
7126
]
} | 56,265 | |||
sRUNE | sRUNE.sol | 0xe845941fb6858c6d0e5cf18f9307086e56254e26 | Solidity | IERC20 | interface IERC20 {
//function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
//function transfer(address recipient, uint256 amount) external returns (bool);
//function allowance(address owner, address spender) external view returns... | balanceOf | function balanceOf(address account) external view returns (uint256);
| //function totalSupply() external view returns (uint256); | LineComment | v0.5.1+commit.c8a2cb62 | {
"func_code_index": [
83,
156
]
} | 56,266 | ||||
PopulousTokenRewardPool | /Users/nemitariajienka/Desktop/DeFi_backup/DeFi/contracts/reward/PopulousTokenRewardPool.sol | 0xabc607f40ca9225117c83e3f03bbe15df8bb93a4 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | max | function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
| /**
* @dev Returns the largest of two numbers.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | {
"func_code_index": [
79,
188
]
} | 56,267 | ||
PopulousTokenRewardPool | /Users/nemitariajienka/Desktop/DeFi_backup/DeFi/contracts/reward/PopulousTokenRewardPool.sol | 0xabc607f40ca9225117c83e3f03bbe15df8bb93a4 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | min | function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
| /**
* @dev Returns the smallest of two numbers.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | {
"func_code_index": [
255,
363
]
} | 56,268 | ||
PopulousTokenRewardPool | /Users/nemitariajienka/Desktop/DeFi_backup/DeFi/contracts/reward/PopulousTokenRewardPool.sol | 0xabc607f40ca9225117c83e3f03bbe15df8bb93a4 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | average | function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
| /**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | {
"func_code_index": [
472,
666
]
} | 56,269 | ||
PopulousTokenRewardPool | /Users/nemitariajienka/Desktop/DeFi_backup/DeFi/contracts/reward/PopulousTokenRewardPool.sol | 0xabc607f40ca9225117c83e3f03bbe15df8bb93a4 | Solidity | PopulousTokenRewardPool | contract PopulousTokenRewardPool is Ownable {
using SafeMath for uint256;
using Address for address;
ERC20 public pToken;
ERC20 public rewardToken;
uint256 public duration;
uint256 public periodFinish = 0;
uint256 public totalDeposit = 0;
uint256 public totalRewardPaid = 0;
uint... | stake | function stake(uint256 amount) public updateReward(msg.sender) {
//require(msg.sender == exclusiveAddress, "Must be the exclusiveAddress to stake");
require(amount > 0, "Cannot stake 0");
//UserInfo storage user = userInfo[msg.sender];
pToken.transferFrom(address(msg.sender), address(this), amount);
... | // stake visibility is public as overriding LPTokenWrapper's stake() function | LineComment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
2480,
3026
]
} | 56,270 | ||||
PopulousTokenRewardPool | /Users/nemitariajienka/Desktop/DeFi_backup/DeFi/contracts/reward/PopulousTokenRewardPool.sol | 0xabc607f40ca9225117c83e3f03bbe15df8bb93a4 | Solidity | PopulousTokenRewardPool | contract PopulousTokenRewardPool is Ownable {
using SafeMath for uint256;
using Address for address;
ERC20 public pToken;
ERC20 public rewardToken;
uint256 public duration;
uint256 public periodFinish = 0;
uint256 public totalDeposit = 0;
uint256 public totalRewardPaid = 0;
uint... | pushReward | function pushReward(address recipient) public updateReward(recipient) onlyOwner {
uint256 reward = earned(recipient);
if (reward > 0) {
rewards[recipient] = 0;
totalRewardPaid = totalRewardPaid.add(reward);
rewardToken.transfer(recipient, reward);
emit RewardPaid(recipient, rewar... | /**
* A push mechanism for accounts that have not claimed their rewards for a long time.
* The implementation is semantically analogous to getReward(), but uses a push pattern
* instead of pull pattern.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | {
"func_code_index": [
3985,
4352
]
} | 56,271 | ||||
EURsToken | EURsToken.sol | 0x90d647e0e8c97e37f4bc09e16d804ecd1e5a5fb8 | 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) {}
/// ... | /*
* Copyright © 2018 by Capital Trust Group Limited
* Author : legal@ctgexchange.com
*/ | Comment | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://3057ddddd5d1ea9bd45205ad6cbcb697465b8a355a09392d20b8a9c3d66bc813 | {
"func_code_index": [
60,
124
]
} | 56,272 | |
EURsToken | EURsToken.sol | 0x90d647e0e8c97e37f4bc09e16d804ecd1e5a5fb8 | 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) {}
/// ... | /*
* Copyright © 2018 by Capital Trust Group Limited
* Author : legal@ctgexchange.com
*/ | Comment | 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.24+commit.e67f0147 | bzzr://3057ddddd5d1ea9bd45205ad6cbcb697465b8a355a09392d20b8a9c3d66bc813 | {
"func_code_index": [
232,
309
]
} | 56,273 | |
EURsToken | EURsToken.sol | 0x90d647e0e8c97e37f4bc09e16d804ecd1e5a5fb8 | 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) {}
/// ... | /*
* Copyright © 2018 by Capital Trust Group Limited
* Author : legal@ctgexchange.com
*/ | Comment | 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.24+commit.e67f0147 | bzzr://3057ddddd5d1ea9bd45205ad6cbcb697465b8a355a09392d20b8a9c3d66bc813 | {
"func_code_index": [
546,
623
]
} | 56,274 | |
EURsToken | EURsToken.sol | 0x90d647e0e8c97e37f4bc09e16d804ecd1e5a5fb8 | 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) {}
/// ... | /*
* Copyright © 2018 by Capital Trust Group Limited
* Author : legal@ctgexchange.com
*/ | Comment | 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.24+commit.e67f0147 | bzzr://3057ddddd5d1ea9bd45205ad6cbcb697465b8a355a09392d20b8a9c3d66bc813 | {
"func_code_index": [
946,
1042
]
} | 56,275 | |
EURsToken | EURsToken.sol | 0x90d647e0e8c97e37f4bc09e16d804ecd1e5a5fb8 | 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) {}
/// ... | /*
* Copyright © 2018 by Capital Trust Group Limited
* Author : legal@ctgexchange.com
*/ | Comment | 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.24+commit.e67f0147 | bzzr://3057ddddd5d1ea9bd45205ad6cbcb697465b8a355a09392d20b8a9c3d66bc813 | {
"func_code_index": [
1326,
1407
]
} | 56,276 | |
EURsToken | EURsToken.sol | 0x90d647e0e8c97e37f4bc09e16d804ecd1e5a5fb8 | 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) {}
/// ... | /*
* Copyright © 2018 by Capital Trust Group Limited
* Author : legal@ctgexchange.com
*/ | Comment | 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.24+commit.e67f0147 | bzzr://3057ddddd5d1ea9bd45205ad6cbcb697465b8a355a09392d20b8a9c3d66bc813 | {
"func_code_index": [
1615,
1712
]
} | 56,277 | |
EURsToken | EURsToken.sol | 0x90d647e0e8c97e37f4bc09e16d804ecd1e5a5fb8 | Solidity | EURsToken | contract EURsToken is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
string public name;
uint8 public decimals;
string public symbol; ... | 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, this, _extr... | /* Approves and then calls the receiving contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://3057ddddd5d1ea9bd45205ad6cbcb697465b8a355a09392d20b8a9c3d66bc813 | {
"func_code_index": [
981,
1365
]
} | 56,278 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | ERC721 | contract ERC721 {
// ERC20 compatible functions
// use variable getter
// function name() constant returns (string name);
// function symbol() constant returns (string symbol);
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant retu... | totalSupply | function totalSupply() public constant returns (uint256);
| // ERC20 compatible functions
// use variable getter
// function name() constant returns (string name);
// function symbol() constant returns (string symbol); | LineComment | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
198,
260
]
} | 56,279 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | ERC20 | contract ERC20 {
// Get the total token supply
function totalSupply() public constant returns (uint256 _totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) public constant returns (uint256 balance);
// Send _value amount of to... | totalSupply | function totalSupply() public constant returns (uint256 _totalSupply);
| // Get the total token supply | LineComment | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
53,
128
]
} | 56,280 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | ERC20 | contract ERC20 {
// Get the total token supply
function totalSupply() public constant returns (uint256 _totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) public constant returns (uint256 balance);
// Send _value amount of to... | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance);
| // Get the account balance of another account with address _owner | LineComment | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
203,
285
]
} | 56,281 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | ERC20 | contract ERC20 {
// Get the total token supply
function totalSupply() public constant returns (uint256 _totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) public constant returns (uint256 balance);
// Send _value amount of to... | transfer | function transfer(address _to, uint256 _value) public returns (bool success);
| // Send _value amount of tokens to address _to | LineComment | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
341,
423
]
} | 56,282 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | ERC20 | contract ERC20 {
// Get the total token supply
function totalSupply() public constant returns (uint256 _totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) public constant returns (uint256 balance);
// Send _value amount of to... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
| // transfer _value amount of token approved by address _from | LineComment | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
496,
597
]
} | 56,283 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | ERC20 | contract ERC20 {
// Get the total token supply
function totalSupply() public constant returns (uint256 _totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) public constant returns (uint256 balance);
// Send _value amount of to... | approve | function approve(address _spender, uint256 _value) public returns (bool success);
| // approve an address with _value amount of tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
660,
746
]
} | 56,284 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | ERC20 | contract ERC20 {
// Get the total token supply
function totalSupply() public constant returns (uint256 _totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) public constant returns (uint256 balance);
// Send _value amount of to... | allowance | function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
| // get remaining token approved by _owner to _spender | LineComment | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
808,
910
]
} | 56,285 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | VirtualGift | function VirtualGift()
public{
owner = msg.sender;
// save temporaryly new Gift
Gift memory newGift = Gift({
price: 0,
description: "MYTHICAL"
});
// push to array and return the length is the id of new Gift
uint256 mythicalGift = giftStorage.push(newGift) - 1; // id = 0... | /// @dev constructor | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
1750,
2531
]
} | 56,286 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | changeGTOAddress | function changeGTOAddress(address newAddress)
public
onlyOwner{
GTO = ERC20(newAddress);
}
| /// @dev this function change GTO address, this mean you can use many token to buy gift
/// by change GTO address to BNB address
/// @param newAddress is new address of GTO or another Gift like BNB | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
2751,
2870
]
} | 56,287 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | getGTOAddress | function getGTOAddress()
public
constant
returns (address) {
return address(GTO);
}
| /// @dev return current GTO address | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
2918,
3035
]
} | 56,288 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | totalSupply | function totalSupply()
public
constant
returns (uint256){
// exclusive Gift Zero
return giftStorage.length - 1;
}
| /// @dev return total supply of Gift
/// @return length of Gift storage array, except Gift Zero | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
3148,
3305
]
} | 56,289 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | buy | function buy(uint256 GiftId)
validGift(GiftId)
public {
// get old owner of Gift
address oldowner = ownerOf(GiftId);
// tell gifto transfer GTO from new owner to oldowner
// NOTE: new owner MUST approve for Virtual Gift contract to take his balance
require(GTO.transferFrom(msg.sender, oldown... | /// @dev allow people to buy Gift
/// @param GiftId : id of gift user want to buy | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
3404,
3986
]
} | 56,290 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | sendGift | function sendGift(address recipient, uint256 GiftId)
onlyGiftOwner(GiftId)
validGift(GiftId)
public {
// transfer GTO to owner
// require(GTO.transfer(msg.sender, giftStorage[GiftId].price) == true);
// transfer gift to recipient
_transfer(msg.sender, recipient, GiftId);
}
| /// @dev owner send gift to recipient when VG was approved
/// @param recipient : received gift
/// @param GiftId : id of gift which recipient want to buy | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
4163,
4497
]
} | 56,291 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | balanceOf | function balanceOf(address _owner)
public
constant
returns (uint256 balance){
return balances[_owner];
}
| /// @dev get total Gift of an address
/// @param _owner to get balance
/// @return balance of an address | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
4624,
4765
]
} | 56,292 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | ownerOf | function ownerOf(uint256 _GiftId)
public
constant
returns (address _owner) {
require(GiftExists[_GiftId]);
return GiftIndexToOwners[_GiftId];
}
| /// @dev get owner of an Gift id
/// @param _GiftId : id of Gift to get owner
/// @return owner : owner of an Gift id | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
5038,
5225
]
} | 56,293 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | approve | function approve(address _to, uint256 _GiftId)
validGift(_GiftId)
public {
require(msg.sender == ownerOf(_GiftId));
require(msg.sender != _to);
allowed[msg.sender][_to] = _GiftId;
Approval(msg.sender, _to, _GiftId);
}
| /// @dev approve Gift id from msg.sender to an address
/// @param _to : address is approved
/// @param _GiftId : id of Gift in array | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
5380,
5663
]
} | 56,294 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | allowance | function allowance(address _owner, address _spender)
public
constant
returns (uint256 GiftId) {
return allowed[_owner][_spender];
}
| /// @dev get id of Gift was approved from owner to spender
/// @param _owner : address owner of Gift
/// @param _spender : spender was approved
/// @return GiftId | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
5853,
6021
]
} | 56,295 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | takeOwnership | function takeOwnership(uint256 _GiftId)
validGift(_GiftId)
public {
// get oldowner of Giftid
address oldOwner = ownerOf(_GiftId);
// new owner is msg sender
address newOwner = msg.sender;
require(newOwner != oldOwner);
// newOwner must be approved by oldOwner
require(allo... | /// @dev a spender take owner ship of Gift id, when he was approved
/// @param _GiftId : id of Gift has being takeOwnership | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
6162,
6813
]
} | 56,296 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | _transfer | function _transfer(address _from, address _to, uint256 _GiftId)
internal {
// Since the number of Gift is capped to 2^32 we can't overflow this
balances[_to]++;
// transfer ownership
GiftIndexToOwners[_GiftId] = _to;
// When creating new Gift _from is 0x0, but we can't account that address.
... | /// @dev transfer ownership of a specific Gift to an address.
/// @param _from : address owner of Giftid
/// @param _to : address's received
/// @param _GiftId : Gift id | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
7010,
7520
]
} | 56,297 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | transfer | function transfer(address _to, uint256 _GiftId)
validGift(_GiftId)
external {
// not transfer to zero
require(_to != 0x0);
// address received different from sender
require(msg.sender != _to);
// sender must be owner of Giftid
require(msg.sender == ownerOf(_GiftId));
// do not send ... | /// @dev transfer ownership of Giftid from msg sender to an address
/// @param _to : address's received
/// @param _GiftId : Gift id | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
7675,
8155
]
} | 56,298 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | transferFrom | function transferFrom(address _from, address _to, uint256 _GiftId)
validGift(_GiftId)
external {
require(_from == ownerOf(_GiftId));
// Check for approval and valid ownership
require(allowance(_from, msg.sender) == _GiftId);
// address received different from _owner
require(_from != _to);
... | /// @dev transfer Giftid was approved by _from to _to
/// @param _from : address owner of Giftid
/// @param _to : address is received
/// @param _GiftId : Gift id | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
8345,
9120
]
} | 56,299 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | GiftsOfOwner | function GiftsOfOwner(address _owner)
public
view
returns(uint256[] ownerGifts) {
uint256 GiftCount = balanceOf(_owner);
if (GiftCount == 0) {
// Return an empty array
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](GiftCount);
... | /// @dev Returns a list of all Gift IDs assigned to an address.
/// @param _owner The owner whose Gift we are interested in.
/// @notice This method MUST NEVER be called by smart contract code. First, it's fairly
/// expensive (it walks the entire Gift array looking for Gift belonging to owner),
/// @return ownerGifts... | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
9494,
10457
]
} | 56,300 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | giftOwnerByIndex | function giftOwnerByIndex(address _owner, uint256 _index)
external
constant
returns (uint256 GiftId) {
uint256[] memory ownerGifts = GiftsOfOwner(_owner);
return ownerGifts[_index];
}
| /// @dev Returns a Gift IDs assigned to an address.
/// @param _owner The owner whose Gift we are interested in.
/// @param _index to owner Gift list
/// @notice This method MUST NEVER be called by smart contract code. First, it's fairly
/// expensive (it walks the entire Gift array looking for Gift belonging to owner... | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
10905,
11132
]
} | 56,301 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | GiftMetadata | function GiftMetadata(uint256 _GiftId)
public
constant
returns (string infoUrl) {
return GiftLinks[_GiftId];
}
| /// @dev get Gift metadata (url) from GiftLinks
/// @param _GiftId : Gift id
/// @return infoUrl : url of Gift | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
11265,
11409
]
} | 56,302 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | createGift | function createGift(uint256 _price, string _description, string _url)
public
onlyOwner
returns (uint256) {
// save temporarily new Gift
Gift memory newGift = Gift({
price: _price,
description: _description
});
// push to array and return the length is the id of new Gift
uin... | /// @dev function create new Gift
/// @param _price : Gift property
/// @param _description : Gift property
/// @return GiftId | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
11563,
12403
]
} | 56,303 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | getGift | function getGift(uint256 GiftId)
public
constant
returns (uint256, string){
if(GiftId > giftStorage.length){
return (0, "");
}
Gift memory newGift = giftStorage[GiftId];
return (newGift.price, newGift.description);
}
| /// @dev get Gift property
/// @param GiftId : id of Gift
/// @return properties of Gift | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
12514,
12805
]
} | 56,304 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | updateGift | function updateGift(uint256 GiftId, uint256 _price, string _description, string _giftUrl)
public
onlyOwner {
// check Gift exist First
require(GiftExists[GiftId]);
// setting new properties
giftStorage[GiftId].price = _price;
giftStorage[GiftId].description = _description;
GiftLinks[Gift... | /// @dev change gift properties
/// @param GiftId : to change
/// @param _price : new price of gift
/// @param _description : new description
/// @param _giftUrl : new url | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
13010,
13389
]
} | 56,305 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | removeGift | function removeGift(uint256 GiftId)
public
onlyOwner {
// just setting GiftExists equal to false
GiftExists[GiftId] = false;
}
| /// @dev remove gift
/// @param GiftId : gift id to remove | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
13466,
13630
]
} | 56,306 | |||
VirtualGift | VirtualGift.sol | 0xa4b01cc6f2fde9d5d84da419bee4359819ae210b | Solidity | VirtualGift | contract VirtualGift is ERC721 {
// load GTO to Virtual Gift contract, to interact with GTO
ERC20 GTO = ERC20(0x00C5bBaE50781Be1669306b9e001EFF57a2957b09d);
// Gift data
struct Gift {
// gift price
uint256 price;
// gift description
string description;... | withdrawGTO | function withdrawGTO()
onlyOwner
public {
GTO.transfer(owner, GTO.balanceOf(address(this)));
}
| /// @dev withdraw GTO in this contract | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://a2e49411b8b3459abd2801f8b6271c168d85abe5aa91b462fbbc9efdfcd46734 | {
"func_code_index": [
13681,
13804
]
} | 56,307 | |||
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | IBEP20 | interface IBEP20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
158,
230
]
} | 56,308 | |||
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | IBEP20 | interface IBEP20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
... | 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 | GNU GPLv3 | {
"func_code_index": [
446,
527
]
} | 56,309 | |||
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | IBEP20 | interface IBEP20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
... | 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 | GNU GPLv3 | {
"func_code_index": [
798,
885
]
} | 56,310 | |||
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | IBEP20 | interface IBEP20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
... | 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
* tra... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
1534,
1612
]
} | 56,311 | |||
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | IBEP20 | interface IBEP20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
... | 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 | GNU GPLv3 | {
"func_code_index": [
1915,
2016
]
} | 56,312 | |||
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 | GNU GPLv3 | {
"func_code_index": [
248,
428
]
} | 56,313 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 | GNU GPLv3 | {
"func_code_index": [
695,
833
]
} | 56,314 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 | GNU GPLv3 | {
"func_code_index": [
1120,
1311
]
} | 56,315 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 | GNU GPLv3 | {
"func_code_index": [
1554,
2017
]
} | 56,316 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 revert (co... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
2475,
2609
]
} | 56,317 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 invalid ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
3087,
3363
]
} | 56,318 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 (consuming all... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
3810,
3942
]
} | 56,319 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | 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 opcode to r... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
4409,
4576
]
} | 56,320 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
... | /**
* @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 | GNU GPLv3 | {
"func_code_index": [
588,
1202
]
} | 56,321 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | 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 return fa... | /**
* @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: una... | /**
* @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 `transfer... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
2115,
2510
]
} | 56,322 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | 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 return fa... | /**
* @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 returned... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
3247,
3422
]
} | 56,323 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | 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 return fa... | /**
* @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 | GNU GPLv3 | {
"func_code_index": [
3640,
3838
]
} | 56,324 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | 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 return fa... | /**
* @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 BNB balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
4196,
4424
]
} | 56,325 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | 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 return fa... | /**
* @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 | GNU GPLv3 | {
"func_code_index": [
4668,
4985
]
} | 56,326 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
cons... | /**
* @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 | GNU GPLv3 | {
"func_code_index": [
547,
628
]
} | 56,327 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
cons... | /**
* @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 | GNU GPLv3 | {
"func_code_index": [
1171,
1320
]
} | 56,328 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
cons... | /**
* @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 | GNU GPLv3 | {
"func_code_index": [
1465,
1709
]
} | 56,329 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
cons... | /**
* @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 | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
1871,
2084
]
} | 56,330 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
cons... | /**
* @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 | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
2153,
2445
]
} | 56,331 | |
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | Token | contract Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) priva... | //to recieve BNB from pancakeRouter when swaping | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
8020,
8053
]
} | 56,332 | |||||
Token | contracts/Token.sol | 0x846024eb1aed2cf3df30d592509b63fa54f96a03 | Solidity | Token | contract Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) priva... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!takeFee)
removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recip... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | {
"func_code_index": [
16299,
17119
]
} | 56,333 | |||
NIFTYFRIENDS | @openzeppelin/contracts/access/Ownable.sol | 0x079d1091bb4b37da98a3b326bfb0443f71f8aa9f | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://c9e444f64315dc9599cbc7ab35ec1fc6bb20f4e178d40d08e0a8c7cfc2a0a2c2 | {
"func_code_index": [
399,
491
]
} | 56,334 |
NIFTYFRIENDS | @openzeppelin/contracts/access/Ownable.sol | 0x079d1091bb4b37da98a3b326bfb0443f71f8aa9f | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://c9e444f64315dc9599cbc7ab35ec1fc6bb20f4e178d40d08e0a8c7cfc2a0a2c2 | {
"func_code_index": [
1050,
1149
]
} | 56,335 |
NIFTYFRIENDS | @openzeppelin/contracts/access/Ownable.sol | 0x079d1091bb4b37da98a3b326bfb0443f71f8aa9f | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://c9e444f64315dc9599cbc7ab35ec1fc6bb20f4e178d40d08e0a8c7cfc2a0a2c2 | {
"func_code_index": [
1299,
1496
]
} | 56,336 |
NIFTYFRIENDS | @openzeppelin/contracts/access/Ownable.sol | 0x079d1091bb4b37da98a3b326bfb0443f71f8aa9f | Solidity | NIFTYFRIENDS | contract NIFTYFRIENDS is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.00 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 5;
bool public paused = false;
bool public revealed = true;
... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://c9e444f64315dc9599cbc7ab35ec1fc6bb20f4e178d40d08e0a8c7cfc2a0a2c2 | {
"func_code_index": [
626,
731
]
} | 56,337 | ||
NIFTYFRIENDS | @openzeppelin/contracts/access/Ownable.sol | 0x079d1091bb4b37da98a3b326bfb0443f71f8aa9f | Solidity | NIFTYFRIENDS | contract NIFTYFRIENDS is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.00 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 5;
bool public paused = false;
bool public revealed = true;
... | mint | function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);
if (msg.sender != owner()) {
require(msg.value >= cost * _mintAmount);
}
for... | // public | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://c9e444f64315dc9599cbc7ab35ec1fc6bb20f4e178d40d08e0a8c7cfc2a0a2c2 | {
"func_code_index": [
747,
1183
]
} | 56,338 | ||
NIFTYFRIENDS | @openzeppelin/contracts/access/Ownable.sol | 0x079d1091bb4b37da98a3b326bfb0443f71f8aa9f | Solidity | NIFTYFRIENDS | contract NIFTYFRIENDS is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.00 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 5;
bool public paused = false;
bool public revealed = true;
... | reveal | function reveal() public onlyOwner {
revealed = true;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://c9e444f64315dc9599cbc7ab35ec1fc6bb20f4e178d40d08e0a8c7cfc2a0a2c2 | {
"func_code_index": [
2059,
2127
]
} | 56,339 | ||
cmBondVault | cmBondVault.sol | 0x1432836593443b413f86a1d2721af8f09b4d29d7 | Solidity | Context | contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
function _msgData() internal view returns (bytes memory) {
this; // silence state mutability... | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://dd2f077cf973b8c156cfef368ef2aeff5f9de8fbd3d925bb7099c69b8d64ce50 | {
"func_code_index": [
109,
212
]
} | 56,340 | ||
cmBondVault | cmBondVault.sol | 0x1432836593443b413f86a1d2721af8f09b4d29d7 | Solidity | cmBondVault | contract cmBondVault is ERC20, ERC20Detailed {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IERC20 public token;
uint public min = 9500;
uint public constant max = 10000;
uint public earnLowerlimit; //池内空余资金到这个值就自动earn
uint public... | available | function available() public view returns (uint) {
return token.balanceOf(address(this)).mul(min).div(max);
}
| // Custom logic in here for how much the vault allows to be borrowed
// Sets minimum required on-hand to keep small withdrawals cheap | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://dd2f077cf973b8c156cfef368ef2aeff5f9de8fbd3d925bb7099c69b8d64ce50 | {
"func_code_index": [
2177,
2304
]
} | 56,341 | ||
cmBondVault | cmBondVault.sol | 0x1432836593443b413f86a1d2721af8f09b4d29d7 | Solidity | cmBondVault | contract cmBondVault is ERC20, ERC20Detailed {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IERC20 public token;
uint public min = 9500;
uint public constant max = 10000;
uint public earnLowerlimit; //池内空余资金到这个值就自动earn
uint public... | withdraw | function withdraw(uint _shares) public {
//r=实际可得到的USDT
uint r = (balance().mul(_shares)).div(totalSupply());
//每个iUSDT值多少USDT:公式=总的USDT/总的iUSDT
_burn(msg.sender, _shares); //burn iUSST
// Check balance
uint b = token.balanceOf(address(this)); //b=0.15
// 超过超过缓冲... | // No rebalance implementation for lower fees and faster swaps | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://dd2f077cf973b8c156cfef368ef2aeff5f9de8fbd3d925bb7099c69b8d64ce50 | {
"func_code_index": [
3589,
4348
]
} | 56,342 | ||
MainContract | contracts/interface/ERC20Interface.sol | 0x4c717a5fa94adce745dbdd1c485c0666d2656444 | Solidity | ERC20Interface | interface ERC20Interface {
/**
* @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);
... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | Apache-2.0 | bzzr://e69bf3fbe12f60a6837416c5c1a771f6422a9d3f697f417d79b5104dcbaa0719 | {
"func_code_index": [
102,
162
]
} | 56,343 | ||
MainContract | contracts/interface/ERC20Interface.sol | 0x4c717a5fa94adce745dbdd1c485c0666d2656444 | Solidity | ERC20Interface | interface ERC20Interface {
/**
* @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);
... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | Apache-2.0 | bzzr://e69bf3fbe12f60a6837416c5c1a771f6422a9d3f697f417d79b5104dcbaa0719 | {
"func_code_index": [
245,
318
]
} | 56,344 | ||
MainContract | contracts/interface/ERC20Interface.sol | 0x4c717a5fa94adce745dbdd1c485c0666d2656444 | Solidity | ERC20Interface | interface ERC20Interface {
/**
* @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);
... | 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.5.1+commit.c8a2cb62 | Apache-2.0 | bzzr://e69bf3fbe12f60a6837416c5c1a771f6422a9d3f697f417d79b5104dcbaa0719 | {
"func_code_index": [
542,
624
]
} | 56,345 | ||
MainContract | contracts/interface/ERC20Interface.sol | 0x4c717a5fa94adce745dbdd1c485c0666d2656444 | Solidity | ERC20Interface | interface ERC20Interface {
/**
* @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);
... | 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.5.1+commit.c8a2cb62 | Apache-2.0 | bzzr://e69bf3fbe12f60a6837416c5c1a771f6422a9d3f697f417d79b5104dcbaa0719 | {
"func_code_index": [
903,
991
]
} | 56,346 | ||
MainContract | contracts/interface/ERC20Interface.sol | 0x4c717a5fa94adce745dbdd1c485c0666d2656444 | Solidity | ERC20Interface | interface ERC20Interface {
/**
* @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);
... | 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.
*
* > Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* trans... | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | Apache-2.0 | bzzr://e69bf3fbe12f60a6837416c5c1a771f6422a9d3f697f417d79b5104dcbaa0719 | {
"func_code_index": [
1646,
1725
]
} | 56,347 | ||
MainContract | contracts/interface/ERC20Interface.sol | 0x4c717a5fa94adce745dbdd1c485c0666d2656444 | Solidity | ERC20Interface | interface ERC20Interface {
/**
* @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);
... | 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.5.1+commit.c8a2cb62 | Apache-2.0 | bzzr://e69bf3fbe12f60a6837416c5c1a771f6422a9d3f697f417d79b5104dcbaa0719 | {
"func_code_index": [
2038,
2140
]
} | 56,348 | ||
Factory | Factory.sol | 0x8e6fff605143f9f274f7fc676f0366e4a2a43258 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d949078960924e5f41ba9d7e157eb8b5cf17ba6f8582067b31943077b3fbbbc9 | {
"func_code_index": [
268,
659
]
} | 56,349 | |||
Factory | Factory.sol | 0x8e6fff605143f9f274f7fc676f0366e4a2a43258 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d949078960924e5f41ba9d7e157eb8b5cf17ba6f8582067b31943077b3fbbbc9 | {
"func_code_index": [
865,
981
]
} | 56,350 | |||
Factory | Factory.sol | 0x8e6fff605143f9f274f7fc676f0366e4a2a43258 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d949078960924e5f41ba9d7e157eb8b5cf17ba6f8582067b31943077b3fbbbc9 | {
"func_code_index": [
401,
853
]
} | 56,351 | |||
Factory | Factory.sol | 0x8e6fff605143f9f274f7fc676f0366e4a2a43258 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d949078960924e5f41ba9d7e157eb8b5cf17ba6f8582067b31943077b3fbbbc9 | {
"func_code_index": [
1485,
1675
]
} | 56,352 | |||
Factory | Factory.sol | 0x8e6fff605143f9f274f7fc676f0366e4a2a43258 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d949078960924e5f41ba9d7e157eb8b5cf17ba6f8582067b31943077b3fbbbc9 | {
"func_code_index": [
1999,
2144
]
} | 56,353 | |||
Factory | Factory.sol | 0x8e6fff605143f9f274f7fc676f0366e4a2a43258 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d949078960924e5f41ba9d7e157eb8b5cf17ba6f8582067b31943077b3fbbbc9 | {
"func_code_index": [
2389,
2662
]
} | 56,354 | |||
SolidarityDnToken | SolidarityDnToken.sol | 0x299bdf0e6878e958177a4cde76411fc17138a2b0 | Solidity | SolidarityDnToken | contract SolidarityDnToken is ERC20Mintable {
// name of the token
string private _name = "SolidarityDnToken";
// symbol of the token
string private _symbol = "SOLDN";
// decimals of the token
uint8 private _decimals = 18;
// limit of emission (minting)
uint256 public emissio... | /**
* @title The main project contract.
* @author https://grox.solutions
*/ | NatSpecMultiLine | mint | function mint(address account, uint256 amount) public onlyMinter canMint(amount) returns (bool) {
_mint(account, amount);
return true;
}
| /**
* @dev ERC20 mint function (available only to the minters).
* @param account Address to mint token.
* @param amount Amount of tokens to mint.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://241cf645f2f5629c7849fdd192492ef5387929b54ac35e8c200ba9deebc3443f | {
"func_code_index": [
1292,
1456
]
} | 56,355 |
SolidarityDnToken | SolidarityDnToken.sol | 0x299bdf0e6878e958177a4cde76411fc17138a2b0 | Solidity | SolidarityDnToken | contract SolidarityDnToken is ERC20Mintable {
// name of the token
string private _name = "SolidarityDnToken";
// symbol of the token
string private _symbol = "SOLDN";
// decimals of the token
uint8 private _decimals = 18;
// limit of emission (minting)
uint256 public emissio... | /**
* @title The main project contract.
* @author https://grox.solutions
*/ | NatSpecMultiLine | finishMinting | function finishMinting() external onlyMinter {
mintingFinished = true;
}
| /**
* @dev Stop any additional minting of tokens forever.
* Available only to the minters.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://241cf645f2f5629c7849fdd192492ef5387929b54ac35e8c200ba9deebc3443f | {
"func_code_index": [
1576,
1667
]
} | 56,356 |
SolidarityDnToken | SolidarityDnToken.sol | 0x299bdf0e6878e958177a4cde76411fc17138a2b0 | Solidity | SolidarityDnToken | contract SolidarityDnToken is ERC20Mintable {
// name of the token
string private _name = "SolidarityDnToken";
// symbol of the token
string private _symbol = "SOLDN";
// decimals of the token
uint8 private _decimals = 18;
// limit of emission (minting)
uint256 public emissio... | /**
* @title The main project contract.
* @author https://grox.solutions
*/ | NatSpecMultiLine | approveAndCall | function approveAndCall(address spender, uint256 amount, bytes memory extraData) public returns (bool) {
require(approve(spender, amount));
IApproveAndCallFallBack(spender).receiveApproval(msg.sender, amount, address(this), extraData);
return true;
}
| /**
* @dev Allows to send tokens (via Approve and TransferFrom) to other smart contract.
* @param spender Address of smart contracts to work with.
* @param amount Amount of tokens to send.
* @param extraData Any extra data.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://241cf645f2f5629c7849fdd192492ef5387929b54ac35e8c200ba9deebc3443f | {
"func_code_index": [
1932,
2223
]
} | 56,357 |
SolidarityDnToken | SolidarityDnToken.sol | 0x299bdf0e6878e958177a4cde76411fc17138a2b0 | Solidity | SolidarityDnToken | contract SolidarityDnToken is ERC20Mintable {
// name of the token
string private _name = "SolidarityDnToken";
// symbol of the token
string private _symbol = "SOLDN";
// decimals of the token
uint8 private _decimals = 18;
// limit of emission (minting)
uint256 public emissio... | /**
* @title The main project contract.
* @author https://grox.solutions
*/ | NatSpecMultiLine | registerContract | function registerContract(address addr) public onlyOwner {
require(_isContract(addr));
_contracts[addr] = true;
}
| /**
* @dev Allows to register other smart contracts (to prevent loss of tokens via transfer function).
* @param addr Address of smart contracts to work with.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://241cf645f2f5629c7849fdd192492ef5387929b54ac35e8c200ba9deebc3443f | {
"func_code_index": [
2410,
2551
]
} | 56,358 |
SolidarityDnToken | SolidarityDnToken.sol | 0x299bdf0e6878e958177a4cde76411fc17138a2b0 | Solidity | SolidarityDnToken | contract SolidarityDnToken is ERC20Mintable {
// name of the token
string private _name = "SolidarityDnToken";
// symbol of the token
string private _symbol = "SOLDN";
// decimals of the token
uint8 private _decimals = 18;
// limit of emission (minting)
uint256 public emissio... | /**
* @title The main project contract.
* @author https://grox.solutions
*/ | NatSpecMultiLine | unregisterContract | function unregisterContract(address addr) external onlyOwner {
_contracts[addr] = false;
}
| /**
* @dev Allows to unregister registered smart contracts.
* @param addr Address of smart contracts to work with.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://241cf645f2f5629c7849fdd192492ef5387929b54ac35e8c200ba9deebc3443f | {
"func_code_index": [
2695,
2804
]
} | 56,359 |
SolidarityDnToken | SolidarityDnToken.sol | 0x299bdf0e6878e958177a4cde76411fc17138a2b0 | Solidity | SolidarityDnToken | contract SolidarityDnToken is ERC20Mintable {
// name of the token
string private _name = "SolidarityDnToken";
// symbol of the token
string private _symbol = "SOLDN";
// decimals of the token
uint8 private _decimals = 18;
// limit of emission (minting)
uint256 public emissio... | /**
* @title The main project contract.
* @author https://grox.solutions
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint256 value) public returns (bool) {
if (_contracts[to]) {
approveAndCall(to, value, new bytes(0));
} else {
super.transfer(to, value);
}
return true;
}
| /**
* @dev modified transfer function that allows to safely send tokens to smart contract.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://241cf645f2f5629c7849fdd192492ef5387929b54ac35e8c200ba9deebc3443f | {
"func_code_index": [
3015,
3277
]
} | 56,360 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.