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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FastInvestTokenCrowdsale | FastInvestTokenCrowdsale.sol | 0xb8dc951ee4044ed7a8e2b1d45f6a1857895a4e81 | Solidity | FastInvestTokenCrowdsale | contract FastInvestTokenCrowdsale {
using SafeMath for uint256;
address public owner;
// The token being sold
token public tokenReward;
// Tokens will be transfered from this address
address internal tokenOwner;
// Address where funds are collected
address internal wallet... | /**
* @title FastInvestTokenCrowdsale
*
* Crowdsale have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/ | NatSpecMultiLine | validPurchase | function validPurchase() internal view returns (bool) {
bool withinPeriod = now >= startTime && now <= endTime;
bool nonZeroPurchase = msg.value != 0;
bool hasTokens = tokensSold < FUNDING_GOAL;
return withinPeriod && nonZeroPurchase && hasTokens;
}
| // @return true if the transaction can buy tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://481dd405532cab9d997687bbd965ef48a7fa35c3864d02a40dc9a22151f62ad2 | {
"func_code_index": [
3543,
3840
]
} | 1,707 | |
FastInvestTokenCrowdsale | FastInvestTokenCrowdsale.sol | 0xb8dc951ee4044ed7a8e2b1d45f6a1857895a4e81 | Solidity | FastInvestTokenCrowdsale | contract FastInvestTokenCrowdsale {
using SafeMath for uint256;
address public owner;
// The token being sold
token public tokenReward;
// Tokens will be transfered from this address
address internal tokenOwner;
// Address where funds are collected
address internal wallet... | /**
* @title FastInvestTokenCrowdsale
*
* Crowdsale have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/ | NatSpecMultiLine | hasEnded | function hasEnded() public view returns (bool) {
return now > endTime;
}
| // @return true if crowdsale event has ended | LineComment | v0.4.18+commit.9cf6e910 | bzzr://481dd405532cab9d997687bbd965ef48a7fa35c3864d02a40dc9a22151f62ad2 | {
"func_code_index": [
4113,
4204
]
} | 1,708 | |
GmStudioMindTheGap | @divergencetech/ethier/contracts/factories/IPaymentSplitterFactory.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | IPaymentSplitterFactory | interface IPaymentSplitterFactory {
/// @notice Deploys a minimal contract proxy to a PaymentSplitter.
function deploy(address[] memory payees, uint256[] memory shares)
external
returns (address);
/**
@notice Deploys a minimal contract proxy to a PaymentSplitter, at a
deterministic ... | deploy | function deploy(address[] memory payees, uint256[] memory shares)
external
returns (address);
| /// @notice Deploys a minimal contract proxy to a PaymentSplitter. | NatSpecSingleLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
107,
220
]
} | 1,709 | |||
GmStudioMindTheGap | @divergencetech/ethier/contracts/factories/IPaymentSplitterFactory.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | IPaymentSplitterFactory | interface IPaymentSplitterFactory {
/// @notice Deploys a minimal contract proxy to a PaymentSplitter.
function deploy(address[] memory payees, uint256[] memory shares)
external
returns (address);
/**
@notice Deploys a minimal contract proxy to a PaymentSplitter, at a
deterministic ... | deployDeterministic | function deployDeterministic(
bytes32 salt,
address[] memory payees,
uint256[] memory shares
) external returns (address);
| /**
@notice Deploys a minimal contract proxy to a PaymentSplitter, at a
deterministic address.
@dev Use predictDeploymentAddress() with the same salt to predit the address
before calling deployDeterministic(). See OpenZeppelin's proxy/Clones.sol
for details and caveats, primarily that this will revert if a salt is... | NatSpecMultiLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
582,
736
]
} | 1,710 | |||
GmStudioMindTheGap | @divergencetech/ethier/contracts/factories/IPaymentSplitterFactory.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | IPaymentSplitterFactory | interface IPaymentSplitterFactory {
/// @notice Deploys a minimal contract proxy to a PaymentSplitter.
function deploy(address[] memory payees, uint256[] memory shares)
external
returns (address);
/**
@notice Deploys a minimal contract proxy to a PaymentSplitter, at a
deterministic ... | predictDeploymentAddress | function predictDeploymentAddress(bytes32 salt)
external
view
returns (address);
| /**
@notice Returns the address at which a new PaymentSplitter will be deployed
if using the same salt as passed to this function.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
889,
997
]
} | 1,711 | |||
GmStudioMindTheGap | @divergencetech/ethier/contracts/factories/PaymentSplitterDeployer.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | PaymentSplitterDeployer | library PaymentSplitterDeployer {
/***
@notice Returns the ethier PaymentSplitterFactory instance for the current
chain.
*/
function instance() internal view returns (IPaymentSplitterFactory) {
address factory;
assembly {
switch chainid()
case 1 {
... | /**
@notice Convenience library for using ethier's PaymentSplitterFactory for cheap
deployment of OpenZeppelin PaymentSplitters via minimal proxy contracts. A
single factory contract is deployed on supported chains, the respective
addresses of which are determined via the chainid() and returned by this
library's i... | NatSpecMultiLine | instance | function instance() internal view returns (IPaymentSplitterFactory) {
address factory;
assembly {
switch chainid()
case 1 {
// mainnet
factory := 0xf034d6a4b1a64f0e6038632d87746ca24b79d325
}
case 4 {
// Rinkeby
factory := 0x633dc91... | /***
@notice Returns the ethier PaymentSplitterFactory instance for the current
chain.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
141,
967
]
} | 1,712 | |
KIPToken | KIPToken.sol | 0x64e65d352f6a2949463b3a7595911b61bbafc63e | Solidity | KIPToken | contract KIPToken{
// Public variables of the token
string public name = 'Khipu Token';
string public symbol = 'KIP';
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public initialSupply = 10000000000;
uint256 public totalSupply;... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balanceOf[_to]... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://64d093df5c2334ce5b58d6b9c58ca72fd5e8b0c49b56a403999ed977d1639afa | {
"func_code_index": [
1443,
2291
]
} | 1,713 | |||
KIPToken | KIPToken.sol | 0x64e65d352f6a2949463b3a7595911b61bbafc63e | Solidity | KIPToken | contract KIPToken{
// Public variables of the token
string public name = 'Khipu Token';
string public symbol = 'KIP';
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public initialSupply = 10000000000;
uint256 public totalSupply;... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://64d093df5c2334ce5b58d6b9c58ca72fd5e8b0c49b56a403999ed977d1639afa | {
"func_code_index": [
2497,
2609
]
} | 1,714 | |||
KIPToken | KIPToken.sol | 0x64e65d352f6a2949463b3a7595911b61bbafc63e | Solidity | KIPToken | contract KIPToken{
// Public variables of the token
string public name = 'Khipu Token';
string public symbol = 'KIP';
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public initialSupply = 10000000000;
uint256 public totalSupply;... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://64d093df5c2334ce5b58d6b9c58ca72fd5e8b0c49b56a403999ed977d1639afa | {
"func_code_index": [
2884,
3185
]
} | 1,715 | |||
KIPToken | KIPToken.sol | 0x64e65d352f6a2949463b3a7595911b61bbafc63e | Solidity | KIPToken | contract KIPToken{
// Public variables of the token
string public name = 'Khipu Token';
string public symbol = 'KIP';
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public initialSupply = 10000000000;
uint256 public totalSupply;... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://64d093df5c2334ce5b58d6b9c58ca72fd5e8b0c49b56a403999ed977d1639afa | {
"func_code_index": [
3449,
3625
]
} | 1,716 | |||
KIPToken | KIPToken.sol | 0x64e65d352f6a2949463b3a7595911b61bbafc63e | Solidity | KIPToken | contract KIPToken{
// Public variables of the token
string public name = 'Khipu Token';
string public symbol = 'KIP';
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public initialSupply = 10000000000;
uint256 public totalSupply;... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://64d093df5c2334ce5b58d6b9c58ca72fd5e8b0c49b56a403999ed977d1639afa | {
"func_code_index": [
4019,
4371
]
} | 1,717 | |||
KIPToken | KIPToken.sol | 0x64e65d352f6a2949463b3a7595911b61bbafc63e | Solidity | KIPToken | contract KIPToken{
// Public variables of the token
string public name = 'Khipu Token';
string public symbol = 'KIP';
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public initialSupply = 10000000000;
uint256 public totalSupply;... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender,... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://64d093df5c2334ce5b58d6b9c58ca72fd5e8b0c49b56a403999ed977d1639afa | {
"func_code_index": [
4541,
4920
]
} | 1,718 | |||
KIPToken | KIPToken.sol | 0x64e65d352f6a2949463b3a7595911b61bbafc63e | Solidity | KIPToken | contract KIPToken{
// Public variables of the token
string public name = 'Khipu Token';
string public symbol = 'KIP';
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public initialSupply = 10000000000;
uint256 public totalSupply;... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://64d093df5c2334ce5b58d6b9c58ca72fd5e8b0c49b56a403999ed977d1639afa | {
"func_code_index": [
5178,
5794
]
} | 1,719 | |||
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | ARKFinance | function ARKFinance () public {
symbol = "ARF";
name = "ARK Finance";
decimals = 18;
_totalSupply = 21000000000000000000000;
balances[0x139EB4EA5FCbfb4ddc425cFd9797F8E38CCf9585] = _totalSupply;
emit Transfer(address(0), 0x139EB4EA5FCbfb4ddc425cFd9797F8E38CCf9585, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
457,
801
]
} | 1,720 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
989,
1110
]
} | 1,721 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
1330,
1459
]
} | 1,722 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
1803,
2085
]
} | 1,723 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
2593,
2806
]
} | 1,724 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
3337,
3700
]
} | 1,725 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
3983,
4139
]
} | 1,726 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
4494,
4816
]
} | 1,727 |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
5008,
5067
]
} | 1,728 | |
ARKFinance | ARKFinance.sol | 0x46b24cf9159fc05b9060760ed4d5a18dd207346b | Solidity | ARKFinance | contract ARKFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://575b71c30a713b6584dbf03b7a76b5ba72eda90b6dbf3b26aad72b5f914785f6 | {
"func_code_index": [
5300,
5489
]
} | 1,729 |
GmStudioMindTheGap | contracts/utils/ERC2981SinglePercentual.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | ERC2981SinglePercentual | contract ERC2981SinglePercentual is ERC2981 {
/**
* @dev The royalty percentage (in units of 0.01%)
*/
uint96 _percentage;
/**
* @dev The address to receive the royalties
*/
address _receiver;
/**
* @dev See {IERC2981-royaltyInfo}.
*/
function royaltyInfo(uint256,... | /**
* @notice ERC2981 royalty info implementation for a single beneficiary
* receving a percentage of sales prices.
* @author David Huber (@cxkoda)
*/ | NatSpecMultiLine | royaltyInfo | function royaltyInfo(uint256, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
royaltyAmount = (salePrice / 10000) * _percentage;
receiver = _receiver;
}
| /**
* @dev See {IERC2981-royaltyInfo}.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
287,
545
]
} | 1,730 | |
GmStudioMindTheGap | contracts/utils/ERC2981SinglePercentual.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | ERC2981SinglePercentual | contract ERC2981SinglePercentual is ERC2981 {
/**
* @dev The royalty percentage (in units of 0.01%)
*/
uint96 _percentage;
/**
* @dev The address to receive the royalties
*/
address _receiver;
/**
* @dev See {IERC2981-royaltyInfo}.
*/
function royaltyInfo(uint256,... | /**
* @notice ERC2981 royalty info implementation for a single beneficiary
* receving a percentage of sales prices.
* @author David Huber (@cxkoda)
*/ | NatSpecMultiLine | _setRoyaltyPercentage | function _setRoyaltyPercentage(uint96 percentage_) internal {
_percentage = percentage_;
}
| /**
* @dev Sets the royalty percentage (in units of 0.01%)
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
623,
729
]
} | 1,731 | |
GmStudioMindTheGap | contracts/utils/ERC2981SinglePercentual.sol | 0x0e42ffbac75bcc30cd0015f8aaa608539ba35fbb | Solidity | ERC2981SinglePercentual | contract ERC2981SinglePercentual is ERC2981 {
/**
* @dev The royalty percentage (in units of 0.01%)
*/
uint96 _percentage;
/**
* @dev The address to receive the royalties
*/
address _receiver;
/**
* @dev See {IERC2981-royaltyInfo}.
*/
function royaltyInfo(uint256,... | /**
* @notice ERC2981 royalty info implementation for a single beneficiary
* receving a percentage of sales prices.
* @author David Huber (@cxkoda)
*/ | NatSpecMultiLine | _setRoyaltyReceiver | function _setRoyaltyReceiver(address receiver_) internal {
_receiver = receiver_;
}
| /**
* @dev Sets the address to receive the royalties
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | Unlicense | {
"func_code_index": [
801,
900
]
} | 1,732 | |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
938,
1286
]
} | 1,733 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner)
public
view
virtual
override
returns (uint256)
{
require(
owner != address(0),
"ERC721: balance query for the zero address"
);
return _balances[owner];
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
1341,
1628
]
} | 1,734 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
address owner = _owners[tokenId];
require(
owner != address(0),
"ERC721: owner query for nonexistent token"
);
return owner;
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
1681,
1998
]
} | 1,735 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
2056,
2158
]
} | 1,736 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
2218,
2324
]
} | 1,737 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(
_exists(tokenId),
"ERC721Metadata: URI query for nonexistent token"
);
string memory baseURI = _baseURI();
return
bytes(baseURI).length > 0
? string... | /**
* @dev See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
2386,
2841
]
} | 1,738 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _baseURI | function _baseURI() internal view virtual returns (string memory) {
return "";
}
| /**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
3078,
3174
]
} | 1,739 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor appro... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
3227,
3632
]
} | 1,740 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId)
public
view
virtual
override
returns (address)
{
require(
_exists(tokenId),
"ERC721: approved query for nonexistent token"
);
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
3689,
3988
]
} | 1,741 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool approved)
public
virtual
override
{
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
4051,
4373
]
} | 1,742 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
4435,
4645
]
} | 1,743 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(
_isApprovedOrOwner(_msgSender(), tokenId),
"ERC721: transfer caller is not owner nor approved"
);
_transfer(from, to, tokenId);
}... | /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
4703,
5071
]
} | 1,744 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
5133,
5316
]
} | 1,745 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(
_isApprovedOrOwner(_msgSender(), tokenId),
"ERC721: transfer caller is not owner nor approved"
);
_safeTransfer(from, to, tokenId, _data);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
5378,
5736
]
} | 1,746 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _safeTransfer | function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(
_checkOnERC721Received(from, to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivale... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
6594,
6939
]
} | 1,747 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _exists | function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
| /**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
7238,
7367
]
} | 1,748 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _isApprovedOrOwner | function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
virtual
returns (bool)
{
require(
_exists(tokenId),
"ERC721: operator query for nonexistent token"
);
address owner = ERC721.ownerOf(tokenId);
return (spender == owner ||
getApproved(token... | /**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
7521,
7963
]
} | 1,749 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
8289,
8401
]
} | 1,750 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _safeMint | function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
| /**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
8618,
8933
]
} | 1,751 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(add... | /**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
9251,
9627
]
} | 1,752 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
| /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
9840,
10192
]
} | 1,753 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(
ERC721.ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, token... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
10512,
11110
]
} | 1,754 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
11217,
11392
]
} | 1,755 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try
IERC721Receiver(to).onERC721Received(
_msgSender(),
from,
tokenId,
... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
11941,
12895
]
} | 1,756 |
SacredPsy | ERC721.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
13447,
13573
]
} | 1,757 |
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
90,
149
]
} | 1,758 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
228,
300
]
} | 1,759 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
516,
597
]
} | 1,760 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
868,
955
]
} | 1,761 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* tra... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1604,
1682
]
} | 1,762 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1985,
2086
]
} | 1,763 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
248,
428
]
} | 1,764 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
695,
833
]
} | 1,765 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | 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.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1120,
1311
]
} | 1,766 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1554,
2017
]
} | 1,767 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | 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 revert (co... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2475,
2609
]
} | 1,768 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | NatSpecMultiLine | 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 invalid ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3087,
3363
]
} | 1,769 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | 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 (consuming all... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3810,
3942
]
} | 1,770 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 language... | 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 opcode to r... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4409,
4576
]
} | 1,771 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 return fa... | /**
* @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 codehash;
... | /**
* @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 | {
"func_code_index": [
588,
1202
]
} | 1,772 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: una... | /**
* @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 `transfer... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2115,
2510
]
} | 1,773 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3247,
3422
]
} | 1,774 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3640,
3838
]
} | 1,775 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4196,
4424
]
} | 1,776 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4668,
4985
]
} | 1,777 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address fro... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using ... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
728,
1345
]
} | 1,778 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address fro... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using ... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target addre... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.enc... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2347,
3102
]
} | 1,779 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
883,
1291
]
} | 1,780 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from t... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1455,
2971
]
} | 1,781 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3048,
3179
]
} | 1,782 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3256,
3367
]
} | 1,783 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3695,
3900
]
} | 1,784 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4136,
4281
]
} | 1,785 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4445,
4596
]
} | 1,786 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4673,
4833
]
} | 1,787 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4910,
5029
]
} | 1,788 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5357,
5508
]
} | 1,789 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5739,
5872
]
} | 1,790 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6036,
6175
]
} | 1,791 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6252,
6400
]
} | 1,792 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6477,
6593
]
} | 1,793 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6921,
7060
]
} | 1,794 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 = _msgSender();
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* ... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
480,
561
]
} | 1,795 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 = _msgSender();
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* ... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
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 | {
"func_code_index": [
1103,
1252
]
} | 1,796 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | 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 = _msgSender();
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* ... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
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 | {
"func_code_index": [
1397,
1641
]
} | 1,797 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
870,
955
]
} | 1,798 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1064,
1153
]
} | 1,799 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the v... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1772,
1857
]
} | 1,800 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1913,
2015
]
} | 1,801 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2069,
2190
]
} | 1,802 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2389,
2565
]
} | 1,803 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2619,
2772
]
} | 1,804 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2906,
3076
]
} | 1,805 | ||
Tyrannosaurus | Tyrannosaurus.sol | 0x1d9d8f5baaec9de053ce34b5933a7a59ee422d5a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3532,
3853
]
} | 1,806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.