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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | setMintTime | function setMintTime(uint256 _presaleTime, uint256 _publicTime) public onlyOwner {
require(_presaleTime > _currentTime(), "RhapsodyCreator/invalid-presale-time");
require(_publicTime > _presaleTime, "RhapsodyCreator/invalid-public-time");
presaleTime = _presaleTime;
publicTime = _publicTime;
}
| /// @notice Set the time for the mint
/// @param _presaleTime time the presale starts
/// @param _publicTime time the public sale starts
/// @dev this function can serve as an "active" and "non-active" sale status
/// @dev set the values to uint256(-1) for "non-active" sale status
/// @dev also, pass contract ownership... | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
3874,
4208
]
} | 2,707 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | setMintMerkleRoot | function setMintMerkleRoot(bytes32 _presaleMerkleRoot) public onlyOwner {
presaleMerkleRoot = _presaleMerkleRoot;
}
| /// @notice force override the merkle root used in presale mint
/// @param _presaleMerkleRoot root of the merklelized whitelist | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
4346,
4477
]
} | 2,708 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | setBaseURI | function setBaseURI(string calldata baseURI) external onlyOwner {
_baseTokenURI = baseURI;
}
| /// =========== Metadata ===========
/// @notice set the new baseURI to change the tokens metadata | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
5709,
5817
]
} | 2,709 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return _baseTokenURI;
}
| /// @notice core metadata baseURI used for tokens metadata | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
5882,
5998
]
} | 2,710 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | baseURI | function baseURI() public view returns (string memory) {
return _baseURI();
}
| /// @notice core metadata baseURI used for tokens metadata | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
6063,
6156
]
} | 2,711 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | promotionMint | function promotionMint(uint256 invocations) external onlyOwner {
require(totalSupply().add(invocations) <= amountForPromotion, "RhapsodyCreator/invalid-promotion-supply");
require(invocations.mod(maxBatchSize) == 0, "RhapsodyCreator/invalid-batch-multiple");
uint256 blocks = invocations.div(maxBatchSize);
... | /// =========== Dev ===========
/// @notice used by owner to mint promotional nfts
/// @param invocations the number of invocations to batch mint | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
6317,
6810
]
} | 2,712 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | withdrawMoney | function withdrawMoney() external onlyOwner nonReentrant {
(bool success, ) = msg.sender.call{ value: address(this).balance }("");
require(success, "RhapsodyCreator/invalid-withdraw-money");
}
| /// @notice withdraws the ether in the contract to owner | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
6873,
7089
]
} | 2,713 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | _currentTime | function _currentTime() internal virtual returns (uint256) {
return block.timestamp;
}
| /// @notice returns the current block timestamp
/// @dev this function is overriden in testing for time-dependent testing | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
7221,
7323
]
} | 2,714 | |||
Tiger | contracts/token/RhapsodyCreator.sol | 0xeb6600e62c24d17734c1807414a9159b116c9520 | Solidity | RhapsodyCreator | contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard {
/// ============ Libraries ============
/// @notice safe math for arithmetic operations
using SafeMath for uint256;
/// ============ Immutable storage ============
/// @notice promotional nfts count
uint256 public immutable amoun... | setOwnersExplicit | function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
_setOwnersExplicit(quantity);
}
| /// @notice sets the owners quantity explicity
/// @dev eliminate loops in future calls of ownerOf() | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
7434,
7560
]
} | 2,715 | |||
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | HodlDAO | function HodlDAO(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol
) {
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
totalSupply = initialSupply; // Update total supply
name = tokenName; ... | /**
* Initializes contract with initial supply tokens to the creator of the contract
* In our case, there's no initial supply. Tokens will be created as ether is sent
* to the fall-back function. Then tokens are burned when ether is withdrawn.
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
2144,
2770
]
} | 2,716 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) notPendingWithdrawal {
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from th... | /** ERC20 - transfer sends tokens
* @notice send `_value` token to `_to` from `msg.sender`
* @param _to The address of the recipient
* @param _value The amount of token to be transferred
* @return Whether the transfer was successful or not
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
3339,
3905
]
} | 2,717 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) notPendingWithdrawal
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /** ERC20 approve allows another contract to spend some tokens in your behalf
* @notice `msg.sender` approves `_spender` to spend `_value` tokens
* @param _spender The address of the account able to transfer the tokens
* @param _value The amount of tokens to be approved for transfer
* @return Whether the approv... | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
4283,
4469
]
} | 2,718 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) notPendingWithdrawal
returns (bool success) {
allowance[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function ... | /**
* ERC-20 Approves and then calls the receiving contract
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
4553,
5374
]
} | 2,719 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) notPendingWithdrawal
returns (bool success) {
if (balanceOf[_from] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
if (_value > allowance[_fr... | /**
* ERC20 A contract attempts to get the coins
* @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value The amount of token to be transferred
* @return Whether the trans... | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
5761,
6452
]
} | 2,720 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | withdrawalInitiate | function withdrawalInitiate() notPendingWithdrawal {
WithdrawalStarted(msg.sender, balanceOf[msg.sender]);
withdrawalRequests[msg.sender] = withdrawalRequest(block.number, balanceOf[msg.sender]);
}
| /**
* withdrawalInitiate initiates the withdrawal by going into a waiting period
* It remembers the block number & amount held at the time of request.
* After the waiting period finishes, the call withdrawalComplete
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
6703,
6928
]
} | 2,721 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | withdrawalComplete | function withdrawalComplete() returns (bool) {
withdrawalRequest r = withdrawalRequests[msg.sender];
if (r.sinceBlock == 0) throw;
if ((r.sinceBlock + blockWait) > block.number) {
WithdrawalPremature(msg.sender, r.sinceBlock + blockWait - block.number);
return false;
}
uint256... | /**
* withdrawalComplete is called after the waiting period. The ether will be
* returned to the caller and the tokens will be burned.
* A reward will be issued based on the amount in the feePot relative to the
* amount held when the withdrawal request was made.
*
* Gas: 17008
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
7259,
8134
]
} | 2,722 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | calculateReward | function calculateReward(uint256 v) constant returns (uint256) {
uint256 reward = 0;
if (feePot > 0) {
reward = v / totalSupply * feePot;
}
return reward;
}
| /**
* Reward is based on the amount held, relative to total supply of tokens.
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
8235,
8450
]
} | 2,723 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | calculateFee | function calculateFee(uint256 v) constant returns (uint256) {
uint256 feeRequired = v / (1 wei * 100);
return feeRequired;
}
| /** calculate the fee for quick withdrawal
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
8510,
8663
]
} | 2,724 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | quickWithdraw | function quickWithdraw() payable notPendingWithdrawal returns (bool) {
// calculate required fee
uint256 amount = balanceOf[msg.sender];
if (amount <= 0) throw;
uint256 feeRequired = calculateFee(amount);
if (msg.value < feeRequired) {
// not enough fees sent
InsufficientFee(m... | /**
* Quick withdrawal, needs to send ether to this function for the fee.
*
* Gas use: 44129 (including call to processWithdrawal)
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
8828,
9685
]
} | 2,725 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | doWithdrawal | function doWithdrawal(uint256 extra) internal {
uint256 amount = balanceOf[msg.sender];
if (amount <= 0) throw; // cannot withdraw
balanceOf[msg.sender] = 0;
if (totalSupply > totalSupply - amount) {
totalSupply = 0; // don't let it overflow
} else {
totalSup... | /**
* do withdrawal
* Gas: 62483
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
9747,
10316
]
} | 2,726 | |
HodlDAO | HodlDAO.sol | 0x6b3da034ebad473acb93729a7152c672cc0dc6cd | Solidity | HodlDAO | contract HodlDAO {
/* ERC20 Public variables of the token */
string public version = 'HDAO 0.2';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public ... | /**
* Hodld DAO and ERC20 token
* Author: CurrencyTycoon on GitHub
* License: MIT
* Date: 2017
*
* Deploy with the following args:
* 0, "Hodl DAO", 18, "HODL"
*
*/ | NatSpecMultiLine | function () payable notPendingWithdrawal {
uint256 amount = msg.value; // amount that was sent
if (amount <= 0) throw; // need to send some ETH
balanceOf[msg.sender] += amount; // mint new tokens
totalSupply += amount; // track the supply
Transfer(0, msg.sender, amount); // notify of the event... | /**
* Fallback function when sending ether to the contract
* Gas use: 65051
*/ | NatSpecMultiLine | v0.4.10+commit.f0d539ae | bzzr://6a5ee1c65b020a24d6ab000e01e6e1c92714225d741017dfb4cf091466db691c | {
"func_code_index": [
10422,
10814
]
} | 2,727 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
94,
154
]
} | 2,728 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
237,
310
]
} | 2,729 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
534,
616
]
} | 2,730 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
895,
983
]
} | 2,731 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
1647,
1726
]
} | 2,732 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
2039,
2141
]
} | 2,733 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
259,
445
]
} | 2,734 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
723,
864
]
} | 2,735 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
1162,
1359
]
} | 2,736 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
1613,
2089
]
} | 2,737 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
2560,
2697
]
} | 2,738 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
3188,
3471
]
} | 2,739 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
3931,
4066
]
} | 2,740 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
4546,
4717
]
} | 2,741 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
606,
1230
]
} | 2,742 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
2160,
2562
]
} | 2,743 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
3318,
3496
]
} | 2,744 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
3721,
3922
]
} | 2,745 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
4292,
4523
]
} | 2,746 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
4774,
5095
]
} | 2,747 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
497,
581
]
} | 2,748 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
1139,
1292
]
} | 2,749 | ||
MadInu | MadInu.sol | 0x62af108df4d945288f13400bcc26580147f7f0ce | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://3bb9f707bc1f997acc4ae81a865fc9bccce25d061620c69d6fb8e984919939cf | {
"func_code_index": [
1442,
1691
]
} | 2,750 | ||
FollowersToken | FollowersToken.sol | 0x422401a78d6fb4727f96cc435884ecf5ce16f527 | Solidity | ERC721 | contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
functio... | /// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <dete@axiomzen.co> (https://github.com/dete) | NatSpecSingleLine | approve | function approve(address _to, uint256 _tokenId) public;
| // Required methods | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://59dd1558164b17ca4a47af763275232cf864eaf7416c3c91c8368ee08d982eee | {
"func_code_index": [
42,
100
]
} | 2,751 | |
FollowersToken | FollowersToken.sol | 0x422401a78d6fb4727f96cc435884ecf5ce16f527 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_a == 0) {
return 0;
}
c ... | /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://59dd1558164b17ca4a47af763275232cf864eaf7416c3c91c8368ee08d982eee | {
"func_code_index": [
89,
483
]
} | 2,752 | |
FollowersToken | FollowersToken.sol | 0x422401a78d6fb4727f96cc435884ecf5ce16f527 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
// assert(_b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = _a / _b;
// assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
return _a / _b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://59dd1558164b17ca4a47af763275232cf864eaf7416c3c91c8368ee08d982eee | {
"func_code_index": [
567,
858
]
} | 2,753 | |
FollowersToken | FollowersToken.sol | 0x422401a78d6fb4727f96cc435884ecf5ce16f527 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
assert(_b <= _a);
return _a - _b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://59dd1558164b17ca4a47af763275232cf864eaf7416c3c91c8368ee08d982eee | {
"func_code_index": [
972,
1094
]
} | 2,754 | |
FollowersToken | FollowersToken.sol | 0x422401a78d6fb4727f96cc435884ecf5ce16f527 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://git... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
c = _a + _b;
assert(c >= _a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://59dd1558164b17ca4a47af763275232cf864eaf7416c3c91c8368ee08d982eee | {
"func_code_index": [
1158,
1293
]
} | 2,755 | |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
251,
437
]
} | 2,756 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
707,
848
]
} | 2,757 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1180,
1377
]
} | 2,758 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1623,
2099
]
} | 2,759 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
2562,
2699
]
} | 2,760 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
3224,
3574
]
} | 2,761 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
4026,
4161
]
} | 2,762 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
4675,
4846
]
} | 2,763 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | 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.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
607,
1231
]
} | 2,764 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | 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 | toPayable | function toPayable(address account) internal pure returns (address payable) {
return address(uint160(account));
}
| /**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1443,
1575
]
} | 2,765 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | 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-call-value
(bool success, ) = recipient.call.value(amount)("");
require(success, "Address: unable to send value, re... | /**
* @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.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
2547,
2923
]
} | 2,766 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.beare... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | add | function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
| /**
* @dev give an account access to this role
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
155,
346
]
} | 2,767 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.beare... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | remove | function remove(Role storage role, address account) internal {
require(account != address(0));
require(has(role, account));
role.bearer[account] = false;
}
| /**
* @dev remove an account's access to this role
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
420,
614
]
} | 2,768 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.beare... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | has | function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0));
return role.bearer[account];
}
| /**
* @dev check if an account has this role
* @return bool
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
703,
873
]
} | 2,769 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | Context | contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (addres... | /*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending ... | Comment | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
265,
368
]
} | 2,770 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | 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.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
374,
455
]
} | 2,771 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC165 | contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedIn... | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool) {
return _supportedInterfaces[interfaceId];
}
| /**
* @dev See {IERC165-supportsInterface}.
*
* Time complexity O(1), guaranteed to always use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
711,
851
]
} | 2,772 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC165 | contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedIn... | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/ | NatSpecMultiLine | _registerInterface | function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
| /**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 inval... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1253,
1451
]
} | 2,773 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | IERC721 | contract IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view returns (uint256 balance);
| /**
* @dev Returns the number of NFTs in `owner`'s account.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
387,
464
]
} | 2,774 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | IERC721 | contract IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) public view returns (address owner);
| /**
* @dev Returns the owner of the NFT specified by `tokenId`.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
551,
626
]
} | 2,775 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | IERC721 | contract IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId) public;
| /**
* @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
* another (`to`).
*
*
*
* Requirements:
* - `from`, `to` cannot be zero.
* - `tokenId` must be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this
* NFT by either {approve} or {setApp... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1017,
1098
]
} | 2,776 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | IERC721 | contract IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 tokenId) public;
| /**
* @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
* another (`to`).
*
* Requirements:
* - If the caller is not `from`, it must be approved to move this NFT by
* either {approve} or {setApprovalForAll}.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1378,
1455
]
} | 2,777 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | IERC721Receiver | contract IERC721Receiver {
/**
* @notice Handle the receipt of an NFT
* @dev The ERC721 smart contract calls this function on the recipient
* after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
* otherwise the caller will revert the transaction. The selector... | /**
* @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 memory data)
public returns (bytes4);
| /**
* @notice Handle the receipt of an NFT
* @dev The ERC721 smart contract calls this function on the recipient
* after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
* otherwise the caller will revert the transaction. The selector to be
* returned can be obtained as `this.onE... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
912,
1040
]
} | 2,778 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _ownedTokensCount[owner].current();
}
| /**
* @dev Gets the balance of the specified address.
* @param owner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
2172,
2388
]
} | 2,779 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) public view returns (address) {
address owner = _tokenOwner[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
| /**
* @dev Gets the owner of the specified token ID.
* @param tokenId uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
2609,
2842
]
} | 2,780 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) public {
address owner = ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
... | /**
* @dev Approves another address to transfer the given token ID
* The zero address indicates there is no approved address.
* There can only be one approved address per token at a given time.
* Can only be called by the token owner or an approved operator.
* @param to address to be approved for the given to... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
3268,
3698
]
} | 2,781 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) public view returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
| /**
* @dev Gets the approved address for a token ID, or zero if no address set
* Reverts if the token ID does not exist.
* @param tokenId uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
3986,
4195
]
} | 2,782 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address to, bool approved) public {
require(to != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][to] = approved;
emit ApprovalForAll(_msgSender(), to, approved);
}
| /**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf.
* @param to operator address to set the approval
* @param approved representing the status of the approval to be set
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
4491,
4750
]
} | 2,783 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev Tells whether an operator is approved by a given owner.
* @param owner owner address which you want to query the approval of
* @param operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
5075,
5227
]
} | 2,784 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 tokenId) public {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transferFrom(from, to, tokenId);
}
| /**
* @dev Transfers the ownership of a given token ID to another address.
* Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
* Requires the msg.sender to be the owner, approved, or operator.
* @param from current owner of the token
* @param to address to receive the ownership of... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
5669,
5966
]
} | 2,785 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId) public {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
6623,
6762
]
} | 2,786 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransferFrom(from, to, tokenId, _data);
}
| /**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
7494,
7771
]
} | 2,787 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeTransferFrom | function _safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) internal {
_transferFrom(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
8485,
8762
]
} | 2,788 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _exists | function _exists(uint256 tokenId) internal view returns (bool) {
address owner = _tokenOwner[tokenId];
return owner != address(0);
}
| /**
* @dev Returns whether the specified token exists.
* @param tokenId uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
8959,
9119
]
} | 2,789 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _isApprovedOrOwner | function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
| /**
* @dev Returns whether the given spender can transfer a given token ID.
* @param spender address of the spender to query
* @param tokenId uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of th... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
9484,
9822
]
} | 2,790 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId) internal {
_safeMint(to, tokenId, "");
}
| /**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
10358,
10465
]
} | 2,791 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId, bytes memory _data) internal {
_mint(to, tokenId);
require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
11074,
11321
]
} | 2,792 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _mint | function _mint(address to, uint256 tokenId) internal {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_tokenOwner[tokenId] = to;
_ownedTokensCount[to].increment();
emit Transfer(address(0), to, tokenId);
}
| /**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenId uint256 ID of the token to be minted
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
11569,
11909
]
} | 2,793 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _burn | function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");
_clearApproval(tokenId);
_ownedTokensCount[owner].decrement();
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
| /**
* @dev Internal function to burn a specific token.
* Reverts if the token does not exist.
* Deprecated, use {_burn} instead.
* @param owner owner of the token to burn
* @param tokenId uint256 ID of the token being burned
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
12181,
12519
]
} | 2,794 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _burn | function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
| /**
* @dev Internal function to burn a specific token.
* Reverts if the token does not exist.
* @param tokenId uint256 ID of the token being burned
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
12702,
12799
]
} | 2,795 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _transferFrom | function _transferFrom(address from, address to, uint256 tokenId) internal {
require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_clearApproval(tokenId);
_ownedTokensCount[from].decrement();
_owne... | /**
* @dev Internal function to transfer ownership of a given token ID to another address.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenId uint256 ID of the ... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
13180,
13644
]
} | 2,796 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
internal returns (bool)
{
if (!to.isContract()) {
return true;
}
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = to.call(abi.encodeWithSelector(
... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* This is an internal detail of the `ERC721` contract and its use is deprecated.
* @param from address representing the previous owner of the giv... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
14291,
15375
]
} | 2,797 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721 {
using SafeMath for uint256;
using Address for address;
using Counters for Counters.Counter;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.s... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _clearApproval | function _clearApproval(uint256 tokenId) private {
if (_tokenApprovals[tokenId] != address(0)) {
_tokenApprovals[tokenId] = address(0);
}
}
| /**
* @dev Private function to clear current approval of a given token ID.
* @param tokenId uint256 ID of the token to be transferred
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
15538,
15718
]
} | 2,798 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
| /**
* @dev Gets the token ID at a given index of the tokens list of the requested owner.
* @param owner address owning the tokens list to be accessed
* @param index uint256 representing the index to be accessed of the requested tokens list
* @return uint256 token ID at the given index of the tokens list owned b... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1527,
1764
]
} | 2,799 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _allTokens.length;
}
| /**
* @dev Gets the total amount of tokens stored by the contract.
* @return uint256 representing the total amount of tokens
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
1918,
2019
]
} | 2,800 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) public view returns (uint256) {
require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
| /**
* @dev Gets the token ID at a given index of all the tokens in this contract
* Reverts if the index is greater or equal to the total number of tokens.
* @param index uint256 representing the index to be accessed of the tokens list
* @return uint256 token ID at the given index of the tokens list
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
2360,
2564
]
} | 2,801 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _transferFrom | function _transferFrom(address from, address to, uint256 tokenId) internal {
super._transferFrom(from, to, tokenId);
_removeTokenFromOwnerEnumeration(from, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
}
| /**
* @dev Internal function to transfer ownership of a given token ID to another address.
* As opposed to transferFrom, this imposes no restrictions on msg.sender.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenId uint256 ID of the to... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
2943,
3193
]
} | 2,802 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _mint | function _mint(address to, uint256 tokenId) internal {
super._mint(to, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
_addTokenToAllTokensEnumeration(tokenId);
}
| /**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to address the beneficiary that will own the minted token
* @param tokenId uint256 ID of the token to be minted
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
3453,
3660
]
} | 2,803 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _burn | function _burn(address owner, uint256 tokenId) internal {
super._burn(owner, tokenId);
_removeTokenFromOwnerEnumeration(owner, tokenId);
// Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund
_ownedTokensIndex[tokenId] = 0;
_removeTokenFromAllTo... | /**
* @dev Internal function to burn a specific token.
* Reverts if the token does not exist.
* Deprecated, use {ERC721-_burn} instead.
* @param owner owner of the token to burn
* @param tokenId uint256 ID of the token being burned
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
3939,
4316
]
} | 2,804 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _tokensOfOwner | function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {
return _ownedTokens[owner];
}
| /**
* @dev Gets the list of token IDs of the requested owner.
* @param owner address owning the tokens
* @return uint256[] List of token IDs owned by the requested address
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
4523,
4654
]
} | 2,805 |
TAIT | TAIT.sol | 0x91eb270469976168bc099b25cf02838c29656aab | Solidity | ERC721Enumerable | contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
//... | /**
* @title ERC-721 Non-Fungible Token with optional enumeration extension logic
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | _addTokenToOwnerEnumeration | function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
_ownedTokensIndex[tokenId] = _ownedTokens[to].length;
_ownedTokens[to].push(tokenId);
}
| /**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | MIT | bzzr://517d20cc1d72f1cd9f7a238cb696f06b038f2c6b956874ccaa2959a78ce6ac7a | {
"func_code_index": [
4950,
5141
]
} | 2,806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.