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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TokenERC20 | TokenERC20.sol | 0xc608342e743ec99b2839aa3bc97f6f78791bd3fb | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;... | 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;
}
uint256 c = a ... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://9c8eac2a7c7305a20d7019abb8bbb51e4e8952418577898a4d5290bfc6451850 | {
"func_code_index": [
1442,
1853
]
} | 6,000 | ||
TokenERC20 | TokenERC20.sol | 0xc608342e743ec99b2839aa3bc97f6f78791bd3fb | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;... | 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 op... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://9c8eac2a7c7305a20d7019abb8bbb51e4e8952418577898a4d5290bfc6451850 | {
"func_code_index": [
2288,
2413
]
} | 6,001 | ||
TokenERC20 | TokenERC20.sol | 0xc608342e743ec99b2839aa3bc97f6f78791bd3fb | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;... | 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
... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://9c8eac2a7c7305a20d7019abb8bbb51e4e8952418577898a4d5290bfc6451850 | {
"func_code_index": [
2868,
3134
]
} | 6,002 | ||
TokenERC20 | TokenERC20.sol | 0xc608342e743ec99b2839aa3bc97f6f78791bd3fb | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;... | 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 rev... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://9c8eac2a7c7305a20d7019abb8bbb51e4e8952418577898a4d5290bfc6451850 | {
"func_code_index": [
3558,
3681
]
} | 6,003 | ||
TokenERC20 | TokenERC20.sol | 0xc608342e743ec99b2839aa3bc97f6f78791bd3fb | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;... | 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
* i... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://9c8eac2a7c7305a20d7019abb8bbb51e4e8952418577898a4d5290bfc6451850 | {
"func_code_index": [
4125,
4291
]
} | 6,004 | ||
TokenERC20 | TokenERC20.sol | 0xc608342e743ec99b2839aa3bc97f6f78791bd3fb | Solidity | owned | contract owned {
address public owner;
/**
* 初台化构造函数
*/
function owned () public {
owner = msg.sender;
}
/**
* 判断当前合约调用者是否是合约的所有者
*/
modifier onlyOwner {
require (msg.sender == owner);
_;
}
/**
* 合约的所有者指派一个新的管理员
... | owned | function owned () public {
owner = msg.sender;
}
| /**
* 初台化构造函数
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://9c8eac2a7c7305a20d7019abb8bbb51e4e8952418577898a4d5290bfc6451850 | {
"func_code_index": [
82,
149
]
} | 6,005 | ||
TokenERC20 | TokenERC20.sol | 0xc608342e743ec99b2839aa3bc97f6f78791bd3fb | Solidity | owned | contract owned {
address public owner;
/**
* 初台化构造函数
*/
function owned () public {
owner = msg.sender;
}
/**
* 判断当前合约调用者是否是合约的所有者
*/
modifier onlyOwner {
require (msg.sender == owner);
_;
}
/**
* 合约的所有者指派一个新的管理员
... | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
if (newOwner != address(0)) {
owner = newOwner;
}
}
| /**
* 合约的所有者指派一个新的管理员
* @param newOwner address 新的管理员帐户地址
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://9c8eac2a7c7305a20d7019abb8bbb51e4e8952418577898a4d5290bfc6451850 | {
"func_code_index": [
371,
521
]
} | 6,006 | ||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | usingOraclize | contract usingOraclize {
uint constant day = 60*60*24;
uint constant week = 60*60*24*7;
uint constant month = 60*60*24*30;
byte constant proofType_NONE = 0x00;
byte constant proofType_TLSNotary = 0x10;
byte constant proofType_Android = 0x20;
byte constant proofType_Ledger = 0x30;
... | parseInt | function parseInt(string _a) internal pure returns (uint) {
return parseInt(_a, 0);
}
| // parseInt | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
27424,
27528
]
} | 6,007 | |||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | usingOraclize | contract usingOraclize {
uint constant day = 60*60*24;
uint constant week = 60*60*24*7;
uint constant month = 60*60*24*30;
byte constant proofType_NONE = 0x00;
byte constant proofType_TLSNotary = 0x10;
byte constant proofType_Android = 0x20;
byte constant proofType_Ledger = 0x30;
... | parseInt | function parseInt(string _a, uint _b) internal pure returns (uint) {
bytes memory bresult = bytes(_a);
uint mint = 0;
bool decimals = false;
for (uint i=0; i<bresult.length; i++){
if ((bresult[i] >= 48)&&(bresult[i] <= 57)){
if (decimals){
if (_b == 0) break;
... | // parseInt(parseFloat*10^_b) | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
27566,
28180
]
} | 6,008 | |||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | usingOraclize | contract usingOraclize {
uint constant day = 60*60*24;
uint constant week = 60*60*24*7;
uint constant month = 60*60*24*30;
byte constant proofType_NONE = 0x00;
byte constant proofType_TLSNotary = 0x10;
byte constant proofType_Android = 0x20;
byte constant proofType_Ledger = 0x30;
... | copyBytes | function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal pure returns (bytes) {
uint minLength = length + toOffset;
// Buffer too small
require(to.length >= minLength); // Should be a better way?
// NOTE: the offset 32 is added to skip the `size` field of bo... | // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
40013,
40704
]
} | 6,009 | |||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | usingOraclize | contract usingOraclize {
uint constant day = 60*60*24;
uint constant week = 60*60*24*7;
uint constant month = 60*60*24*30;
byte constant proofType_NONE = 0x00;
byte constant proofType_TLSNotary = 0x10;
byte constant proofType_Android = 0x20;
byte constant proofType_Ledger = 0x30;
... | safer_ecrecover | function safer_ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal returns (bool, address) {
// We do our own memory management here. Solidity uses memory offset
// 0x40 to store the current end of memory. We write past it (as
// writes are memory extensions), but don't update the offset so
... | // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
// Duplicate Solidity's ecrecover, but catching the CALL return value | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
40901,
41904
]
} | 6,010 | |||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | usingOraclize | contract usingOraclize {
uint constant day = 60*60*24;
uint constant week = 60*60*24*7;
uint constant month = 60*60*24*30;
byte constant proofType_NONE = 0x00;
byte constant proofType_TLSNotary = 0x10;
byte constant proofType_Android = 0x20;
byte constant proofType_Ledger = 0x30;
... | ecrecovery | function ecrecovery(bytes32 hash, bytes sig) internal returns (bool, address) {
bytes32 r;
bytes32 s;
uint8 v;
if (sig.length != 65)
return (false, 0);
// The signature format is a compact form of:
// {bytes32 r}{bytes32 s}{uint8 v}
// Compact means, uint8 is not padded t... | // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
42026,
43452
]
} | 6,011 | |||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | Mortal | contract Mortal {
/* Define variable owner of the type address */
address owner;
/* This function is executed at initialization and sets the owner of the contract */
constructor() public {
owner = msg.sender;
}
/* Function to recover the funds on the contract */
function ... | kill | function kill() public {
if (msg.sender == owner) {
selfdestruct(owner);
}
}
| /* Function to recover the funds on the contract */ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
307,
424
]
} | 6,012 | |||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | BucketContract | contract BucketContract is Mortal {
mapping (address => uint) public betAmount;
mapping (address => bool) public hasBet;
address[] public betters;
uint[] public amountWon;
uint[] public amountBid;
address public owner;
uint256 public totalBid;
bool public payoutComplete;
bool public isWinner;
uint25... | setWinner | function setWinner(uint256 _gameId) public onlyGameContractOrOwner {
require(_gameId == gameContractObject.gameId());
assert(gameContractObject.state() == GameContract.GameState.RandomReceived);
assert(!isWinner);
isWinner = true;
address houseAddressOne = gameContractObject.getHouseAddressOne();
address ho... | /* setWinner function - set the winning contract */ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
2359,
3716
]
} | 6,013 | |||
GameContract | GameContract.sol | 0x9b3ca77291bd84bbe8bc1f878e6fbd7d5671d5bd | Solidity | GameContract | contract GameContract is usingOraclize, Mortal {
enum GameState {
Deployed,
Started,
RandomRequesting,
RandomReceived,
Settled,
Finishing,
Finished
}
address public owner;
address public otherSettingOwner;
uint256 public price = 1e16;
uint256 public gameId;
uint public startTime = 0... | setHouseAddressShare | function setHouseAddressShare (uint _share) public onlyOtherSettingOwner {
require(_share >= 1 && _share <= 100);
require(_share + shareOfReferralAddress <= 100);
shareOfHouseAddress = _share;
}
| /*House Share will be value between 1-100*/ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://442ed2b459e10c6f07d76c20547225e07da966621a64ecabda83e7af9168dcd8 | {
"func_code_index": [
2604,
2811
]
} | 6,014 | |||
FlyFroogles | /contracts/FlyFroogles.sol | 0xd923f646cca9996be8d95e91d928be67101d9fef | Solidity | FlyFroogles | contract FlyFroogles is ERC721A, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
address private OSProxyRegistry = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
bool private isOpenSeaProxyActive =... | Mint | function Mint(uint256 numberOfTokens)
external
payable
nonReentrant
isCorrectPayment(NFTPrice, numberOfTokens)
publicSaleActive
canMintNFTs(numberOfTokens)
maxMintsPerTX(numberOfTokens)
{
_safeMint(msg.sender, numberOfTokens);
}
| // Mint Function | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1864,
2168
]
} | 6,015 | ||||
FlyFroogles | /contracts/FlyFroogles.sol | 0xd923f646cca9996be8d95e91d928be67101d9fef | Solidity | FlyFroogles | contract FlyFroogles is ERC721A, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
address private OSProxyRegistry = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
bool private isOpenSeaProxyActive =... | FreeMint | function FreeMint(uint256 numberOfTokens)
external
nonReentrant
publicSaleActive
canMintNFTs(numberOfTokens)
maxMintsPerFreeTX(numberOfTokens)
freeMintsAvailable()
{
_safeMint(msg.sender, numberOfTokens);
}
| // Free Mint Function | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
2196,
2470
]
} | 6,016 | ||||
FlyFroogles | /contracts/FlyFroogles.sol | 0xd923f646cca9996be8d95e91d928be67101d9fef | Solidity | FlyFroogles | contract FlyFroogles is ERC721A, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
address private OSProxyRegistry = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
bool private isOpenSeaProxyActive =... | GiveawayMint | function GiveawayMint(uint256 numberOfTokens)
external
onlyOwner
canMintNFTs(numberOfTokens)
maxMintsPerFreeTX(numberOfTokens)
{
_safeMint(msg.sender, numberOfTokens);
}
| // Owner Mint Function | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
2499,
2720
]
} | 6,017 | ||||
FlyFroogles | /contracts/FlyFroogles.sol | 0xd923f646cca9996be8d95e91d928be67101d9fef | Solidity | FlyFroogles | contract FlyFroogles is ERC721A, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
address private OSProxyRegistry = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
bool private isOpenSeaProxyActive =... | withdraw | function withdraw() public onlyOwner {
uint balance = address(this).balance;
payable(msg.sender).transfer(balance);
}
| // Withdraw funciton | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
3062,
3203
]
} | 6,018 | ||||
FlyFroogles | /contracts/FlyFroogles.sol | 0xd923f646cca9996be8d95e91d928be67101d9fef | Solidity | FlyFroogles | contract FlyFroogles is ERC721A, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
address private OSProxyRegistry = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
bool private isOpenSeaProxyActive =... | setIsOpenSeaProxyActive | function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive)
external
onlyOwner
{
isOpenSeaProxyActive = _isOpenSeaProxyActive;
}
| // Function to disable gasless listings for security in case OpenSea ever shuts down or is compromised | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
3312,
3477
]
} | 6,019 | ||||
FlyFroogles | /contracts/FlyFroogles.sol | 0xd923f646cca9996be8d95e91d928be67101d9fef | Solidity | FlyFroogles | contract FlyFroogles is ERC721A, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
address private OSProxyRegistry = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
bool private isOpenSeaProxyActive =... | nextTokenId | function nextTokenId() private returns (uint256) {
tokenCounter.increment();
return tokenCounter.current();
}
| // Supporting Funcitons | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
4084,
4217
]
} | 6,020 | ||||
Erc20VaultPoolSwap | contracts/Erc20VaultPoolSwap.sol | 0x13832ea959ff5f4de001f7d4bbbd4b16f140bb76 | Solidity | Erc20VaultPoolSwap | contract Erc20VaultPoolSwap is ProgressiveFee, IErc20VaultPoolSwap {
using SafeERC20 for IERC20;
event TakeFee(address indexed pool, address indexed token, uint256 amount);
event SetVaultConfig(
address indexed token,
address depositor,
uint256 depositorAmountLength,
uint256 depositorIn... | calcVaultOutByUsdc | function calcVaultOutByUsdc(address _token, uint256 _usdcIn) public view returns (uint256 amountOut) {
VaultConfig storage vc = vaultConfig[_token];
uint256 lpByUsdcPrice = ICurvePoolRegistry(vc.vaultRegistry).get_virtual_price_from_lp_token(vc.lpToken);
uint256 vaultByLpPrice = IVault(_token).pricePerShare();... | /* ========== View Functions ========== */ | Comment | v0.6.12+commit.27d51765 | MIT | ipfs://f41e0d95042138ad7054ade4b81230ad7989f38b4e8aeeb93714f20805a5f95c | {
"func_code_index": [
4540,
4957
]
} | 6,021 | ||
Erc20VaultPoolSwap | contracts/Erc20VaultPoolSwap.sol | 0x13832ea959ff5f4de001f7d4bbbd4b16f140bb76 | Solidity | Erc20VaultPoolSwap | contract Erc20VaultPoolSwap is ProgressiveFee, IErc20VaultPoolSwap {
using SafeERC20 for IERC20;
event TakeFee(address indexed pool, address indexed token, uint256 amount);
event SetVaultConfig(
address indexed token,
address depositor,
uint256 depositorAmountLength,
uint256 depositorIn... | _depositVaultAndGetTokensInPipt | function _depositVaultAndGetTokensInPipt(address _pool, uint256 _totalInputAmount)
internal
returns (uint256 poolAmountOut, uint256[] memory tokensInPipt)
{
require(_totalInputAmount != 0, "NULL_INPUT");
uint256 len = poolTokens[_pool].length;
uint256 piptTotalSupply = PowerIndexPoolInterface(_pool).tot... | /* ========== Internal Functions ========== */ | Comment | v0.6.12+commit.27d51765 | MIT | ipfs://f41e0d95042138ad7054ade4b81230ad7989f38b4e8aeeb93714f20805a5f95c | {
"func_code_index": [
8671,
9990
]
} | 6,022 | ||
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
165,
238
]
} | 6,023 | ||
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
462,
544
]
} | 6,024 | ||
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
823,
911
]
} | 6,025 | ||
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
1575,
1654
]
} | 6,026 | ||
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
1967,
2069
]
} | 6,027 | ||
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
259,
445
]
} | 6,028 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
723,
864
]
} | 6,029 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
1162,
1359
]
} | 6,030 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
1613,
2089
]
} | 6,031 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
2560,
2697
]
} | 6,032 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
3188,
3471
]
} | 6,033 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
3931,
4066
]
} | 6,034 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
4546,
4717
]
} | 6,035 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
606,
1230
]
} | 6,036 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
2160,
2562
]
} | 6,037 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
3318,
3496
]
} | 6,038 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
3721,
3922
]
} | 6,039 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
4292,
4523
]
} | 6,040 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
4774,
5095
]
} | 6,041 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Ownable | contract Ownable is Context {
address public _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the current owner.
*/
function owner() pu... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
297,
381
]
} | 6,042 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Ownable | contract Ownable is Context {
address public _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the current owner.
*/
function owner() pu... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
940,
1093
]
} | 6,043 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Ownable | contract Ownable is Context {
address public _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the current owner.
*/
function owner() pu... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
1243,
1492
]
} | 6,044 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Ownable | contract Ownable is Context {
address public _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the current owner.
*/
function owner() pu... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
1660,
1879
]
} | 6,045 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | Ownable | contract Ownable is Context {
address public _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the current owner.
*/
function owner() pu... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
1950,
2248
]
} | 6,046 |
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | CoinToken | contract CoinToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address =>... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
8794,
8828
]
} | 6,047 | ||||
CoinToken | CoinToken.sol | 0x7056d97593522743c70cafc089527cd12ec352db | Solidity | CoinToken | contract CoinToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address =>... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!takeFee)
removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.6.12+commit.27d51765 | None | ipfs://94cfffddcc7e1fa923b43d08299434a9390b49dc307cb3d4f4ea2c20baa6f568 | {
"func_code_index": [
16647,
17486
]
} | 6,048 | ||
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | 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() {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
261,
314
]
} | 6,049 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | 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() {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
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.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
637,
813
]
} | 6,050 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | BasicToken | contract BasicToken is ERC20Basic, Ownable {
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address => bool) public allowedAddresses;
mapp... | /**
* @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(canTransfer(msg.sender));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Tr... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
1176,
1566
]
} | 6,051 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | BasicToken | contract BasicToken is ERC20Basic, Ownable {
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address => bool) public allowedAddresses;
mapp... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
1772,
1888
]
} | 6,052 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @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(canTransfer(msg.sender));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
392,
980
]
} | 6,053 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @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.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
1612,
1802
]
} | 6,054 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @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 constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
2126,
2271
]
} | 6,055 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @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)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
2516,
2787
]
} | 6,056 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | BurnableToken | contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value > 0);
require(_valu... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
require(_value > 0);
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
225,
760
]
} | 6,057 |
BESKAR | BESKAR.sol | 0x586aab75c7f789163d6865aaeaf363e147f11534 | Solidity | BESKAR | contract BESKAR is BurnableToken {
string public constant name = "BESKAR";
string public constant symbol = "BESK";
uint public constant decimals = 18;
// there is no problem in using * here instead of .mul()
uint256 public constant initialSupply = 10000000000 * (10 ** uint256(decimals));
... | BESKAR | function BESKAR () {
totalSupply = initialSupply;
balances[msg.sender] = initialSupply; // Send all tokens to owner
allowedAddresses[owner] = true;
}
| // Constructors | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://2c808ae1bb73d7299fcd97ceaded54c7c8898746b676cbefbac4dab9f65de3f6 | {
"func_code_index": [
340,
526
]
} | 6,058 | ||
LLV_v30_12 | LLV_v30_12.sol | 0x0e1bebe6b75595d3c7fb99550757e310bc2edf2a | Solidity | LLV_v30_12 | contract LLV_v30_12 {
address owner ;
function LLV_v30_12 () public {
owner = msg.sender;
}
modifier onlyOwner () {
require(msg.sender == owner );
_;
}
... | Eligibility_Group_1 | function Eligibility_Group_1 (
address _User_1 ,
IERC20Token _Securities_1 ,
uint256 _Standard_1
)
public onlyOwner
{
User_1 = _User_1 ;
Securities_1 = _Securities_1 ;
Standard_1 = _Standard_1 ;
}
| // _Standard_5 ; | LineComment | v0.4.21+commit.dfe3193c | bzzr://a3e690e6d1c37b6b330330dba6a3141022df200d8ffcacdbcd58183dcac98c69 | {
"func_code_index": [
3919,
4230
]
} | 6,059 | |||
LLV_v30_12 | LLV_v30_12.sol | 0x0e1bebe6b75595d3c7fb99550757e310bc2edf2a | Solidity | LLV_v30_12 | contract LLV_v30_12 {
address owner ;
function LLV_v30_12 () public {
owner = msg.sender;
}
modifier onlyOwner () {
require(msg.sender == owner );
_;
}
... | retrait_1 | function retrait_1 () public {
require( msg.sender == User_1 );
require( Securities_1.transfer(User_1, Standard_1) );
require( ID == ID_control );
require( Cmd == Cmd_control );
require( Depositary_function == Depositary_function_control );
}
| //
// | LineComment | v0.4.21+commit.dfe3193c | bzzr://a3e690e6d1c37b6b330330dba6a3141022df200d8ffcacdbcd58183dcac98c69 | {
"func_code_index": [
5574,
5886
]
} | 6,060 | |||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
94,
154
]
} | 6,061 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
237,
310
]
} | 6,062 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
534,
616
]
} | 6,063 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
895,
983
]
} | 6,064 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
1647,
1726
]
} | 6,065 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
2039,
2141
]
} | 6,066 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
259,
445
]
} | 6,067 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
723,
864
]
} | 6,068 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
1162,
1359
]
} | 6,069 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
1613,
2089
]
} | 6,070 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
2560,
2697
]
} | 6,071 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
3188,
3471
]
} | 6,072 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
3931,
4066
]
} | 6,073 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | 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.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
4546,
4717
]
} | 6,074 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
606,
1230
]
} | 6,075 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
2160,
2562
]
} | 6,076 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
3318,
3496
]
} | 6,077 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
3721,
3922
]
} | 6,078 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
4292,
4523
]
} | 6,079 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
4774,
5095
]
} | 6,080 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
497,
581
]
} | 6,081 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
1139,
1292
]
} | 6,082 | ||
SEC | SEC.sol | 0x9c061df134d11412151e9c200ce3f9f6f295094a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fe80e09e0e34a83eecf77faca2ec5cdf5e858cffad952723ed8905d0cd333b33 | {
"func_code_index": [
1442,
1691
]
} | 6,083 | ||
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() override external view returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
1010,
1138
]
} | 6,084 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) override external view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
1358,
1494
]
} | 6,085 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) override external returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
1838,
2131
]
} | 6,086 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) override external returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
2639,
2863
]
} | 6,087 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) override external returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, toke... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
3394,
3768
]
} | 6,088 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) override external view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
4051,
4214
]
} | 6,089 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | exchangeRate | function exchangeRate() external view returns (uint rate) {
return _exchangeRate;
}
| // ------------------------------------------------------------------------
// Get current exchange rate
// ------------------------------------------------------------------------ | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
4415,
4517
]
} | 6,090 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes memory data) external returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(this), data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
4872,
5212
]
} | 6,091 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAndCall | function transferAndCall(address to, uint tokens, bytes memory data) public returns (bool success) {
require (tokens <= balances[msg.sender] );
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
require (TransferAndCallFallBack(to).receiveTran... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to a smart contract and receive approval
// - Owner's account must have sufficient balance to transfer
// - Smartcontract must accept the payment
// - 0 value transfers are allowed
// -----... | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
5635,
6099
]
} | 6,092 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | buyTokens | function buyTokens() public payable returns (bool success) {
require (msg.value > 0, "ETH amount should be greater than zero");
uint tokenAmount = _exchangeRate * msg.value;
balances[owner] = safeSub(balances[owner], tokenAmount);
balances[msg.sender] = safeAdd(balances[msg.sender], token... | // ----------------------------------------------------------------------------
// Buy EASY tokens for ETH by exchange rate
// ---------------------------------------------------------------------------- | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
6323,
6757
]
} | 6,093 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | buyTokensAndTransfer | function buyTokensAndTransfer(address to, bytes memory data) external payable returns (bool success) {
require (buyTokens());
uint tokenAmount = _exchangeRate * msg.value ;
require (transferAndCall (to, tokenAmount, data));
return true;
}
| // ----------------------------------------------------------------------------
// Buy tokens and transfer to other address, additional data
// can be passed as parameter
// ---------------------------------------------------------------------------- | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
7034,
7318
]
} | 6,094 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) external onlyOwner returns (bool success) {
return ERC20(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
7555,
7737
]
} | 6,095 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | changeExchangeRate | function changeExchangeRate(uint newExchangeRate) external onlyOwner {
require (newExchangeRate > 0, "Exchange rate should be greater than zero");
_exchangeRate = newExchangeRate;
emit ChangeExchangeRate(newExchangeRate);
}
| // ----------------------------------------------------------------------------
// Owner can change exchange rate
// ---------------------------------------------------------------------------- | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
7951,
8212
]
} | 6,096 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFunds | function transferFunds(address to, uint amount) external onlyOwner returns (bool success) {
require (amount <= address(this).balance, "Not enough funds");
address(uint160(to)).transfer(amount);
return true;
}
| // ----------------------------------------------------------------------------
// Owner can transfer contract funds
// ---------------------------------------------------------------------------- | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
8432,
8677
]
} | 6,097 |
EASYCOIN | EASYCOIN.sol | 0x9e43f77f2484d2b9b1e2f88b2ce186147bcf4590 | Solidity | EASYCOIN | contract EASYCOIN is ERC20, Owned, SafeMath {
string constant public symbol = "EASY";
string constant public name = "EASY COIN";
uint8 constant public decimals = 18;
uint constant private _totalSupply = 1000000000 * 10 ** 18;
uint private _exchangeRate;
mapping(address => uint) balances;... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | acceptOwnership | function acceptOwnership() public override {
balances[newOwner] = balances[owner];
balances[owner] = 0;
emit Transfer(owner, newOwner, balances[newOwner]);
super.acceptOwnership();
}
| // ----------------------------------------------------------------------------
// Accept ownership by new owner
// ---------------------------------------------------------------------------- | LineComment | v0.7.4+commit.3f05b770 | None | ipfs://be31b3a2f0a7805c688c8a7a2df1846f9cc1053d10e1b86e74a2a84e2c8aadcb | {
"func_code_index": [
8893,
9121
]
} | 6,098 |
KySportsTV | KySportsTV.sol | 0x705ad6e3115607759a076cf1f67b30fc07460863 | 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.8.1+commit.df193b15 | None | ipfs://f84a56c0b96bab5bf543b3f692cb2bd57a0e6c2a7e2614bf498f0e1e8f9540e5 | {
"func_code_index": [
94,
154
]
} | 6,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.