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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | unfreezeAccount | function unfreezeAccount(address _holder) public onlyOwner returns (bool) {
require(frozen[_holder]);
frozen[_holder] = false;
emit Unfreeze(_holder);
return true;
}
| /**
* Unfreeze Account.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
5159,
5332
]
} | 8,400 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | burn | function burn(uint256 _value) public onlyOwner returns (bool) {
require(_value <= balances[msg.sender]);
address burner = msg.sender;
balances[burner] = balances[burner].sub(_value);
totalSupply_ = totalSupply_.sub(_value);
emit Burn(burner, _value);
return true;
}
| /**
* Token Burn.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
5364,
5645
]
} | 8,401 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | burn_address | function burn_address(address _target) public onlyOwner returns (bool){
require(_target != address(0));
uint256 _targetValue = balances[_target];
balances[_target] = 0;
totalSupply_ = totalSupply_.sub(_targetValue);
address burner = msg.sender;
emit Burn(burner, _targetValue);
return true;
}
| /**
* Token Address All Burn.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
5689,
5996
]
} | 8,402 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | mint | function mint(uint256 _amount) public onlyOwner returns (bool) {
totalSupply_ = totalSupply_.add(_amount);
balances[owner] = balances[owner].add(_amount);
emit Transfer(address(0), owner, _amount);
return true;
}
| /**
* Token Mint.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
6028,
6252
]
} | 8,403 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | isContract | function isContract(address addr) internal view returns (bool) {
uint size;
assembly{size := extcodesize(addr)}
return size > 0;
}
| /**
* @dev Internal function to determine if an address is a contract
* @param addr The address being queried
* @return True if `_addr` is a contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
6420,
6561
]
} | 8,404 | ||
Token | contracts/SafeMath.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
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.
... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | 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-solidity/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
106,
544
]
} | 8,405 |
Token | contracts/SafeMath.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
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.
... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
674,
982
]
} | 8,406 |
Token | contracts/SafeMath.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
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.
... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
1115,
1270
]
} | 8,407 |
Token | contracts/SafeMath.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
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.
... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
| /**
* @dev Adds two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
1353,
1508
]
} | 8,408 |
Token | contracts/SafeMath.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
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.
... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
1664,
1793
]
} | 8,409 |
LinguaFranca | @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanc... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the total amount of tokens stored by the contract.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
132,
192
]
} | 8,410 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanc... | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
| /**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
375,
479
]
} | 8,411 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanc... | tokenByIndex | function tokenByIndex(uint256 index) external view returns (uint256);
| /**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
655,
729
]
} | 8,412 | ||
ClusterRegistryProxy | ClusterRegistryProxy.sol | 0x5b7b5632149653b974e75b18f7b02deeeac38e47 | Solidity | ClusterRegistryProxy | contract ClusterRegistryProxy {
bytes32 internal constant IMPLEMENTATION_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.implementation")) - 1
);
bytes32 internal constant PROXY_ADMIN_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.admin")) - 1
);
constructor(address contr... | /// @title Contract to reward overlapping stakes
/// @author Marlin
/// @notice Use this contract only for testing
/// @dev Contract may or may not change in future (depending upon the new slots in proxy-store) | NatSpecSingleLine | updateLogic | function updateLogic(address _newLogic) public {
require(
msg.sender == getAdmin(),
"Only Admin should be able to update the contracts"
);
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, _newLogic)
}
}
| /// @author Marlin
/// @dev Only admin can update the contract
/// @param _newLogic address is the address of the contract that has to updated to | NatSpecSingleLine | v0.5.17+commit.d19bba13 | MIT | bzzr://74033218418fe14144f48d7a776642fee9fce025e98c644bd6ab5d1419f10f26 | {
"func_code_index": [
1159,
1466
]
} | 8,413 |
ClusterRegistryProxy | ClusterRegistryProxy.sol | 0x5b7b5632149653b974e75b18f7b02deeeac38e47 | Solidity | ClusterRegistryProxy | contract ClusterRegistryProxy {
bytes32 internal constant IMPLEMENTATION_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.implementation")) - 1
);
bytes32 internal constant PROXY_ADMIN_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.admin")) - 1
);
constructor(address contr... | /// @title Contract to reward overlapping stakes
/// @author Marlin
/// @notice Use this contract only for testing
/// @dev Contract may or may not change in future (depending upon the new slots in proxy-store) | NatSpecSingleLine | getAdmin | function getAdmin() internal view returns (address result) {
bytes32 slot = PROXY_ADMIN_SLOT;
assembly {
result := sload(slot)
}
}
| /// @author Marlin
/// @dev use assembly as contract store slot is manually decided | NatSpecSingleLine | v0.5.17+commit.d19bba13 | MIT | bzzr://74033218418fe14144f48d7a776642fee9fce025e98c644bd6ab5d1419f10f26 | {
"func_code_index": [
1563,
1743
]
} | 8,414 |
ClusterRegistryProxy | ClusterRegistryProxy.sol | 0x5b7b5632149653b974e75b18f7b02deeeac38e47 | Solidity | ClusterRegistryProxy | contract ClusterRegistryProxy {
bytes32 internal constant IMPLEMENTATION_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.implementation")) - 1
);
bytes32 internal constant PROXY_ADMIN_SLOT = bytes32(
uint256(keccak256("eip1967.proxy.admin")) - 1
);
constructor(address contr... | /// @title Contract to reward overlapping stakes
/// @author Marlin
/// @notice Use this contract only for testing
/// @dev Contract may or may not change in future (depending upon the new slots in proxy-store) | NatSpecSingleLine | function() external payable {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
let contractLogic := sload(slot)
calldatacopy(0x0, 0x0, calldatasize())
let success := delegatecall(
sub(gas(), 10000),
contractLogic,
0x0,
calldatasize()... | /// @author Marlin
/// @dev add functionality to forward the balance as well. | NatSpecSingleLine | v0.5.17+commit.d19bba13 | MIT | bzzr://74033218418fe14144f48d7a776642fee9fce025e98c644bd6ab5d1419f10f26 | {
"func_code_index": [
1834,
2549
]
} | 8,415 | |
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address... | TokenERC20 | function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply;
name = tokenName; ... | /**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
766,
1271
]
} | 8,416 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to])... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
1355,
2197
]
} | 8,417 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
2403,
2515
]
} | 8,418 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
2790,
3091
]
} | 8,419 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | RealTract | contract RealTract is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes... | RealTract | function RealTract(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
| /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
392,
570
]
} | 8,420 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | RealTract | contract RealTract is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] >= _value); // Check if the sender has enough
require (balanceOf[_to] + _value > balanc... | /* Internal transfer, only can be called by this contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
639,
1421
]
} | 8,421 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | RealTract | contract RealTract is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes... | setPrices | function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
sellPrice = newSellPrice;
buyPrice = newBuyPrice;
}
| /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
/// @param newSellPrice Price the users can sell to the contract
/// @param newBuyPrice Price users can buy from the contract | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
1828,
1988
]
} | 8,422 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | RealTract | contract RealTract is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes... | buy | function buy() payable public {
uint amount = msg.value / buyPrice; // calculates the amount
_transfer(this, msg.sender, amount); // makes the transfers
}
| /// @notice Buy tokens from contract by sending ether | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
2050,
2259
]
} | 8,423 | |||
RealTract | RealTract.sol | 0x9ce509f5ea9567d7cfbf14c5bc19de4b5e4fcaef | Solidity | RealTract | contract RealTract is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes... | sell | function sell(uint256 amount) public {
require(this.balance >= amount * sellPrice); // checks if the contract has enough ether to buy
_transfer(msg.sender, this, amount); // makes the transfers
msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It's importan... | /// @notice Sell `amount` tokens to contract
/// @param amount amount of tokens to be sold | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://7beded4dbaf1bc919de3a7b2ef4679242c8cf73da05814f0326b14e99810a7f4 | {
"func_code_index": [
2363,
2751
]
} | 8,424 | |||
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view returns (uint) {
return _totalSupply.sub(balances[address(0)]);
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
909,
1016
]
} | 8,425 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | stopTrade | function stopTrade() public onlyOwner {
require(_stopTrade != true);
_stopTrade = true;
}
| // ------------------------------------------------------------------------
// Stop Trade
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
1193,
1292
]
} | 8,426 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | startTrade | function startTrade() public onlyOwner {
require(_stopTrade == true);
_stopTrade = false;
}
| // ------------------------------------------------------------------------
// Start Trade
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
1470,
1571
]
} | 8,427 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
1784,
1897
]
} | 8,428 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
require(_stopTrade != true);
require(to > address(0));
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
2228,
2533
]
} | 8,429 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
require(_stopTrade != true);
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
3020,
3243
]
} | 8,430 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
require(_stopTrade != true);
require(from > address(0));
require(to > address(0));
balances[from] = balances[from].sub(tokens);
if(from != to && from != msg.sender) {
allowed[from][msg.sender] = allowed[from][msg... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer... | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
3754,
4208
]
} | 8,431 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
require(_stopTrade != true);
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
4479,
4653
]
} | 8,432 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success) {
require(msg.sender != spender);
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(this), data);
... | // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------... | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
5001,
5346
]
} | 8,433 |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | function () external payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
5529,
5578
]
} | 8,434 | |
DUCATOProtocolToken | DUCATOProtocolToken.sol | 0xa117ea1c0c85cef648df2b6f40e50bb5475c228d | Solidity | DUCATOProtocolToken | contract DUCATOProtocolToken is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
bool _stopTrade;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a9662256c0e8eb2202a1650d1424f89dbb6cea37ca440af211c6f91ba8c6ddd1 | {
"func_code_index": [
5802,
5979
]
} | 8,435 |
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender =... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
506,
590
]
} | 8,436 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender =... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
1148,
1301
]
} | 8,437 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender =... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
1451,
1700
]
} | 8,438 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | internalTransfer | function internalTransfer (address from, address to, uint value) internal {
require(to != address(0x0)); // Prevent people from accidentally burning their tokens
balanceOf[from] = balanceOf[from].sub(value);
balanceOf[to] = balanceOf[to].add(value);
emit Transfer(from, to, value);
}
| /**
* Utility internal function used to safely transfer `value` tokens `from` -> `to`. Throws if transfer is impossible.
* @param from - account to make the transfer from
* @param to - account to transfer `value` tokens to
* @param value - tokens to transfer to account `to`
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
4017,
4346
]
} | 8,439 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | internalDoubleTransfer | function internalDoubleTransfer (address from, address to1, uint value1, address to2, uint value2) internal {
require(to1 != address(0x0) && to2 != address(0x0)); // Prevent people from accidentally burning their tokens
balanceOf[from] = balanceOf[from].sub(value1.add(value2));
balanceOf[to1] = balanceOf... | /**
* Utility internal function used to safely transfer `value1` tokens `from` -> `to1`, and `value2` tokens
* `from` -> `to2`, minimizing gas usage (calling `internalTransfer` twice is more expensive). Throws if
* transfers are impossible.
* @param from - account to make the transfer from
* @param to1 - acco... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
4918,
5466
]
} | 8,440 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | requireSignature | function requireSignature (
bytes32 data,
address signer,
uint256 deadline,
uint256 sigId,
bytes memory sig,
sigStandard sigStd,
sigDestination sigDest
) internal {
bytes32 r;
bytes32 s;
uint8 v;
assembly { // solium-disable-line security/no-inline-assembly
... | /**
* Internal method that makes sure that the given signature corresponds to a given data and is made by `signer`.
* It utilizes three (four) standards of message signing in Ethereum, as at the moment of this smart contract
* development there is no single signing standard defined. For example, Metamask and Geth... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
6836,
9300
]
} | 8,441 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | hexToString | function hexToString (bytes32 sig) internal pure returns (bytes memory) {
bytes memory str = new bytes(64);
for (uint8 i = 0; i < 32; ++i) {
str[2 * i] = byte((uint8(sig[i]) / 16 < 10 ? 48 : 87) + uint8(sig[i]) / 16);
str[2 * i + 1] = byte((uint8(sig[i]) % 16 < 10 ? 48 : 87) + (uint8(sig[i])... | /**
* Utility costly function to encode bytes HEX representation as string.
* @param sig - signature as bytes32 to represent as string
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
9464,
9852
]
} | 8,442 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | transfer | function transfer (address to, uint256 value) public returns (bool) {
internalTransfer(msg.sender, to, value);
return true;
}
| /**
* Transfer `value` tokens to `to` address from the account of sender.
* @param to - the address of the recipient
* @param value - the amount to send
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
10040,
10193
]
} | 8,443 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | transferViaSignature | function transferViaSignature (
address from,
address to,
uint256 value,
uint256 fee,
address feeRecipient,
uint256 deadline,
uint256 sigId,... | /**
* This function distincts transaction signer from transaction executor. It allows anyone to transfer tokens
* from the `from` account by providing a valid signature, which can only be obtained from the `from` account
* owner.
* Note that passed parameter sigId is unique and cannot be passed twice (prevents ... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
11653,
12419
]
} | 8,444 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | approve | function approve (address spender, uint256 value) public returns (bool) {
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
| /**
* Allow `spender` to take `value` tokens from the transaction sender's account.
* Beware that changing an allowance with this method brings the risk that `spender` may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to ... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
13040,
13248
]
} | 8,445 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | approveViaSignature | function approveViaSignature (
address from,
address spender,
uint256 value,
uint256 fee,
address feeRecipient,
uint256 deadline,
uint256 sigId,
bytes calldata sig,
sigStandard sigStd
) external returns (bool) {
requi... | /**
* Same as `transferViaSignature`, but for `approve`.
* Use case: the user wants to set an allowance for the smart contract or another user without having Ether on
* their balance.
* @param from - the account to approve withdrawal from, which signed all below parameters
* @param spender - the account allow... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
14235,
14985
]
} | 8,446 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | transferFrom | function transferFrom (address from, address to, uint256 value) public returns (bool) {
allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);
internalTransfer(from, to, value);
return true;
}
| /**
* Transfer `value` tokens to `to` address from the `from` account, using the previously set allowance.
* @param from - the address to transfer tokens from
* @param to - the address of the recipient
* @param value - the amount to send
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
15264,
15508
]
} | 8,447 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | transferFromViaSignature | function transferFromViaSignature (
address signer,
address from,
address to,
uint256 value,
uint256 fee,
address feeRecipient,
uint256 deadline,
uint256 sigId,
bytes calldata sig,
sigStandard sigStd
) external... | /**
* Same as `transferViaSignature`, but for `transferFrom`.
* Use case: the user wants to withdraw tokens from a smart contract or another user who allowed the user to
* do so. Important note: the fee is subtracted from the `value`, and `to` address receives `value - fee`.
* @param signer - the address allowe... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
16603,
17491
]
} | 8,448 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | approveAndCall | function approveAndCall (address spender, uint256 value, bytes memory extraData) public returns (bool) {
approve(spender, value);
tokenRecipient(spender).receiveApproval(msg.sender, value, address(this), extraData);
return true;
}
| /**
* Utility function, which acts the same as approve(...), but also calls `receiveApproval` function on a
* `spender` address, which is usually the address of the smart contract. In the same call, smart contract can
* withdraw tokens from the sender's account and receive additional `extraData` for processing.
... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
18057,
18324
]
} | 8,449 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | approveAndCallViaSignature | function approveAndCallViaSignature (
address fromAddress,
address spender,
uint256 value,
bytes calldata extraData,
uint256 fee,
address feeRecipient,
uint256 deadline,
uint256 sigId,
bytes calldata sig,
sigStandard s... | /**
* Same as `approveViaSignature`, but for `approveAndCall`.
* Use case: the user wants to send tokens to the smart contract and pass additional data within one transaction.
* @param fromAddress - the account to approve withdrawal from, which signed all below parameters
* @param spender - the account allowed ... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
19423,
20444
]
} | 8,450 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | mintTokens | function mintTokens (uint newSupply) onlyOwner external {
totalSupply = totalSupply.add(newSupply);
balanceOf[msg.sender] = balanceOf[msg.sender].add(newSupply);
emit Transfer(address(0x0), msg.sender, newSupply);
}
| /**
* Mint some tokens to the sender's address.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
20515,
20767
]
} | 8,451 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | rescueLostTokens | function rescueLostTokens (ERC20CompatibleToken tokenContract, uint256 value) external rescueAccountOnly {
tokenContract.transfer(rescueAccount, value);
}
| /**
* ERC20 tokens are not designed to hold any other tokens (or Ether) on their balances. There were thousands
* of cases when people accidentally transfer tokens to a contract address while there is no way to get them
* back. This function adds a possibility to "rescue" tokens that were accidentally sent to thi... | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
21228,
21401
]
} | 8,452 | ||
OROCoin | OROCoin.sol | 0xbf7fd29146d50b014879518fbcd567243ab8b92b | Solidity | OROCoin | contract OROCoin is Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
ma... | changeRescueAccount | function changeRescueAccount (address newRescueAccount) external rescueAccountOnly {
rescueAccount = newRescueAccount;
}
| /**
* Utility function that allows to change the rescueAccount address, which can "rescue" tokens accidentally sent to
* this smart contract address.
* @param newRescueAccount - account which will become authorized to rescue tokens
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | MIT | ipfs://1c92a1cb9cad01da0fc8472ee8f3e46eb4a79231c12969194d28b064750262d8 | {
"func_code_index": [
21764,
21903
]
} | 8,453 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
682,
778
]
} | 8,454 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | balanceOf | function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
992,
1103
]
} | 8,455 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
1437,
1573
]
} | 8,456 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | transfer | function transfer(address to, uint256 value) public returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
| /**
* @dev Transfer token to a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
1742,
1887
]
} | 8,457 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
2529,
2682
]
} | 8,458 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | transferFrom | function transferFrom(address from, address to, uint256 value) public returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
| /**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
3150,
3383
]
} | 8,459 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
3904,
4112
]
} | 8,460 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
4638,
4856
]
} | 8,461 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | _transfer | function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
| /**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
5078,
5345
]
} | 8,462 | ||
Token | contracts/Token.sol | 0xef811e8ea1c406cd1df7c953e45acfc4deb72e3d | Solidity | Token | contract Token is IERC20 {
using SafeMath for uint256;
string public constant name = "GICCOIN";
string public constant symbol = "GICC";
uint256 public constant decimals = 18;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allo... | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(spender != address(0));
require(owner != address(0));
_allowed[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://fe85284af70a7db7a4e4c6638e7cf6e3157abdc6f5c0beef93872488ebe0c783 | {
"func_code_index": [
5613,
5872
]
} | 8,463 | ||
PSIToken | PSIToken.sol | 0x7a9fe66f0f288e2598788f21e5ed4aa332eef122 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
e... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://a4e96efb982900a61947623ecbc780dc5fb29defd195e343933d25cdb3c2c158 | {
"func_code_index": [
268,
664
]
} | 8,464 | |||
PSIToken | PSIToken.sol | 0x7a9fe66f0f288e2598788f21e5ed4aa332eef122 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://a4e96efb982900a61947623ecbc780dc5fb29defd195e343933d25cdb3c2c158 | {
"func_code_index": [
870,
986
]
} | 8,465 | |||
PSIToken | PSIToken.sol | 0x7a9fe66f0f288e2598788f21e5ed4aa332eef122 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://a4e96efb982900a61947623ecbc780dc5fb29defd195e343933d25cdb3c2c158 | {
"func_code_index": [
401,
858
]
} | 8,466 | |||
PSIToken | PSIToken.sol | 0x7a9fe66f0f288e2598788f21e5ed4aa332eef122 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://a4e96efb982900a61947623ecbc780dc5fb29defd195e343933d25cdb3c2c158 | {
"func_code_index": [
1490,
1685
]
} | 8,467 | |||
PSIToken | PSIToken.sol | 0x7a9fe66f0f288e2598788f21e5ed4aa332eef122 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://a4e96efb982900a61947623ecbc780dc5fb29defd195e343933d25cdb3c2c158 | {
"func_code_index": [
2009,
2154
]
} | 8,468 | |||
PSIToken | PSIToken.sol | 0x7a9fe66f0f288e2598788f21e5ed4aa332eef122 | Solidity | PSIToken | contract PSIToken is StandardToken {
string public constant name = "PSI Token";
string public constant symbol = "PSI";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals));
/**
* @dev Constructor that gives msg.sender all of exis... | PSIToken | function PSIToken() public {
totalSupply = INITIAL_SUPPLY;
//Round A Investors 15%
balances[0xa801fcD3CDf65206F567645A3E8c4537739334A2] = 150000000 * (10 ** uint256(decimals));
emit Transfer(msg.sender, 0xa801fcD3CDf65206F567645A3E8c4537739334A2, 150000000 * (10 ** uint256(decimals)));
//Presal... | /**
* @dev Constructor that gives msg.sender all of existing tokens.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://a4e96efb982900a61947623ecbc780dc5fb29defd195e343933d25cdb3c2c158 | {
"func_code_index": [
341,
2109
]
} | 8,469 | |||
LinguaFranca | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
605,
834
]
} | 8,470 |
LinguaFranca | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
| /**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
913,
1174
]
} | 8,471 |
LinguaFranca | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
1245,
1363
]
} | 8,472 |
LinguaFranca | @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | /**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
| /**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
1435,
1673
]
} | 8,473 |
PENCECOIN | PENCECOIN.sol | 0x6c4fee44acccb6e44af41862f509c74892f1445f | Solidity | PENCECOIN | contract PENCECOIN {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != address(0x0));
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balan... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://ee3158c552befdd2c08c79d872bb19979b45b87745e5e58f4c574c6c00606156 | {
"func_code_index": [
1649,
2506
]
} | 8,474 | ||
PENCECOIN | PENCECOIN.sol | 0x6c4fee44acccb6e44af41862f509c74892f1445f | Solidity | PENCECOIN | contract PENCECOIN {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://ee3158c552befdd2c08c79d872bb19979b45b87745e5e58f4c574c6c00606156 | {
"func_code_index": [
2712,
2869
]
} | 8,475 | ||
PENCECOIN | PENCECOIN.sol | 0x6c4fee44acccb6e44af41862f509c74892f1445f | Solidity | PENCECOIN | contract PENCECOIN {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://ee3158c552befdd2c08c79d872bb19979b45b87745e5e58f4c574c6c00606156 | {
"func_code_index": [
3144,
3445
]
} | 8,476 | ||
PENCECOIN | PENCECOIN.sol | 0x6c4fee44acccb6e44af41862f509c74892f1445f | Solidity | PENCECOIN | contract PENCECOIN {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://ee3158c552befdd2c08c79d872bb19979b45b87745e5e58f4c574c6c00606156 | {
"func_code_index": [
3709,
3939
]
} | 8,477 | ||
PENCECOIN | PENCECOIN.sol | 0x6c4fee44acccb6e44af41862f509c74892f1445f | Solidity | PENCECOIN | contract PENCECOIN {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, address(this), _extraData);
return true... | /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://ee3158c552befdd2c08c79d872bb19979b45b87745e5e58f4c574c6c00606156 | {
"func_code_index": [
4333,
4701
]
} | 8,478 | ||
PENCECOIN | PENCECOIN.sol | 0x6c4fee44acccb6e44af41862f509c74892f1445f | Solidity | PENCECOIN | contract PENCECOIN {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender,... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://ee3158c552befdd2c08c79d872bb19979b45b87745e5e58f4c574c6c00606156 | {
"func_code_index": [
4871,
5250
]
} | 8,479 | ||
PENCECOIN | PENCECOIN.sol | 0x6c4fee44acccb6e44af41862f509c74892f1445f | Solidity | PENCECOIN | contract PENCECOIN {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addres... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://ee3158c552befdd2c08c79d872bb19979b45b87745e5e58f4c574c6c00606156 | {
"func_code_index": [
5508,
6124
]
} | 8,480 | ||
OpethZap | contracts/OpethZap.sol | 0x859adef853012c8b00804b55a5bc2b7732b4b5a6 | Solidity | OpethZap | contract OpethZap {
using SafeMath for uint;
using SafeERC20 for IERC20;
IERC20 public immutable weth;
IERC20 public immutable usdc;
Uni public immutable uni;
IOpeth public immutable opeth;
address payable public immutable exchange;
address[] public path;
constructor(
IERC... | _mint | function _mint(
address oToken,
uint _opeth,
uint _oTokenPayment,
uint _maxPayment,
uint _0xFee,
bytes calldata _0xSwapData
) internal {
// Swap ETH for USDC (for purchasing oToken)
Uni(uni).swapETHForExactTokens{value: _maxPayment}(
_oTokenPayment,
path,
address(... | /**
* @param oToken opyn put option
* @param _oTokenPayment USDC required for purchasing oTokens
* @param _maxPayment in ETH for purchasing USDC; caps slippage
* @param _0xFee 0x protocol fee. Any extra is refunded
* @param _0xSwapData 0x swap encoded data
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2174,
2876
]
} | 8,481 | ||||
OpethZap | contracts/OpethZap.sol | 0x859adef853012c8b00804b55a5bc2b7732b4b5a6 | Solidity | OpethZap | contract OpethZap {
using SafeMath for uint;
using SafeERC20 for IERC20;
IERC20 public immutable weth;
IERC20 public immutable usdc;
Uni public immutable uni;
IOpeth public immutable opeth;
address payable public immutable exchange;
address[] public path;
constructor(
IERC... | // Cannot receive ETH with calldata that doesnt match any function | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
3341,
3418
]
} | 8,482 | ||||||
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC165 | interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This f... | /**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
374,
455
]
} | 8,483 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
719,
798
]
} | 8,484 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
944,
1021
]
} | 8,485 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1733,
1850
]
} | 8,486 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If th... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
2376,
2489
]
} | 8,487 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) external;
| /**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
2962,
3022
]
} | 8,488 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) external view returns (address operator);
| /**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3176,
3260
]
} | 8,489 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool _approved) external;
| /**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3587,
3662
]
} | 8,490 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) external view returns (bool);
| /**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
3813,
3906
]
} | 8,491 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {appro... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
4483,
4630
]
} | 8,492 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
184,
912
]
} | 8,493 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1017,
1362
]
} | 8,494 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1485,
1941
]
} | 8,495 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
399,
491
]
} | 8,496 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1050,
1149
]
} | 8,497 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
1299,
1496
]
} | 8,498 |
Ethernauts | Ethernauts.sol | 0x29f2068dcf08164875951d21afb561dd406b66d0 | Solidity | IERC721Receiver | interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other valu... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://e6e199a6501c1abd2f665aafb15edbfc6e4cfebb0396d5b40518ccd27f4ae406 | {
"func_code_index": [
528,
698
]
} | 8,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.