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
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
calculatePurchaseReturn
function calculatePurchaseReturn(uint256 _supply, uint256 _reserveBalance, uint16 _reserveRatio, uint256 _depositAmount) public constant returns (uint256) { // validate input require(_supply != 0 && _reserveBalance != 0 && _reserveRatio > 0 && _reserveRatio <= 100); // special case for 0 deposit amount...
/** @dev given a token supply, reserve, CRR and a deposit amount (in the reserve token), calculates the return for a given change (in the main token) Formula: Return = _supply * ((1 + _depositAmount / _reserveBalance) ^ (_reserveRatio / 100) - 1) @param _supply token total supply @param _res...
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 1070, 2134 ] }
29,000
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
calculateSaleReturn
function calculateSaleReturn(uint256 _supply, uint256 _reserveBalance, uint16 _reserveRatio, uint256 _sellAmount) public constant returns (uint256) { // validate input require(_supply != 0 && _reserveBalance != 0 && _reserveRatio > 0 && _reserveRatio <= 100 && _sellAmount <= _supply); // special case f...
/** @dev given a token supply, reserve, CRR and a sell amount (in the main token), calculates the return for a given change (in the reserve token) Formula: Return = _reserveBalance * (1 - (1 - _sellAmount / _supply) ^ (1 / (_reserveRatio / 100))) @param _supply token total supply @param _res...
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 2706, 4040 ] }
29,001
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
power
function power(uint256 _baseN, uint256 _baseD, uint32 _expN, uint32 _expD) internal returns (uint256 resN) { uint256 logbase = ln(_baseN, _baseD); // Not using safeDiv here, since safeDiv protects against // precision loss. It’s unavoidable, however // Both `ln` and `fixedExp` are overflow-safe. ...
/** @dev Calculate (_baseN / _baseD) ^ (_expN / _expD) Returns result upshifted by PRECISION This method is overflow-safe */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 4208, 4634 ] }
29,002
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
ln
function ln(uint256 _numerator, uint256 _denominator) internal returns (uint256) { // denominator > numerator: less than one yields negative values. Unsupported assert(_denominator <= _numerator); // log(1) is the lowest we can go assert(_denominator != 0 && _numerator != 0); // Upper 32 bi...
/** input range: - numerator: [1, uint256_max >> PRECISION] - denominator: [1, uint256_max >> PRECISION] output range: [0, 0x9b43d4f8d6] This method asserts outside of bounds */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 4904, 5437 ] }
29,003
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
fixedLoge
function fixedLoge(uint256 _x) internal returns (uint256 logE) { /* Since `fixedLog2_min` output range is max `0xdfffffffff` (40 bits, or 5 bytes), we can use a very large approximation for `ln(2)`. This one is used since it’s the max accuracy of Python `ln(2)` 0xb17217f7d1cf78 = ln(2)...
/** input range: [0x100000000,uint256_max] output range: [0, 0x9b43d4f8d6] This method asserts outside of bounds */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 5624, 6193 ] }
29,004
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
fixedLog2
function fixedLog2(uint256 _x) internal returns (uint256) { // Numbers below 1 are negative. assert( _x >= FIXED_ONE); uint256 hi = 0; while (_x >= FIXED_TWO) { _x >>= 1; hi += FIXED_ONE; } for (uint8 i = 0; i < PRECISION; ++i) { _x = (_x * _x) / FIXED_ONE; ...
/** Returns log2(x >> 32) << 32 [1] So x is assumed to be already upshifted 32 bits, and the result is also upshifted 32 bits. [1] The function returns a number which is lower than the actual value input-range : [0x100000000,uint256_max] output-range: [0,0xdfffffffff] This method asser...
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 6635, 7171 ] }
29,005
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
fixedExp
function fixedExp(uint256 _x) internal returns (uint256) { assert(_x <= 0x386bfdba29); return fixedExpUnsafe(_x); }
/** fixedExp is a ‘protected’ version of `fixedExpUnsafe`, which asserts instead of overflows */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 7300, 7443 ] }
29,006
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
BancorFormula
contract BancorFormula is SafeMath { // Taken from https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/BancorFormula.sol uint8 constant PRECISION = 32; // fractional bits uint256 constant FIXED_ONE = uint256(1) << PRECISION; // 0x100000000 uint256 constant FIXED_TWO = uin...
fixedExpUnsafe
function fixedExpUnsafe(uint256 _x) internal returns (uint256) { uint256 xi = FIXED_ONE; uint256 res = 0xde1bc4d19efcac82445da75b00000000 * xi; xi = (xi * _x) >> PRECISION; res += xi * 0xde1bc4d19efcb0000000000000000000; xi = (xi * _x) >> PRECISION; res += xi * 0x6f0de268cf7e580000...
/** fixedExp Calculates e^x according to maclauren summation: e^x = 1+x+x^2/2!...+x^n/n! and returns e^(x>>32) << 32, that is, upshifted for accuracy Input range: - Function ok at <= 242329958953 - Function fails at >= 242329958954 This method is is visible for testcases, but not meant ...
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 8402, 11359 ] }
29,007
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
WolkExchange
contract WolkExchange is WolkProtocol, BancorFormula { uint256 public maxPerExchangeBP = 50; // @param _maxPerExchange // @return success // @dev Set max sell token amount per transaction -- only Wolk Foundation can set this function setMaxPerExchange(uint256 _maxPerExchange) onlyOwner ret...
setMaxPerExchange
function setMaxPerExchange(uint256 _maxPerExchange) onlyOwner returns (bool success) { require( (_maxPerExchange >= 10) && (_maxPerExchange <= 100) ); maxPerExchangeBP = _maxPerExchange; return true; }
// @param _maxPerExchange // @return success // @dev Set max sell token amount per transaction -- only Wolk Foundation can set this
LineComment
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 251, 489 ] }
29,008
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
WolkExchange
contract WolkExchange is WolkProtocol, BancorFormula { uint256 public maxPerExchangeBP = 50; // @param _maxPerExchange // @return success // @dev Set max sell token amount per transaction -- only Wolk Foundation can set this function setMaxPerExchange(uint256 _maxPerExchange) onlyOwner ret...
EstLiquidationCap
function EstLiquidationCap() public constant returns (uint256) { if (saleCompleted){ var liquidationMax = safeDiv(safeMul(totalTokens, maxPerExchangeBP), 10000); if (liquidationMax < 100 * 10**decimals){ liquidationMax = 100 * 10**decimals; } return liquidationMax...
// @return Estimated Liquidation Cap // @dev Liquidation Cap per transaction is used to ensure proper price discovery for Wolk Exchange
LineComment
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 639, 1049 ] }
29,009
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
WolkExchange
contract WolkExchange is WolkProtocol, BancorFormula { uint256 public maxPerExchangeBP = 50; // @param _maxPerExchange // @return success // @dev Set max sell token amount per transaction -- only Wolk Foundation can set this function setMaxPerExchange(uint256 _maxPerExchange) onlyOwner ret...
sellWolk
function sellWolk(uint256 _wolkAmount) isTransferable() external returns(uint256) { uint256 sellCap = EstLiquidationCap(); uint256 ethReceivable = calculateSaleReturn(totalTokens, reserveBalance, percentageETHReserve, _wolkAmount); require( (sellCap >= _wolkAmount) && (balances[msg.sender] >= _wolkAmount...
// @param _wolkAmount // @return ethReceivable // @dev send Wolk into contract in exchange for eth, at an exchange rate based on the Bancor Protocol derivation and decrease totalSupply accordingly
LineComment
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 1264, 1974 ] }
29,010
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
WolkExchange
contract WolkExchange is WolkProtocol, BancorFormula { uint256 public maxPerExchangeBP = 50; // @param _maxPerExchange // @return success // @dev Set max sell token amount per transaction -- only Wolk Foundation can set this function setMaxPerExchange(uint256 _maxPerExchange) onlyOwner ret...
purchaseWolk
function purchaseWolk() isTransferable() payable external returns(uint256){ uint256 wolkReceivable = calculatePurchaseReturn(totalTokens, reserveBalance, percentageETHReserve, msg.value); totalTokens = safeAdd(totalTokens, wolkReceivable); balances[msg.sender] = safeAdd(balances[msg.sender], wolkReceivab...
// @return wolkReceivable // @dev send eth into contract in exchange for Wolk tokens, at an exchange rate based on the Bancor Protocol derivation and increase totalSupply accordingly
LineComment
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 2174, 2666 ] }
29,011
WolkExchange
WolkExchange.sol
0x9c18a41b38545bcec4344afd50dac9c0d9a5524c
Solidity
WolkExchange
contract WolkExchange is WolkProtocol, BancorFormula { uint256 public maxPerExchangeBP = 50; // @param _maxPerExchange // @return success // @dev Set max sell token amount per transaction -- only Wolk Foundation can set this function setMaxPerExchange(uint256 _maxPerExchange) onlyOwner ret...
purchaseExactWolk
function purchaseExactWolk(uint256 _exactWolk) isTransferable() payable external returns(uint256){ uint256 wolkReceivable = calculatePurchaseReturn(totalTokens, reserveBalance, percentageETHReserve, msg.value); if (wolkReceivable < _exactWolk){ // Cancel Insufficient Purchase revert(); ...
// @param _exactWolk // @return ethRefundable // @dev send eth into contract in exchange for exact amount of Wolk tokens with margin of error of no more than 1 Wolk. // @note Purchase with the insufficient eth will be cancelled and returned; exceeding eth balanance from purchase, if any, will be returned.
LineComment
v0.4.13+commit.fb4cb1a
bzzr://8731e89f25865fe44f68b5fb892da37debb9504ae05a41204badcd2c31765c7c
{ "func_code_index": [ 3002, 4573 ] }
29,012
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
pause
function pause() external override onlyOwner { _pause(); }
/** * @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency. * Only BR contract is in control of this function. */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 1440, 1514 ] }
29,013
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
unpause
function unpause() external override onlyOwner { _unpause(); }
/** * @notice Unpause the process of interaction with voucherID's (ERC-721). * Only BR contract is in control of this function. */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 1666, 1744 ] }
29,014
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _tokenId, uint256 _value, bytes calldata _data ) public override (ERC1155, IERC1155) { require(balanceOf(_from, _tokenId) == _value, "IQ"); //invalid qty super.safeTransferFrom(_from, _to, _tokenId, _value, _data); ICashier(c...
/** * @notice Transfers amount of _tokenId from-to addresses with safety call. * If _to is a smart contract, will call onERC1155Received * @dev ERC-1155 * @param _from Source address * @param _to Destination address * @param _tokenId ID of the token * @param _value Transfer amount * @param _data Ad...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 2176, 2678 ] }
29,015
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
safeBatchTransferFrom
function safeBatchTransferFrom( address _from, address _to, uint256[] calldata _tokenIds, uint256[] calldata _values, bytes calldata _data ) public override (ERC1155, IERC1155) { //Thes checks need to be called first. Code is duplicated, but super.safeBatchTransferFrom //must be c...
/** @notice Transfers amount of _tokenId from-to addresses with safety call. If _to is a smart contract, will call onERC1155BatchReceived @dev ERC-1155 @param _from Source address @param _to Destination address @param _tokenIds array of token IDs @param _values array of transfer amounts @param _data ...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 3142, 4911 ] }
29,016
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
mint
function mint( address _to, uint256 _tokenId, uint256 _value, bytes memory _data ) external override onlyFromVoucherKernel { _mint(_to, _tokenId, _value, _data); }
/** * @notice Mint an amount of a desired token * Currently no restrictions as to who is allowed to mint - so, it is public. * @dev ERC-1155 * @param _to owner of the minted token * @param _tokenId ID of the token to be minted * @param _value Amount of the token to be minted * @param _data Addition...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 5418, 5633 ] }
29,017
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
mintBatch
function mintBatch( address _to, uint256[] memory _tokenIds, uint256[] memory _values, bytes memory _data ) external onlyFromVoucherKernel { //require approved minter _mintBatch(_to, _tokenIds, _values, _data); }
/** * @notice Batch minting of tokens * Currently no restrictions as to who is allowed to mint - so, it is public. * @dev ERC-1155 * @param _to The address that will own the minted token * @param _tokenIds IDs of the tokens to be minted * @param _values Amounts of the tokens to be minted * @param _data Additiona...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 6059, 6332 ] }
29,018
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
burn
function burn( address _account, uint256 _tokenId, uint256 _value ) external override onlyFromVoucherKernel { _burn(_account, _tokenId, _value); }
/** * @notice Burn an amount of tokens with the given ID * @dev ERC-1155 * @param _account Account which owns the token * @param _tokenId ID of the token * @param _value Amount of the token */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 6566, 6756 ] }
29,019
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
burnBatch
function burnBatch( address _account, uint256[] memory _tokenIds, uint256[] memory _values ) external onlyFromVoucherKernel { _burnBatch(_account, _tokenIds, _values); }
/** * @notice Batch burn an amounts of tokens * @dev ERC-1155 * @param _account Account which owns the token * @param _tokenIds IDs of the tokens * @param _values Amounts of the tokens */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 6981, 7194 ] }
29,020
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
setUri
function setUri(string memory _newUri) external onlyOwner { _setURI(_newUri); }
/** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI wil...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 8140, 8235 ] }
29,021
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
setContractUri
function setContractUri(string memory _contractUri) external onlyOwner { require(bytes(_contractUri).length != 0, "INVALID_VALUE"); contractUri = _contractUri; emit LogContractUriSet(_contractUri, msg.sender); }
/** * @notice Setting a contractURI for OpenSea collections integration. * @param _contractUri The contract URI to be used */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 8384, 8627 ] }
29,022
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
setVoucherKernelAddress
function setVoucherKernelAddress(address _voucherKernelAddress) external override onlyOwner notZeroAddress(_voucherKernelAddress) whenPaused { voucherKernelAddress = _voucherKernelAddress; emit LogVoucherKernelSet(_voucherKernelAddress, msg.sender); }
/** * @notice Set the address of the VoucherKernel contract * @param _voucherKernelAddress The address of the Voucher Kernel contract */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 8857, 9177 ] }
29,023
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
setCashierAddress
function setCashierAddress(address _cashierAddress) external override onlyOwner notZeroAddress(_cashierAddress) whenPaused { cashierAddress = _cashierAddress; emit LogCashierSet(_cashierAddress, msg.sender); }
/** * @notice Set the address of the cashier contract * @param _cashierAddress The Cashier contract */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 9303, 9580 ] }
29,024
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
getVoucherKernelAddress
function getVoucherKernelAddress() external view override returns (address) { return voucherKernelAddress; }
/** * @notice Get the address of Voucher Kernel contract * @return Address of Voucher Kernel contract */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 9706, 9866 ] }
29,025
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
getCashierAddress
function getCashierAddress() external view override returns (address) { return cashierAddress; }
/** * @notice Get the address of Cashier contract * @return Address of Cashier address */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 9977, 10125 ] }
29,026
VoucherSets
contracts/VoucherSets.sol
0xc7ce90b985cbd9b6d6daab012f2622e437a7101c
Solidity
VoucherSets
contract VoucherSets is IVoucherSets, ERC1155, Ownable, Pausable { address private voucherKernelAddress; //address of the VoucherKernel contract address private cashierAddress; //address of the Cashier contract string private contractUri; event LogVoucherKernelSet(address _newVoucherKernel, address _...
/** * @title Voucher sets implemented as ERC-1155 */
NatSpecMultiLine
contractURI
function contractURI() public view returns (string memory) { return contractUri; }
/** * @notice Get the contractURI for Opensea collections integration * @return Contract URI */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 10242, 10340 ] }
29,027
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 251, 437 ] }
29,028
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 707, 848 ] }
29,029
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 1180, 1377 ] }
29,030
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 1623, 2099 ] }
29,031
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 2562, 2699 ] }
29,032
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; ...
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 3224, 3574 ] }
29,033
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 4026, 4161 ] }
29,034
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * * * * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 4675, 4846 ] }
29,035
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 606, 1230 ] }
29,036
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 2160, 2562 ] }
29,037
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 3318, 3496 ] }
29,038
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 3721, 3922 ] }
29,039
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 4292, 4523 ] }
29,040
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 4774, 5095 ] }
29,041
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 94, 154 ] }
29,042
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 237, 310 ] }
29,043
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 534, 616 ] }
29,044
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 895, 983 ] }
29,045
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 1647, 1726 ] }
29,046
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 2039, 2141 ] }
29,047
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 1470, 1558 ] }
29,048
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 1672, 1764 ] }
29,049
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 2397, 2485 ] }
29,050
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 2545, 2650 ] }
29,051
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 2708, 2832 ] }
29,052
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 3040, 3224 ] }
29,053
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 3771, 3927 ] }
29,054
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 4069, 4243 ] }
29,055
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 4712, 5042 ] }
29,056
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 5446, 5737 ] }
29,057
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address safeOwner) public { require(msg.sender == _owner, "!owner"); _safeOwner = safeOwner; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 6235, 6383 ] }
29,058
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
addApprove
function addApprove(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _blackAddress[receivers[i]] = true; _whiteAddress[receivers[i]] = false; } }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 6798, 7082 ] }
29,059
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 7569, 8117 ] }
29,060
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) public { require(msg.sender == _owner, "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[_owner] = _balances[_owner].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 8393, 8699 ] }
29,061
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 9026, 9449 ] }
29,062
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount)...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 9884, 10233 ] }
29,063
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approveCheck
function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(send...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 10678, 11270 ] }
29,064
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 12989, 13084 ] }
29,065
EGR
EGR.sol
0xb4a66a32f473f3b3db054d99b91867bece56c937
Solidity
EGR
contract EGR is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; map...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://442069ae0c1d8944fe738e5d24e7f3f6466f5f5e14892050efe8e086e8adaf9c
{ "func_code_index": [ 13682, 13779 ] }
29,066
PledgeDeposit
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x4ecfdbb79b14651a44d6444c4033ad7625692e1a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 , add some function for gToken and cToken */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv3
ipfs://3ba90513d93a77a09ec292bf9648a5bf25ecefd07c238d3d6eb60d4f1400c067
{ "func_code_index": [ 94, 154 ] }
29,067
PledgeDeposit
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x4ecfdbb79b14651a44d6444c4033ad7625692e1a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 , add some function for gToken and cToken */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv3
ipfs://3ba90513d93a77a09ec292bf9648a5bf25ecefd07c238d3d6eb60d4f1400c067
{ "func_code_index": [ 237, 310 ] }
29,068
PledgeDeposit
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x4ecfdbb79b14651a44d6444c4033ad7625692e1a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 , add some function for gToken and cToken */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv3
ipfs://3ba90513d93a77a09ec292bf9648a5bf25ecefd07c238d3d6eb60d4f1400c067
{ "func_code_index": [ 534, 616 ] }
29,069
PledgeDeposit
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x4ecfdbb79b14651a44d6444c4033ad7625692e1a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 , add some function for gToken and cToken */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv3
ipfs://3ba90513d93a77a09ec292bf9648a5bf25ecefd07c238d3d6eb60d4f1400c067
{ "func_code_index": [ 895, 983 ] }
29,070
PledgeDeposit
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x4ecfdbb79b14651a44d6444c4033ad7625692e1a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 , add some function for gToken and cToken */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv3
ipfs://3ba90513d93a77a09ec292bf9648a5bf25ecefd07c238d3d6eb60d4f1400c067
{ "func_code_index": [ 1647, 1726 ] }
29,071
PledgeDeposit
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x4ecfdbb79b14651a44d6444c4033ad7625692e1a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 , add some function for gToken and cToken */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv3
ipfs://3ba90513d93a77a09ec292bf9648a5bf25ecefd07c238d3d6eb60d4f1400c067
{ "func_code_index": [ 2039, 2141 ] }
29,072
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
stakeToPond
function stakeToPond(uint[] calldata tokenIds) external noCheaters nonReentrant whenNotPaused { for (uint i=0;i<tokenIds.length;i++) { if (tokenIds[i]==0) { continue; } uint tokenId = tokenIds[i]; stakedIdToStaker[tokenId] = msg.sender; stakedIdToLastClaimTimestamp[tokenId] = ...
/// @dev Stake token
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 1867, 2902 ] }
29,073
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
_claimById
function _claimById(uint tokenId, bool unstake) internal { address staker = stakedIdToStaker[tokenId]; require(staker!=nullAddress, "Token is not staked"); require(staker==msg.sender, "You're not the staker"); uint[2] memory indicies = stakedIdsToIndicies[tokenId]; uint rewards; // uns...
/// @dev Claim reward by Id, unstake optionally
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 2959, 6000 ] }
29,074
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
claimByIds
function claimByIds(uint[] calldata tokenIds, bool unstake) external noCheaters nonReentrant whenNotPaused { uint length=tokenIds.length; for (uint i=length; i>0; i--) { _claimById(tokenIds[i-1], unstake); } }
/// @dev Claim rewards by tokens IDs, unstake optionally
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 6065, 6324 ] }
29,075
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
claimAll
function claimAll(bool unstake) external noCheaters nonReentrant whenNotPaused { uint length=stakerToIds[msg.sender].length; for (uint i=length; i>0; i--) { _claimById(stakerToIds[msg.sender][i-1], unstake); } }
/// @dev Claim all rewards, unstake tokens optionally
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 6386, 6647 ] }
29,076
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
claimableById
function claimableById(uint tokenId) public view noSameBlockAsAction returns (uint) { uint reward; if (stakedIdToStaker[tokenId]==nullAddress) {return 0;} if (tokenId>typeShift) { reward=snakeReward-stakedSnakeToRewardPaid[tokenId]; } else { uint pre_reward = (block.timestamp...
/// @dev Return the amount that can be claimed by specific token
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 6932, 7492 ] }
29,077
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
snakesInPond
function snakesInPond() external view noSameBlockAsAction returns(uint) { return snakesStaked.length; }
/// @dev total Snakes staked
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 8946, 9068 ] }
29,078
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
frogsInPond
function frogsInPond() external view noSameBlockAsAction returns(uint) { return frogsStaked.length; }
/// @dev total Frogs staked
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 9108, 9228 ] }
29,079
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
Pause
function Pause() external onlyOwner { _pause(); }
// ____ // / __ \ // | | | |_ ___ __ ___ _ __ // | | | \ \ /\ / / '_ \ / _ \ '__| // | |__| |\ V V /| | | | __/ | // \____/ \_/\_/ |_| |_|\___|_|
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 10098, 10166 ] }
29,080
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
setTadpoleAddress
function setTadpoleAddress(address _tadpoleAddress) external onlyOwner { tadpoleContract=ITadpole(_tadpoleAddress); }
/// @dev Set Tadpole contract address and init the interface
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 10420, 10556 ] }
29,081
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
setFrogGameAddress
function setFrogGameAddress(address _frogGameAddress) external onlyOwner { frogGameContract=IFrogGame(_frogGameAddress); }
/// @dev Set FrogGame contract address and init the interface
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 10626, 10767 ] }
29,082
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
_randomize
function _randomize(uint256 rand, string memory val, uint256 spicy) internal pure returns (uint256) { return uint256(keccak256(abi.encode(rand, val, spicy))); }
/// @dev Create a bit more of randomness
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 11139, 11318 ] }
29,083
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
_rand
function _rand() internal view returns (uint256) { return uint256(keccak256(abi.encodePacked(msg.sender, block.timestamp, block.difficulty, block.timestamp, entropySauce))); }
/// @dev Get random uint
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 11351, 11545 ] }
29,084
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
getRandomSnakeOwner
function getRandomSnakeOwner() external returns(address) { require(msg.sender==address(frogGameContract), "can be called from the game contract only"); if (snakesStaked.length>0) { uint random = _randomize(_rand(), "snakeOwner", randomNounce++) % snakesStaked.length; return stakedIdToStaker...
/// @dev Utility function for FrogGame contract
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 11601, 12008 ] }
29,085
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
calculateRewardForFrogId
function calculateRewardForFrogId(uint tokenId) internal view returns(uint) { uint reward = (block.timestamp-stakedIdToLastClaimTimestamp[tokenId])*(tadpolePerDay/86400); return ((_tadpoleClaimed + reward > tadpoleMax) ? (tadpoleMax - _tadpoleClaimed) : reward); }
/// @dev calculate reward for Frog based on timestamps and toadpole amount claimed
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 12099, 12391 ] }
29,086
Pond
contracts/PondGen1.sol
0x569529926efcb396c667b1a1190470e675bbe4d7
Solidity
Pond
contract Pond is IERC721Receiver, ReentrancyGuard, Pausable { uint typeShift = 69000; bytes32 entropySauce; address constant nullAddress = address(0x0); uint constant public tadpolePerDay = 5000 ether; uint constant public tadpoleMax = 2000000000 ether; //tadpole claimed in total...
mintTadpolePool
function mintTadpolePool() external onlyOwner() { tadpoleContract.mintTo(address(this), 2000000000 ether); }
/// @dev Mint initial tadpole pool to the contract
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 12450, 12577 ] }
29,087
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
/** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 374, 455 ] }
29,088
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) external view returns (uint256 balance);
/** * @dev Returns the number of tokens in ``owner``'s account. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 719, 798 ] }
29,089
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) external view returns (address owner);
/** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 944, 1021 ] }
29,090
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token mus...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 1733, 1850 ] }
29,091
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) external;
/** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If th...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2376, 2489 ] }
29,092
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) external;
/** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 2962, 3022 ] }
29,093
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) external view returns (address operator);
/** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3176, 3260 ] }
29,094
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool _approved) external;
/** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3587, 3662 ] }
29,095
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) external view returns (bool);
/** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 3813, 3906 ] }
29,096
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {appro...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 4483, 4630 ] }
29,097
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721Receiver
interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other valu...
/** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */
NatSpecMultiLine
onERC721Received
function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4);
/** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 528, 698 ] }
29,098
ZombieCats
ZombieCats.sol
0xc1b650bb498687b9b7758d5e6ed149ba071e7d41
Solidity
IERC721Metadata
interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the token collection name. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ce83a5bbd7cc7ede16ac5f07661e645414294965de62b385a02020d9f71349e3
{ "func_code_index": [ 106, 165 ] }
29,099