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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GoodGamePlatform | ERC223.sol | 0x3ac655b147b6e2d2ced40126f6c5956e5467a92b | Solidity | ERC223Token | contract ERC223Token is ERC223 {
using SafeMath for uint;
mapping(address => uint) balances;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
// Function to access name of token .
function name() constant returns (string _name) {
return name;
}
/... | transfer | function transfer(address _to, uint _value, bytes _data) returns (bool success) {
if(isContract(_to)) {
return transferToContract(_to, _value, _data);
}
else {
return transferToAddress(_to, _value, _data);
}
| // Function that is called when a user or another contract wants to transfer funds . | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://ab9f0fe42d9e16b9e57ac46a758e7fa8f126024174b2d499ea997543c325ce05 | {
"func_code_index": [
804,
1047
]
} | 9,100 | |||
GoodGamePlatform | ERC223.sol | 0x3ac655b147b6e2d2ced40126f6c5956e5467a92b | Solidity | ERC223Token | contract ERC223Token is ERC223 {
using SafeMath for uint;
mapping(address => uint) balances;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
// Function to access name of token .
function name() constant returns (string _name) {
return name;
}
/... | transfer | function transfer(address _to, uint _value) returns (bool success) {
//standard function transfer similar to ERC20 transfer with no _data
//added due to backwards compatibility reasons
bytes memory empty;
if(isContract(_to)) {
return transferToContract(_to, _value, empty);
}
else {
return trans... | // Standard function transfer similar to ERC20 transfer with no _data .
// Added due to backwards compatibility reasons . | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://ab9f0fe42d9e16b9e57ac46a758e7fa8f126024174b2d499ea997543c325ce05 | {
"func_code_index": [
1175,
1554
]
} | 9,101 | |||
GoodGamePlatform | ERC223.sol | 0x3ac655b147b6e2d2ced40126f6c5956e5467a92b | Solidity | ERC223Token | contract ERC223Token is ERC223 {
using SafeMath for uint;
mapping(address => uint) balances;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
// Function to access name of token .
function name() constant returns (string _name) {
return name;
}
/... | isContract | function isContract(address _addr) private returns (bool is_contract) {
uint length;
assembly {
//retrieve the size of the code on target address, this needs assembly
length := extcodesize(_addr)
}
if(length>0) {
return true;
}
else {
return false;... | //assemble the given address bytecode. If bytecode exists then the _addr is a contract. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://ab9f0fe42d9e16b9e57ac46a758e7fa8f126024174b2d499ea997543c325ce05 | {
"func_code_index": [
1644,
2002
]
} | 9,102 | |||
GoodGamePlatform | ERC223.sol | 0x3ac655b147b6e2d2ced40126f6c5956e5467a92b | Solidity | ERC223Token | contract ERC223Token is ERC223 {
using SafeMath for uint;
mapping(address => uint) balances;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
// Function to access name of token .
function name() constant returns (string _name) {
return name;
}
/... | transferToAddress | function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
if (balanceOf(msg.sender) < _value) revert();
balances[msg.sender] = balanceOf(msg.sender).sub(_value);
balances[_to] = balanceOf(_to).add(_value);
Transfer(msg.sender, _to, _value);
ERC223Transfer(msg.sender, _... | //function that is called when transaction target is an address | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://ab9f0fe42d9e16b9e57ac46a758e7fa8f126024174b2d499ea997543c325ce05 | {
"func_code_index": [
2070,
2442
]
} | 9,103 | |||
GoodGamePlatform | ERC223.sol | 0x3ac655b147b6e2d2ced40126f6c5956e5467a92b | Solidity | ERC223Token | contract ERC223Token is ERC223 {
using SafeMath for uint;
mapping(address => uint) balances;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
// Function to access name of token .
function name() constant returns (string _name) {
return name;
}
/... | transferToContract | function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
if (balanceOf(msg.sender) < _value) revert();
balances[msg.sender] = balanceOf(msg.sender).sub(_value);
balances[_to] = balanceOf(_to).add(_value);
ContractReceiver reciever = ContractReceiver(_to);
reciever.to... | //function that is called when transaction target is a contract | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://ab9f0fe42d9e16b9e57ac46a758e7fa8f126024174b2d499ea997543c325ce05 | {
"func_code_index": [
2510,
2993
]
} | 9,104 | |||
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | IERC1363 | interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFrom... | /**
* @title IERC1363 Interface
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Interface for a Payable Token contract as defined in
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1363.md
*/ | NatSpecMultiLine | transferAndCall | function transferAndCall(address to, uint256 value) external returns (bool);
| /**
* @notice Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
* @param to address The address which you want to transfer to
* @param value uint256 The amount of tokens to be transferred
* @return true unless throwing
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1014,
1095
]
} | 9,105 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | IERC1363 | interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFrom... | /**
* @title IERC1363 Interface
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Interface for a Payable Token contract as defined in
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1363.md
*/ | NatSpecMultiLine | transferAndCallData | function transferAndCallData(address to, uint256 value, bytes calldata data) external returns (bool);
| /**
* @notice Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
* @param to address The address which you want to transfer to
* @param value uint256 The amount of tokens to be transferred
* @param data bytes Additional data with no specified format, sent in call... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1494,
1600
]
} | 9,106 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | IERC1363 | interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFrom... | /**
* @title IERC1363 Interface
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Interface for a Payable Token contract as defined in
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1363.md
*/ | NatSpecMultiLine | transferFromAndCallData | function transferFromAndCallData(address from, address to, uint256 value, bytes calldata data) external returns (bool);
| /**
* @notice Transfer tokens from one address to another and then call `onTransferReceived` on receiver
* @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
* @param dat... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2065,
2189
]
} | 9,107 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | IERC1363 | interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFrom... | /**
* @title IERC1363 Interface
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Interface for a Payable Token contract as defined in
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1363.md
*/ | NatSpecMultiLine | approveAndCall | function approveAndCall(address spender, uint256 value) external returns (bool);
| /**
* @notice Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
* and then call `onApprovalReceived` on spender.
* 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 orde... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2902,
2987
]
} | 9,108 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | IERC1363 | interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFrom... | /**
* @title IERC1363 Interface
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Interface for a Payable Token contract as defined in
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1363.md
*/ | NatSpecMultiLine | approveAndCallData | function approveAndCallData(address spender, uint256 value, bytes calldata data) external returns (bool);
| /**
* @notice Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
* and then call `onApprovalReceived` on spender.
* 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 orde... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3794,
3904
]
} | 9,109 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | IERC1363Receiver | interface IERC1363Receiver {
/*
* Note: the ERC-165 identifier for this interface is 0x88a7ca5c.
* 0x88a7ca5c === bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))
*/
/**
* @notice Handle the receipt of ERC1363 tokens
* @dev Any ERC1363 smart contract calls... | /**
* @title IERC1363Receiver Interface
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Interface for any contract that wants to support transferAndCall or transferFromAndCall
* from ERC1363 token contracts as defined in
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1363.md
... | NatSpecMultiLine | onTransferReceived | function onTransferReceived(address operator, address from, uint256 value, bytes calldata data) external returns (bytes4); // solhint-disable-line max-line-length
| /**
* @notice Handle the receipt of ERC1363 tokens
* @dev Any ERC1363 smart contract calls this function on the recipient
* after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the
* transfer. Return of other than the magic value MUST result in the
* transaction being reverted.... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1065,
1233
]
} | 9,110 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | IERC1363Spender | interface IERC1363Spender {
/*
* Note: the ERC-165 identifier for this interface is 0x7b04a2d0.
* 0x7b04a2d0 === bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))
*/
/**
* @notice Handle the approval of ERC1363 tokens
* @dev Any ERC1363 smart contract calls this fu... | /**
* @title IERC1363Spender Interface
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Interface for any contract that wants to support approveAndCall
* from ERC1363 token contracts as defined in
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1363.md
*/ | NatSpecMultiLine | onApprovalReceived | function onApprovalReceived(address owner, uint256 value, bytes calldata data) external returns (bytes4);
| /**
* @notice Handle the approval of ERC1363 tokens
* @dev Any ERC1363 smart contract calls this function on the recipient
* after an `approve`. This function MAY throw to revert and reject the
* approval. Return of other than the magic value MUST result in the
* transaction being reverted.
* Note: the toke... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
927,
1037
]
} | 9,111 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC165Checker | library ERC165Checker {
// As per the EIP-165 spec, no interface should ever match 0xffffffff
bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
... | /**
* @dev Library used to query support of an interface declared via {IERC165}.
*
* Note that these functions return the actual result of the query: they do not
* `revert` if an interface is not supported. It is up to the caller to decide
* what to do in these cases.
*/ | NatSpecMultiLine | supportsERC165 | function supportsERC165(address account) internal view returns (bool) {
// Any contract that implements ERC165 must explicitly indicate support of
// InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
return _supportsERC165Interface(account, _INTERFACE_ID_ERC165) &&
!_... | /**
* @dev Returns true if `account` supports the {IERC165} interface,
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
410,
814
]
} | 9,112 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC165Checker | library ERC165Checker {
// As per the EIP-165 spec, no interface should ever match 0xffffffff
bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
... | /**
* @dev Library used to query support of an interface declared via {IERC165}.
*
* Note that these functions return the actual result of the query: they do not
* `revert` if an interface is not supported. It is up to the caller to decide
* what to do in these cases.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
// query support of both ERC165 as per the spec and support of _interfaceId
return supportsERC165(account) &&
_supportsERC165Interface(account, interfaceId);
}
| /**
* @dev Returns true if `account` supports the interface defined by
* `interfaceId`. Support for {IERC165} itself is queried automatically.
*
* See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1035,
1330
]
} | 9,113 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC165Checker | library ERC165Checker {
// As per the EIP-165 spec, no interface should ever match 0xffffffff
bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
... | /**
* @dev Library used to query support of an interface declared via {IERC165}.
*
* Note that these functions return the actual result of the query: they do not
* `revert` if an interface is not supported. It is up to the caller to decide
* what to do in these cases.
*/ | NatSpecMultiLine | supportsAllInterfaces | function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
// query support of ERC165 itself
if (!supportsERC165(account)) {
return false;
}
// query support of each interface in _interfaceIds
for (uint256 i = 0; i < interfaceIds.leng... | /**
* @dev Returns true if `account` supports all the interfaces defined in
* `interfaceIds`. Support for {IERC165} itself is queried automatically.
*
* Batch-querying can lead to gas savings by skipping repeated checks for
* {IERC165} support.
*
* See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1671,
2227
]
} | 9,114 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC165Checker | library ERC165Checker {
// As per the EIP-165 spec, no interface should ever match 0xffffffff
bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
... | /**
* @dev Library used to query support of an interface declared via {IERC165}.
*
* Note that these functions return the actual result of the query: they do not
* `revert` if an interface is not supported. It is up to the caller to decide
* what to do in these cases.
*/ | NatSpecMultiLine | _supportsERC165Interface | function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
// success determines whether the staticcall succeeded and result determines
// whether the contract at account indicates support of _interfaceId
(bool success, bool result) = _callERC165SupportsInterface... | /**
* @notice Query if a contract implements an interface, does not check ERC165 support
* @param account The address of the contract to query for support of an interface
* @param interfaceId The interface identifier, as specified in ERC-165
* @return true if the contract at account indicates support of the int... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2898,
3304
]
} | 9,115 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC165Checker | library ERC165Checker {
// As per the EIP-165 spec, no interface should ever match 0xffffffff
bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
... | /**
* @dev Library used to query support of an interface declared via {IERC165}.
*
* Note that these functions return the actual result of the query: they do not
* `revert` if an interface is not supported. It is up to the caller to decide
* what to do in these cases.
*/ | NatSpecMultiLine | _callERC165SupportsInterface | function _callERC165SupportsInterface(address account, bytes4 interfaceId)
private
view
returns (bool, bool)
{
bytes memory encodedParams = abi.encodeWithSelector(_INTERFACE_ID_ERC165, interfaceId);
(bool success, bytes memory result) = account.staticcall{ gas: 30000 }(encodedParams);
if ... | /**
* @notice Calls the function with selector 0x01ffc9a7 (ERC165) and suppresses throw
* @param account The address of the contract to query for support of an interface
* @param interfaceId The interface identifier, as specified in ERC-165
* @return success true if the STATICCALL succeeded, false otherwise
*... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3826,
4284
]
} | 9,116 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC165 | contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedIn... | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view override returns (bool) {
return _supportedInterfaces[interfaceId];
}
| /**
* @dev See {IERC165-supportsInterface}.
*
* Time complexity O(1), guaranteed to always use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
711,
858
]
} | 9,117 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC165 | contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedIn... | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/ | NatSpecMultiLine | _registerInterface | function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
| /**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 inval... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1260,
1466
]
} | 9,118 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC1363 | contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
... | /**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/ | NatSpecMultiLine | transferAndCall | function transferAndCall(address to, uint256 value) public override returns (bool) {
return transferAndCallData(to, value, "");
}
| /**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param to The address to transfer to.
* @param value The amount to be transferred.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2085,
2233
]
} | 9,119 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC1363 | contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
... | /**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/ | NatSpecMultiLine | transferAndCallData | function transferAndCallData(address to, uint256 value, bytes memory data) public override returns (bool) {
transfer(to, value);
require(_checkAndCallTransfer(_msgSender(), to, value, data), "ERC1363: _checkAndCallTransfer reverts");
return true;
}
| /**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param to The address to transfer to
* @param value The amount to be transferred
* @param data Additional data with no specified format
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2578,
2863
]
} | 9,120 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC1363 | contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
... | /**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/ | NatSpecMultiLine | transferFromAndCallData | function transferFromAndCallData(address from, address to, uint256 value, bytes memory data) public override returns (bool) {
transferFrom(from, to, value);
require(_checkAndCallTransfer(from, to, value, data), "ERC1363: _checkAndCallTransfer reverts");
return true;
}
| /**
* @dev Transfer tokens from one address to another and then execute a callback on recipient.
* @param from The address which you want to send tokens from
* @param to The address which you want to transfer to
* @param value The amount of tokens to be transferred
* @param data Additional data with no specif... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3309,
3614
]
} | 9,121 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC1363 | contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
... | /**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/ | NatSpecMultiLine | approveAndCall | function approveAndCall(address spender, uint256 value) public override returns (bool) {
return approveAndCallData(spender, value, "");
}
| /**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to
* @param value The amount allowed to be transferred
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3915,
4071
]
} | 9,122 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC1363 | contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
... | /**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/ | NatSpecMultiLine | approveAndCallData | function approveAndCallData(address spender, uint256 value, bytes memory data) public override returns (bool) {
approve(spender, value);
require(_checkAndCallApprove(spender, value, data), "ERC1363: _checkAndCallApprove reverts");
return true;
}
| /**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to.
* @param value The amount allowed to be transferred.
* @param data Additional data with no specified format.
* @return A boolean that indicates if the operation was succ... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
4436,
4718
]
} | 9,123 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC1363 | contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
... | /**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/ | NatSpecMultiLine | _checkAndCallTransfer | function _checkAndCallTransfer(address from, address to, uint256 value, bytes memory data) internal returns (bool) {
if (!to.isContract()) {
return false;
}
bytes4 retval = IERC1363Receiver(to).onTransferReceived(
_msgSender(), from, value, data
);
return (retval == _ERC1363_R... | /**
* @dev Internal function to invoke `onTransferReceived` on a target address
* The call is not executed if the target address is not a contract
* @param from address Representing the previous owner of the given token value
* @param to address Target address that will receive the tokens
* @param value uint... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
5269,
5638
]
} | 9,124 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | ERC1363 | contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
... | /**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/ | NatSpecMultiLine | _checkAndCallApprove | function _checkAndCallApprove(address spender, uint256 value, bytes memory data) internal returns (bool) {
if (!spender.isContract()) {
return false;
}
bytes4 retval = IERC1363Spender(spender).onApprovalReceived(
_msgSender(), value, data
);
return (retval == _ERC1363_APPROVED... | /**
* @dev Internal function to invoke `onApprovalReceived` on a target address
* The call is not executed if the target address is not a contract
* @param spender address The address which will spend the funds
* @param value uint256 The amount of tokens to be spent
* @param data bytes Optional data to send ... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
6092,
6454
]
} | 9,125 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @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() internal view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
497,
583
]
} | 9,126 |
Sav3rToken | erc-payable-token/contracts/token/ERC1363/IERC1363.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | TokenRecover | contract TokenRecover is Ownable {
/**
* @dev Remember that only owner can call so be careful when use on contracts generated from other contracts.
* @param tokenAddress The token contract address
* @param tokenAmount Number of tokens to be sent
*/
function recoverERC20(address token... | /**
* @title TokenRecover
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Allow to recover any ERC20 sent into the contract for error
*/ | NatSpecMultiLine | recoverERC20 | function recoverERC20(address tokenAddress, uint256 tokenAmount) internal onlyOwner {
IERC20(tokenAddress).transfer(owner(), tokenAmount);
}
| /**
* @dev Remember that only owner can call so be careful when use on contracts generated from other contracts.
* @param tokenAddress The token contract address
* @param tokenAmount Number of tokens to be sent
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
281,
440
]
} | 9,127 |
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | 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.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
399,
491
]
} | 9,128 |
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | 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.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
1050,
1149
]
} | 9,129 |
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | 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.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
1299,
1496
]
} | 9,130 |
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | tryRecover | function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signature.length == 6... | /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lo... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
1913,
3226
]
} | 9,131 | ||
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | recover | function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
| /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half ord... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
4023,
4259
]
} | 9,132 | ||
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | tryRecover | function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
v := add(shr(255, vs), 27)
}
return tryRec... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
4517,
4913
]
} | 9,133 | ||
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | tryRecover | function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ether... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
5090,
6724
]
} | 9,134 | ||
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | Solidity | MetaScyra | contract MetaScyra is Ownable, ERC721EnumerableB {
using ECDSA for bytes32;
using Strings for uint256;
struct Stake {
uint256 tokenId;
uint256 timestamp;
}
uint256 public constant SCYRA_MAX = 6667;
uint256 public constant SCYRA_GENESIS_MAX = 667;
uint256 publ... | stake | function stake(uint256 _tokenId) public {
_transfer(msg.sender, address(this), _tokenId);
stakingTime[_tokenId] = 0;
stakes[_tokenId] = Stake(_tokenId, block.timestamp);
_setStaking(msg.sender, _tokenId);
}
| /* ---- Functions ---- */ | Comment | v0.8.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
3043,
3295
]
} | 9,135 | ||
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | Solidity | MetaScyra | contract MetaScyra is Ownable, ERC721EnumerableB {
using ECDSA for bytes32;
using Strings for uint256;
struct Stake {
uint256 tokenId;
uint256 timestamp;
}
uint256 public constant SCYRA_MAX = 6667;
uint256 public constant SCYRA_GENESIS_MAX = 667;
uint256 publ... | togglePresaleStatus | function togglePresaleStatus() external onlyOwner {
presaleLive = !presaleLive;
}
| /* ---- Setters ---- */ | Comment | v0.8.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
8358,
8459
]
} | 9,136 | ||
MetaScyra | @openzeppelin/contracts/access/Ownable.sol | 0xd7c57fc28f72cc8ffbd635155d924f0ac3f03f8e | Solidity | MetaScyra | contract MetaScyra is Ownable, ERC721EnumerableB {
using ECDSA for bytes32;
using Strings for uint256;
struct Stake {
uint256 tokenId;
uint256 timestamp;
}
uint256 public constant SCYRA_MAX = 6667;
uint256 public constant SCYRA_GENESIS_MAX = 667;
uint256 publ... | _setStaking | function _setStaking(address _owner, uint256 _tokenId) internal {
isStaking[_tokenId] = _owner;
}
| /* ---- Misc ---- */ | Comment | v0.8.9+commit.e5eed63a | MIT | ipfs://672fc76424cd92c353e6de815b9bcc53701f37d5371e3774b462983f8ad2f3fe | {
"func_code_index": [
9166,
9282
]
} | 9,137 | ||
Pettametti | contracts/Pettametti.sol | 0x52474fbf6b678a280d0c69f2314d6d95548b3daf | Solidity | Pettametti | contract Pettametti is ERC721Enumerable, Ownable, RandomlyAssigned {
using Strings for uint256;
string public baseExtension = ".json";
uint256 public cost = 0.00 ether;
uint256 public maxMettiSupply = 300;
uint256 public maxPettaSupply = 300;
uint256 public maxMintAmount = 20;
bool public pause... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://d1459db360142237f84a253eb41c3e2b66cbbf0f729f116ab5c992a969585d77 | {
"func_code_index": [
822,
927
]
} | 9,138 | ||
Pettametti | contracts/Pettametti.sol | 0x52474fbf6b678a280d0c69f2314d6d95548b3daf | Solidity | Pettametti | contract Pettametti is ERC721Enumerable, Ownable, RandomlyAssigned {
using Strings for uint256;
string public baseExtension = ".json";
uint256 public cost = 0.00 ether;
uint256 public maxMettiSupply = 300;
uint256 public maxPettaSupply = 300;
uint256 public maxMintAmount = 20;
bool public pause... | withdraw | function withdraw() public payable onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}
| //only owner | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://d1459db360142237f84a253eb41c3e2b66cbbf0f729f116ab5c992a969585d77 | {
"func_code_index": [
2322,
2439
]
} | 9,139 | ||
BitMonsters | contracts/Integer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | Integer | library Integer {
/**
* @dev Gets the bit at the given position in the given integer.
* 31 is the leftmost bit, 0 is the rightmost bit.
*
* For example: bitAt(2, 0) == 0, because the rightmost bit of 10 is 0
* bitAt(2, 1) == 1, because the second to last bi... | bitAt | function bitAt(uint integer, uint pos) external pure returns (uint) {
require(pos <= 31, "pos > 31");
return (integer & (1 << pos)) >> pos;
}
| /**
* @dev Gets the bit at the given position in the given integer.
* 31 is the leftmost bit, 0 is the rightmost bit.
*
* For example: bitAt(2, 0) == 0, because the rightmost bit of 10 is 0
* bitAt(2, 1) == 1, because the second to last bit of 10 is 1
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
343,
514
]
} | 9,140 | ||
BitMonsters | contracts/Integer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | Integer | library Integer {
/**
* @dev Gets the bit at the given position in the given integer.
* 31 is the leftmost bit, 0 is the rightmost bit.
*
* For example: bitAt(2, 0) == 0, because the rightmost bit of 10 is 0
* bitAt(2, 1) == 1, because the second to last bi... | bitsFrom | function bitsFrom(uint integer, uint left, uint right) external pure returns (uint) {
require(left >= right, "left > right");
require(left <= 31, "left > 31");
uint delta = left - right + 1;
return (integer & (((1 << delta) - 1) << right)) >> right;
}
| /**
* @dev Gets the value of the bits between left and right, both inclusive, in the given integer.
* 31 is the leftmost bit, 0 is the rightmost bit.
*
* For example: bitsFrom(10, 3, 1) == 7 (101 in binary), because 10 is *101*0 in binary
* bitsFrom(10, 2, 0) == 2 (010 in bin... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
908,
1209
]
} | 9,141 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | memcpy32 | function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), mload(add(add(src, 32), srcIndex)))
}
}
| /**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
145,
373
]
} | 9,142 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | memcpy1 | function memcpy1(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore8(add(add(dst, 32), dstIndex), shr(248, mload(add(add(src, 32), srcIndex))))
}
}
| /**
* @dev Copies 1 bytes of `src` at `srcIndex` into `dst` at `dstIndex`.
* This uses the same amount of gas as `memcpy32`, so prefer `memcpy32` if at all possible.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
573,
811
]
} | 9,143 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | copyString | function copyString(string memory src, bytes memory dst, uint dstIndex, uint dstLen) internal pure returns (uint) {
uint srcIndex;
uint srcLen = bytes(src).length;
for (; srcLen > 31 && srcIndex < srcLen && srcIndex < dstLen - 31; srcIndex += 32) {
memcpy32(src, srcIndex, dst, dstIndex + srcIn... | /**
* @dev Copies a string into `dst` starting at `dstIndex` with a maximum length of `dstLen`.
* This function will not write beyond `dstLen`. However, if `dstLen` is not reached, it may write zeros beyond the length of the string.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
1078,
1623
]
} | 9,144 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | pushToStringBuffer | function pushToStringBuffer(StringBuffer memory self, string memory str) internal pure returns (StringBuffer memory) {
if (self.buffer.length == self.numberOfStrings) {
string[] memory newBuffer = new string[](self.buffer.length * 2);
for (uint i = 0; i < self.buffer.length; ++i) {
n... | /**
* @dev Adds `str` to the end of the internal buffer.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
1703,
2307
]
} | 9,145 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | concatToLastString | function concatToLastString(StringBuffer memory self, string memory str) internal pure {
if (self.numberOfStrings == 0) {
self.numberOfStrings++;
}
uint idx = self.numberOfStrings - 1;
self.buffer[idx] = string(abi.encodePacked(self.buffer[idx], str));
self.totalStringLength += bytes... | /**
* @dev Concatenates `str` to the end of the last string in the internal buffer.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
2414,
2783
]
} | 9,146 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | empty | function empty() external pure returns (StringBuffer memory) {
return StringBuffer(new string[](1), 0, 0);
}
| /**
* @notice Creates a new empty StringBuffer
* @dev The initial capacity is 16 strings
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
2901,
3028
]
} | 9,147 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | get | function get(StringBuffer memory self) internal pure returns (string memory) {
bytes memory output = new bytes(self.totalStringLength);
uint ptr = 0;
for (uint i = 0; i < self.numberOfStrings; ++i) {
ptr = copyString(self.buffer[i], output, ptr, self.totalStringLength);
}
return st... | /**
* @notice Converts the contents of the StringBuffer into a string.
* @dev This runs in O(n) time.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
3159,
3528
]
} | 9,148 | ||
BitMonsters | contracts/StringBuffer.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | StringBufferLibrary | library StringBufferLibrary {
/**
* @dev Copies 32 bytes of `src` starting at `srcIndex` into `dst` starting at `dstIndex`.
*/
function memcpy32(string memory src, uint srcIndex, bytes memory dst, uint dstIndex) internal pure {
assembly {
mstore(add(add(dst, 32), dstIndex), m... | append | function append(StringBuffer memory self, string memory str) internal pure {
uint idx = self.numberOfStrings == 0 ? 0 : self.numberOfStrings - 1;
if (bytes(self.buffer[idx]).length + bytes(str).length <= 1024) {
concatToLastString(self, str);
} else {
pushToStringBuffer(self, str);
... | /**
* @notice Appends a string to the end of the StringBuffer
* @dev Internally the StringBuffer keeps a `string[]` that doubles in size when extra capacity is needed.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
3725,
4083
]
} | 9,149 | ||
BitMonsters | contracts/BitMonstersAddon.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | BitMonstersAddon | abstract contract BitMonstersAddon is Ownable {
IBitMonsters internal bitMonsters;
modifier onlyAdmin() {
require(bitMonsters.isAdmin(msg.sender), "admins only");
_;
}
modifier ownsToken(uint tokenId) {
require(bitMonsters.ownerOf(tokenId) == msg.sender, "you don't own... | /**
* @title A contract should inherit this if it provides functionality for the Bit Monsters contract.
*/ | NatSpecMultiLine | setBitMonstersContract | function setBitMonstersContract(IBitMonsters _contract) external onlyOwner {
bitMonsters = _contract;
}
| /**
* @notice This must be called before the Brainz contract can be used.
*
* @dev Within the BitMonsters contract, call initializeBrainz().
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
529,
651
]
} | 9,150 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
908,
1327
]
} | 9,151 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element f... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1498,
3047
]
} | 9,152 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3128,
3262
]
} | 9,153 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3343,
3457
]
} | 9,154 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3796,
4005
]
} | 9,155 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
4254,
4402
]
} | 9,156 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
4573,
4727
]
} | 9,157 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
4808,
4971
]
} | 9,158 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
5052,
5174
]
} | 9,159 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
5513,
5667
]
} | 9,160 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
5912,
6048
]
} | 9,161 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
6219,
6361
]
} | 9,162 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
6442,
6593
]
} | 9,163 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
6674,
6793
]
} | 9,164 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
7132,
7274
]
} | 9,165 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | hasRole | function hasRole(bytes32 role, address account) public view returns (bool) {
return _roles[role].members.contains(account);
}
| /**
* @dev Returns `true` if `account` has been granted `role`.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1123,
1267
]
} | 9,166 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | getRoleMemberCount | function getRoleMemberCount(bytes32 role) public view returns (uint256) {
return _roles[role].members.length();
}
| /**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1436,
1568
]
} | 9,167 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | getRoleMember | function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
return _roles[role].members.at(index);
}
| /**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1858,
2001
]
} | 9,168 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | getRoleAdmin | function getRoleAdmin(bytes32 role) public view returns (bytes32) {
return _roles[role].adminRole;
}
| /**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2185,
2304
]
} | 9,169 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | grantRole | function grantRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");
_grantRole(role, account);
}
| /**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2561,
2793
]
} | 9,170 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | revokeRole | function revokeRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");
_revokeRole(role, account);
}
| /**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3033,
3268
]
} | 9,171 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | renounceRole | function renounceRole(bytes32 role, address account) public virtual {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
| /**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
3770,
3984
]
} | 9,172 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | _setupRole | function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
| /**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor w... | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
4562,
4679
]
} | 9,173 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | _setRoleAdmin | function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
_roles[role].adminRole = adminRole;
}
| /**
* @dev Sets `adminRole` as ``role``'s admin role.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
4756,
4887
]
} | 9,174 |
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | Sav3rToken | contract Sav3rToken is ERC20Capped, ERC20Burnable, ERC1363, Roles, TokenRecover {
// indicates if transfer is enabled
bool private _transferEnabled = true;
string public constant BUILT_ON = "https://vittominacori.github.io/erc20-generator";
/**
* @dev Emitted during transfer enabling
... | transfer | function transfer(address to, uint256 value) public virtual override(ERC20) canTransfer(_msgSender()) returns (bool) {
return super.transfer(to, value);
}
| /**
* @dev Transfer tokens to a specified address.
* @param to The address to transfer to
* @param value The amount to be transferred
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1473,
1646
]
} | 9,175 | ||
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | Sav3rToken | contract Sav3rToken is ERC20Capped, ERC20Burnable, ERC1363, Roles, TokenRecover {
// indicates if transfer is enabled
bool private _transferEnabled = true;
string public constant BUILT_ON = "https://vittominacori.github.io/erc20-generator";
/**
* @dev Emitted during transfer enabling
... | transferFrom | function transferFrom(address from, address to, uint256 value) public virtual override(ERC20) canTransfer(from) returns (bool) {
return super.transferFrom(from, to, value);
}
| /**
* @dev Transfer tokens from one address to another.
* @param from The address which you want to send tokens from
* @param to The address which you want to transfer to
* @param value the amount of tokens to be transferred
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
1986,
2179
]
} | 9,176 | ||
Sav3rToken | @openzeppelin/contracts/utils/EnumerableSet.sol | 0xdf8ab83a6e4b868d140808810b0875fd1cdc2417 | Solidity | Sav3rToken | contract Sav3rToken is ERC20Capped, ERC20Burnable, ERC1363, Roles, TokenRecover {
// indicates if transfer is enabled
bool private _transferEnabled = true;
string public constant BUILT_ON = "https://vittominacori.github.io/erc20-generator";
/**
* @dev Emitted during transfer enabling
... | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped) {
super._beforeTokenTransfer(from, to, amount);
}
| /**
* @dev See {ERC20-_beforeTokenTransfer}.
*/ | NatSpecMultiLine | v0.6.2+commit.bacdbe57 | MIT | ipfs://bd9f25ef5c0cf1d46d370fb69975c73f1d94d239b458419fafdef7a417fc2d71 | {
"func_code_index": [
2247,
2433
]
} | 9,177 | ||
BitMonsters | contracts/Brainz.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | Brainz | contract Brainz is ERC20Burnable, BitMonstersAddon {
using RngLibrary for Rng;
mapping (uint => uint) public tokenIdToTimestamp;
Rng private rng = RngLibrary.newRng();
constructor() ERC20("Brainz", "BRAINZ") {
}
function adminMint(address addr, uint256 count) external onlyAdmin {
... | /**
* @title The contract for the Brainz token and staking. At the moment, these can only be obtained by staking Bit Monsters.
*/ | NatSpecMultiLine | claimBrainz | function claimBrainz() external {
uint count = bitMonsters.balanceOf(msg.sender);
uint total = 0;
for (uint i = 0; i < count; ++i) {
uint tokenId = bitMonsters.tokenOfOwnerByIndex(msg.sender, i);
uint rewards = calculateRewards(tokenId);
if (rewards > 0) {
tokenI... | /**
* Claims all Brainz from all staked Bit Monsters the caller owns.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
578,
1132
]
} | 9,178 |
BitMonsters | contracts/Brainz.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | Brainz | contract Brainz is ERC20Burnable, BitMonstersAddon {
using RngLibrary for Rng;
mapping (uint => uint) public tokenIdToTimestamp;
Rng private rng = RngLibrary.newRng();
constructor() ERC20("Brainz", "BRAINZ") {
}
function adminMint(address addr, uint256 count) external onlyAdmin {
... | /**
* @title The contract for the Brainz token and staking. At the moment, these can only be obtained by staking Bit Monsters.
*/ | NatSpecMultiLine | calculateRewards | function calculateRewards(uint tokenId) public view returns (uint) {
BitMonster memory m = bitMonsters.getBitMonster(tokenId);
uint nDays = (block.timestamp - tokenIdToTimestamp[tokenId]) / 86400;
return rewardRate(m) * nDays;
}
| /**
* Returns the amount of pending Brainz the caller can currently claim.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
1426,
1693
]
} | 9,179 |
BitMonsters | contracts/Brainz.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | Brainz | contract Brainz is ERC20Burnable, BitMonstersAddon {
using RngLibrary for Rng;
mapping (uint => uint) public tokenIdToTimestamp;
Rng private rng = RngLibrary.newRng();
constructor() ERC20("Brainz", "BRAINZ") {
}
function adminMint(address addr, uint256 count) external onlyAdmin {
... | /**
* @title The contract for the Brainz token and staking. At the moment, these can only be obtained by staking Bit Monsters.
*/ | NatSpecMultiLine | register | function register(uint tokenId) external onlyAdmin {
require(tokenIdToTimestamp[tokenId] == 0, "already staked");
tokenIdToTimestamp[tokenId] = block.timestamp;
}
| /**
* Tracks the Bit Monster with the given tokenId for reward calculation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
1792,
1982
]
} | 9,180 |
BitMonsters | contracts/Brainz.sol | 0xbd091f143ee754f1d755494441aee781d918cb93 | Solidity | Brainz | contract Brainz is ERC20Burnable, BitMonstersAddon {
using RngLibrary for Rng;
mapping (uint => uint) public tokenIdToTimestamp;
Rng private rng = RngLibrary.newRng();
constructor() ERC20("Brainz", "BRAINZ") {
}
function adminMint(address addr, uint256 count) external onlyAdmin {
... | /**
* @title The contract for the Brainz token and staking. At the moment, these can only be obtained by staking Bit Monsters.
*/ | NatSpecMultiLine | stake | function stake(uint count) external returns (bool won) {
require(count > 0, "Must stake at least one BRAINZ");
require(balanceOf(msg.sender) >= count, "You don't have that many tokens");
Rng memory rn = rng;
if (rn.generate(0, 1) == 0) {
_mint(msg.sender, (count - count / 10) * 1 ether)... | /**
* Stake your Brainz a-la OSRS Duel Arena.
*
* 50% chance of multiplying your Brainz by 1.9x rounded up.
* 50% chance of losing everything you stake.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2641bc0a6897496103acbb493c7a9a096bcedd65afb1cb130ed46a31f4554f73 | {
"func_code_index": [
2176,
2688
]
} | 9,181 |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLu | library LibCLLu {
string constant public VERSION = "LibCLLu 0.4.0";
uint constant NULL = 0;
uint constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (uint => mapping (bool => uint)) cll;
}
// n: node id d: direction r... | // LibCLL using `uint` keys | LineComment | exists | function exists(CLL storage self, uint n)
internal
constant returns (bool)
{
if (self.cll[n][PREV] != HEAD || self.cll[n][NEXT] != HEAD)
return true;
if (n == HEAD)
return false;
if (self.cll[HEAD][NEXT] == n)
return true;
return false;
}
| // n: node id d: direction r: return node id
// Return existential state of a node. n == HEAD returns list existence. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
418,
764
]
} | 9,182 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLu | library LibCLLu {
string constant public VERSION = "LibCLLu 0.4.0";
uint constant NULL = 0;
uint constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (uint => mapping (bool => uint)) cll;
}
// n: node id d: direction r... | // LibCLL using `uint` keys | LineComment | sizeOf | function sizeOf(CLL storage self) internal constant returns (uint r) {
uint i = step(self, HEAD, NEXT);
while (i != HEAD) {
i = step(self, i, NEXT);
r++;
}
return;
}
| // Returns the number of elements in the list | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
822,
1059
]
} | 9,183 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLu | library LibCLLu {
string constant public VERSION = "LibCLLu 0.4.0";
uint constant NULL = 0;
uint constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (uint => mapping (bool => uint)) cll;
}
// n: node id d: direction r... | // LibCLL using `uint` keys | LineComment | getNode | function getNode(CLL storage self, uint n)
internal constant returns (uint[2])
{
return [self.cll[n][PREV], self.cll[n][NEXT]];
}
| // Returns the links of a node as and array | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1111,
1274
]
} | 9,184 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLu | library LibCLLu {
string constant public VERSION = "LibCLLu 0.4.0";
uint constant NULL = 0;
uint constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (uint => mapping (bool => uint)) cll;
}
// n: node id d: direction r... | // LibCLL using `uint` keys | LineComment | step | function step(CLL storage self, uint n, bool d)
internal constant returns (uint)
{
return self.cll[n][d];
}
| // Returns the link of a node `n` in direction `d`. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1334,
1475
]
} | 9,185 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLu | library LibCLLu {
string constant public VERSION = "LibCLLu 0.4.0";
uint constant NULL = 0;
uint constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (uint => mapping (bool => uint)) cll;
}
// n: node id d: direction r... | // LibCLL using `uint` keys | LineComment | seek | function seek(CLL storage self, uint a, uint b, bool d)
internal constant returns (uint r)
{
r = step(self, a, d);
while ((b!=r) && ((b < r) != d)) r = self.cll[r][d];
return;
}
| // Can be used before `insert` to build an ordered list
// `a` an existing node to search from, e.g. HEAD.
// `b` value to seek
// `r` first node beyond `b` in direction `d` | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1672,
1902
]
} | 9,186 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLu | library LibCLLu {
string constant public VERSION = "LibCLLu 0.4.0";
uint constant NULL = 0;
uint constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (uint => mapping (bool => uint)) cll;
}
// n: node id d: direction r... | // LibCLL using `uint` keys | LineComment | stitch | function stitch(CLL storage self, uint a, uint b, bool d) internal {
self.cll[b][!d] = a;
self.cll[a][d] = b;
}
| // Creates a bidirectional link between two nodes on direction `d` | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1977,
2117
]
} | 9,187 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLu | library LibCLLu {
string constant public VERSION = "LibCLLu 0.4.0";
uint constant NULL = 0;
uint constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (uint => mapping (bool => uint)) cll;
}
// n: node id d: direction r... | // LibCLL using `uint` keys | LineComment | insert | function insert (CLL storage self, uint a, uint b, bool d) internal {
uint c = self.cll[a][d];
stitch (self, a, b, d);
stitch (self, b, c, d);
}
| // Insert node `b` beside existing node `a` in direction `d`. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
2187,
2369
]
} | 9,188 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLi | library LibCLLi {
string constant public VERSION = "LibCLLi 0.4.0";
int constant NULL = 0;
int constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (int => mapping (bool => int)) cll;
}
// n: node id d: direction r: re... | // LibCLL using `int` keys | LineComment | exists | function exists(CLL storage self, int n) internal constant returns (bool) {
if (self.cll[n][PREV] != HEAD || self.cll[n][NEXT] != HEAD)
return true;
if (n == HEAD)
return false;
if (self.cll[HEAD][NEXT] == n)
return true;
return false;
}
| // n: node id d: direction r: return node id
// Return existential state of a node. n == HEAD returns list existence. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
414,
736
]
} | 9,189 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLi | library LibCLLi {
string constant public VERSION = "LibCLLi 0.4.0";
int constant NULL = 0;
int constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (int => mapping (bool => int)) cll;
}
// n: node id d: direction r: re... | // LibCLL using `int` keys | LineComment | sizeOf | function sizeOf(CLL storage self) internal constant returns (uint r) {
int i = step(self, HEAD, NEXT);
while (i != HEAD) {
i = step(self, i, NEXT);
r++;
}
return;
}
| // Returns the number of elements in the list | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
788,
1024
]
} | 9,190 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLi | library LibCLLi {
string constant public VERSION = "LibCLLi 0.4.0";
int constant NULL = 0;
int constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (int => mapping (bool => int)) cll;
}
// n: node id d: direction r: re... | // LibCLL using `int` keys | LineComment | getNode | function getNode(CLL storage self, int n)
internal constant returns (int[2])
{
return [self.cll[n][PREV], self.cll[n][NEXT]];
}
| // Returns the links of a node as and array | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1076,
1237
]
} | 9,191 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLi | library LibCLLi {
string constant public VERSION = "LibCLLi 0.4.0";
int constant NULL = 0;
int constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (int => mapping (bool => int)) cll;
}
// n: node id d: direction r: re... | // LibCLL using `int` keys | LineComment | step | function step(CLL storage self, int n, bool d)
internal constant returns (int)
{
return self.cll[n][d];
}
| // Returns the link of a node `n` in direction `d`. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1297,
1436
]
} | 9,192 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLi | library LibCLLi {
string constant public VERSION = "LibCLLi 0.4.0";
int constant NULL = 0;
int constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (int => mapping (bool => int)) cll;
}
// n: node id d: direction r: re... | // LibCLL using `int` keys | LineComment | seek | function seek(CLL storage self, int a, int b, bool d)
internal constant returns (int r)
{
r = step(self, a, d);
while ((b!=r) && ((b < r) != d)) r = self.cll[r][d];
return;
}
| // Can be used before `insert` to build an ordered list
// `a` an existing node to search from, e.g. HEAD.
// `b` value to seek
// `r` first node beyond `b` in direction `d` | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1633,
1860
]
} | 9,193 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLi | library LibCLLi {
string constant public VERSION = "LibCLLi 0.4.0";
int constant NULL = 0;
int constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (int => mapping (bool => int)) cll;
}
// n: node id d: direction r: re... | // LibCLL using `int` keys | LineComment | stitch | function stitch(CLL storage self, int a, int b, bool d) internal {
self.cll[b][!d] = a;
self.cll[a][d] = b;
}
| // Creates a bidirectional link between two nodes on direction `d` | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1935,
2073
]
} | 9,194 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLi | library LibCLLi {
string constant public VERSION = "LibCLLi 0.4.0";
int constant NULL = 0;
int constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (int => mapping (bool => int)) cll;
}
// n: node id d: direction r: re... | // LibCLL using `int` keys | LineComment | insert | function insert (CLL storage self, int a, int b, bool d) internal {
int c = self.cll[a][d];
stitch (self, a, b, d);
stitch (self, b, c, d);
}
| // Insert node `b` beside existing node `a` in direction `d`. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
2143,
2322
]
} | 9,195 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLa | library LibCLLa {
string constant public VERSION = "LibCLLa 0.4.0";
address constant NULL = 0;
address constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (address => mapping (bool => address)) cll;
}
// n: node id d: ... | // LibCLL using `address` keys | LineComment | exists | function exists(CLL storage self, address n) internal constant returns (bool) {
if (self.cll[n][PREV] != HEAD || self.cll[n][NEXT] != HEAD)
return true;
if (n == HEAD)
return false;
if (self.cll[HEAD][NEXT] == n)
return true;
return false;
}
| // n: node id d: direction r: return node id
// Return existential state of a node. n == HEAD returns list existence. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
430,
756
]
} | 9,196 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLa | library LibCLLa {
string constant public VERSION = "LibCLLa 0.4.0";
address constant NULL = 0;
address constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (address => mapping (bool => address)) cll;
}
// n: node id d: ... | // LibCLL using `address` keys | LineComment | sizeOf | function sizeOf(CLL storage self) internal constant returns (uint r) {
address i = step(self, HEAD, NEXT);
while (i != HEAD) {
i = step(self, i, NEXT);
r++;
}
return;
}
| // Returns the number of elements in the list | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
808,
1048
]
} | 9,197 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLa | library LibCLLa {
string constant public VERSION = "LibCLLa 0.4.0";
address constant NULL = 0;
address constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (address => mapping (bool => address)) cll;
}
// n: node id d: ... | // LibCLL using `address` keys | LineComment | getNode | function getNode(CLL storage self, address n)
internal constant returns (address[2])
{
return [self.cll[n][PREV], self.cll[n][NEXT]];
}
| // Returns the links of a node as and array | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1100,
1269
]
} | 9,198 | |
AquaToken | AquaToken.sol | 0x1d97bccc6296aac6f0be796c7e8cb270eca4c6c6 | Solidity | LibCLLa | library LibCLLa {
string constant public VERSION = "LibCLLa 0.4.0";
address constant NULL = 0;
address constant HEAD = 0;
bool constant PREV = false;
bool constant NEXT = true;
struct CLL{
mapping (address => mapping (bool => address)) cll;
}
// n: node id d: ... | // LibCLL using `address` keys | LineComment | step | function step(CLL storage self, address n, bool d)
internal constant returns (address)
{
return self.cll[n][d];
}
| // Returns the link of a node `n` in direction `d`. | LineComment | v0.4.20+commit.3155dd80 | bzzr://373bce966b5a3a64cb5cee60e45ef2089d4f385eea83351e825cfda31d420536 | {
"func_code_index": [
1329,
1476
]
} | 9,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.