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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Migrator | contracts/utils/SafeMath.sol | 0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6 | 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.7.4+commit.3f05b770 | {
"func_code_index": [
1554,
2017
]
} | 16,200 | ||
Migrator | contracts/utils/SafeMath.sol | 0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6 | 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.7.4+commit.3f05b770 | {
"func_code_index": [
2475,
2609
]
} | 16,201 | ||
Migrator | contracts/utils/SafeMath.sol | 0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6 | 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.7.4+commit.3f05b770 | {
"func_code_index": [
3087,
3363
]
} | 16,202 | ||
Migrator | contracts/utils/SafeMath.sol | 0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6 | 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.7.4+commit.3f05b770 | {
"func_code_index": [
3810,
3942
]
} | 16,203 | ||
Migrator | contracts/utils/SafeMath.sol | 0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6 | 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.7.4+commit.3f05b770 | {
"func_code_index": [
4409,
4576
]
} | 16,204 | ||
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | ExtendedMath | library ExtendedMath {
//return the smaller of the two inputs (a or b)
function limitLessThan(uint a, uint b) internal pure returns (uint c) {
if(a > b) return b;
return a;
}
} | limitLessThan | function limitLessThan(uint a, uint b) internal pure returns (uint c) {
if(a > b) return b;
return a;
}
| //return the smaller of the two inputs (a or b) | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
79,
216
]
} | 16,205 | |||
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | _0xDiaryToken | function _0xDiaryToken() public onlyOwner{
symbol = "0xDIARY";
name = "The 0xDiary Token";
decimals = 8;
_totalSupply = 1000000 * 10**uint(decimals);
if(locked) revert();
locked = true;
tokensMinted = 0;
rewardEra = 0;
maxSupplyForEra = _totalSupply.div(2);
... | // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
1458,
2126
]
} | 16,206 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | _startNewMiningEpoch | function _startNewMiningEpoch() internal {
//if max supply for the era will be exceeded next reward round then enter the new era before that happens
//3 is the final reward era, almost all tokens minted
//once the final era is reached, more tokens will not be given out because the assert function
if( to... | //a new 'block' to be mined | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
3670,
4847
]
} | 16,207 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | _reAdjustDifficulty | function _reAdjustDifficulty() internal {
uint ethBlocksSinceLastDifficultyPeriod = block.number - latestDifficultyPeriodStarted;
//assume 360 ethereum blocks per hour
//we want miners to spend 2 minutes to mine each 'block', about 12 ethereum blocks = one 0xdiary epoch
uint epochs... | //https://en.bitcoin.it/wiki/Difficulty#What_is_the_formula_for_difficulty.3F
//as of 2017 the bitcoin difficulty was up to 17 zeroes, it was only 8 in the early days
//readjust the target by 5 percent | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
5069,
6960
]
} | 16,208 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | getChallengeNumber | function getChallengeNumber() public constant returns (bytes32) {
return challengeNumber;
}
| //this is a recent ethereum block hash, used to prevent pre-mining future blocks | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
7049,
7159
]
} | 16,209 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | getMiningDifficulty | function getMiningDifficulty() public constant returns (uint) {
return _MAXIMUM_TARGET.div(miningTarget);
| //the number of zeroes the digest of the PoW solution requires. Auto adjusts | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
7245,
7372
]
} | 16,210 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | getMiningReward | function getMiningReward() public constant returns (uint) {
//once we get half way thru the coins, only get 2 per block
//every reward era, the reward amount halves.
return (4 * 10**uint(decimals) ).div( 2**rewardEra ) ;
}
| //1m pieces total
//reward begins at 4 and is cut in half every reward era (as tokens are mined) | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
7584,
7851
]
} | 16,211 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | getMintDigest | function getMintDigest(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number) public view returns (bytes32 digesttest) {
bytes32 digest = keccak256(challenge_number,msg.sender,nonce);
return digest;
}
| //help debug mining software | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
7888,
8136
]
} | 16,212 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | checkMintSolution | function checkMintSolution(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number, uint testTarget) public view returns (bool success) {
bytes32 digest = keccak256(challenge_number,msg.sender,nonce);
if(uint256(digest) > testTarget) revert();
return (digest == challenge_digest);
}
| //help debug mining software | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
8177,
8526
]
} | 16,213 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
8714,
8839
]
} | 16,214 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
9061,
9194
]
} | 16,215 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
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.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
9540,
9817
]
} | 16,216 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
10328,
10544
]
} | 16,217 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
Transfer(from, to, tokens);
return true... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
11082,
11437
]
} | 16,218 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | 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.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
11720,
11880
]
} | 16,219 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
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.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
12243,
12570
]
} | 16,220 | |
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
12762,
12825
]
} | 16,221 | ||
_0xDiaryToken | _0xDiaryToken.sol | 0x6056247d57fbf1e7d2ca01b9b2ac03a12061221b | Solidity | _0xDiaryToken | contract _0xDiaryToken is ERC20Interface, Owned {
using SafeMath for uint;
using ExtendedMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public latestDifficultyPeriodStarted;
uint public epochCount;//nu... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://e334367994996a6544b39bdacf62389fbe1c10bda1ed2b9cdc031b82d097c7fb | {
"func_code_index": [
13058,
13251
]
} | 16,222 | |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC165 | interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This f... | /**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
374,
455
]
} | 16,223 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
986,
1065
]
} | 16,224 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
1211,
1288
]
} | 16,225 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
2000,
2117
]
} | 16,226 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If th... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
2643,
2756
]
} | 16,227 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) external;
| /**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
3229,
3289
]
} | 16,228 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId)
external
view
returns (address operator);
| /**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
3443,
3554
]
} | 16,229 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool _approved) external;
| /**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
3881,
3956
]
} | 16,230 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator)
external
view
returns (bool);
| /**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
4107,
4227
]
} | 16,231 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
/**
* @dev Emitted when `owner` enables `approved` to mana... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {appro... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
4804,
4951
]
} | 16,232 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721Receiver | interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other valu... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
528,
698
]
} | 16,233 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the token collection name.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
106,
165
]
} | 16,234 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the token collection symbol.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
236,
297
]
} | 16,235 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) external view returns (string memory);
| /**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
398,
476
]
} | 16,236 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
94,
154
]
} | 16,237 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
237,
310
]
} | 16,238 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | 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.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
534,
634
]
} | 16,239 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | 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.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
913,
1028
]
} | 16,240 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
1692,
1771
]
} | 16,241 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | 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.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
2084,
2220
]
} | 16,242 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
... | /**
* @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.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
606,
998
]
} | 16,243 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
(bool success, ) = recipient.call{value: amount}("");
require(
success,
"Address: unable to send value, recipien... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
1928,
2324
]
} | 16,244 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
3081,
3284
]
} | 16,245 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
3509,
3743
]
} | 16,246 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
4113,
4474
]
} | 16,247 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
require(isContract(target), "Address... | /**
* @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.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
4725,
5301
]
} | 16,248 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
5481,
5796
]
} | 16,249 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallRe... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
5983,
6383
]
} | 16,250 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionDelegateCall | function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return
functionDelegateCall(
target,
data,
"Address: low-level delegate call failed"
);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
6565,
6872
]
} | 16,251 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionDelegateCall | function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
7061,
7462
]
} | 16,252 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | verifyCallResult | function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
... | /**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
7685,
8402
]
} | 16,253 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
184,
912
]
} | 16,254 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
1017,
1362
]
} | 16,255 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
1485,
1973
]
} | 16,256 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ERC165 | abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
return interfaceId == type(IERC165).interfaceId;
}
} | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interface... | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
return interfaceId == type(IERC165).interfaceId;
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
103,
315
]
} | 16,257 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Pausable | abstract contract Pausable is Context, Ownable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
bo... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | paused | function paused() public view virtual returns (bool) {
return _paused;
}
| /**
* @dev Returns true if the contract is paused, and false otherwise.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
670,
761
]
} | 16,258 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Pausable | abstract contract Pausable is Context, Ownable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
bo... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | _pause | function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
| /**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
2214,
2337
]
} | 16,259 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | Pausable | abstract contract Pausable is Context, Ownable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
bo... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | _unpause | function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
| /**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
2473,
2598
]
} | 16,260 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | tryRecover | function tryRecover(bytes32 hash, bytes memory signature)
internal
pure
returns (address, RecoverError)
{
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signa... | /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lo... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
1913,
3258
]
} | 16,261 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | recover | function recover(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
| /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half ord... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
4055,
4323
]
} | 16,262 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | tryRecover | function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(
vs,
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
)
v := add(shr(25... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
4581,
5026
]
} | 16,263 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | recover | function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
| /**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
5193,
5458
]
} | 16,264 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | tryRecover | function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ether... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
5635,
7306
]
} | 16,265 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | recover | function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
| /**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
7440,
7724
]
} | 16,266 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | toEthSignedMessageHash | function toEthSignedMessageHash(bytes32 hash)
internal
pure
returns (bytes32)
{
// 32 is the length in bytes of hash,
// enforced by the type signature above
return
keccak256(
abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
);
}
| /**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
8019,
8370
]
} | 16,267 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | toEthSignedMessageHash | function toEthSignedMessageHash(bytes memory s)
internal
pure
returns (bytes32)
{
return
keccak256(
abi.encodePacked(
"\x19Ethereum Signed Message:\n",
Strings.toString(s.length),
s
)
);
}
| /**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
8660,
9022
]
} | 16,268 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | toTypedDataHash | function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash)
internal
pure
returns (bytes32)
{
return
keccak256(
abi.encodePacked("\x19\x01", domainSeparator, structHash)
);
}
| /**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
9367,
9645
]
} | 16,269 |
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | 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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
13246,
13606
]
} | 16,270 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | balanceOf | function balanceOf(address owner)
public
view
virtual
override
returns (uint256)
{
require(owner != address(0), "ERC721: zero address");
return _balances[owner];
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
13665,
13906
]
} | 16,271 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | ownerOf | function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: nonexistent token");
return owner;
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
13963,
14241
]
} | 16,272 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
14303,
14408
]
} | 16,273 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
14472,
14581
]
} | 16,274 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | tokenURI | function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(_exists(tokenId), "ERC721Metadata: nonexistent token");
string memory baseURI = _baseURI();
return
bytes(baseURI).length > 0
? string(abi.encodePacked(baseUR... | /**
* @dev See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
14647,
15069
]
} | 16,275 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _baseURI | function _baseURI() internal view virtual returns (string memory) {
return _metadataURI;
}
| /**
* @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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
15312,
15421
]
} | 16,276 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | approve | function approve(address to, uint256 tokenId) public virtual override {
address owner = ArtAI.ownerOf(tokenId);
require(to != owner, "ERC721: current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
15478,
15881
]
} | 16,277 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | getApproved | function getApproved(uint256 tokenId)
public
view
virtual
override
returns (address)
{
require(_exists(tokenId), "ERC721: nonexistent token");
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
15942,
16199
]
} | 16,278 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | 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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
16266,
16598
]
} | 16,279 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | isApprovedForAll | function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
16664,
16883
]
} | 16,280 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(
_isApprovedOrOwner(_msgSender(), tokenId),
"ERC721: not owner nor approved"
);
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
16945,
17307
]
} | 16,281 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
17373,
17563
]
} | 16,282 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(
_isApprovedOrOwner(_msgSender(), tokenId),
"ERC721: not owner nor approved"
);
_safeTransfer(from, to, tokenId, _data);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
17629,
17980
]
} | 16,283 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _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: 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 eq... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
18857,
19202
]
} | 16,284 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
19510,
19642
]
} | 16,285 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _isApprovedOrOwner | function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
virtual
returns (bool)
{
require(_exists(tokenId), "ERC721: nonexistent token");
address owner = ArtAI.ownerOf(tokenId);
return (spender == owner ||
getApproved(tokenId) == spender ||
isAppr... | /**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
19804,
20204
]
} | 16,286 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
20541,
20656
]
} | 16,287 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _safeMint | function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: 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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
20878,
21192
]
} | 16,288 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
_tokenSupply += 1;
... | /**
* @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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
21523,
21926
]
} | 16,289 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ArtAI.ownerOf(tokenId) == from, "ERC721: not own");
require(to != address(0), "ERC721: zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
... | /**
* @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.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
22258,
22798
]
} | 16,290 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ArtAI.ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
22911,
23089
]
} | 16,291 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _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 to... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
23649,
24574
]
} | 16,292 | ||
ArtAI | ArtAI.sol | 0xbf0f9180325d2606765c8fc60566810830b897b0 | Solidity | ArtAI | contract ArtAI is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
/**
* @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
... | _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, ``... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://2ffcd6eddbef9504bd86c5f9489b1103c50eec240578f32ee63d5c2e108e05c4 | {
"func_code_index": [
25141,
25272
]
} | 16,293 | ||
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: http... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256... | /**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
100,
496
]
} | 16,294 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: http... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
620,
904
]
} | 16,295 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: http... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
1031,
1170
]
} | 16,296 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: http... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
| /**
* @dev Adds two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
1247,
1386
]
} | 16,297 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: http... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
1534,
1651
]
} | 16,298 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
281,
369
]
} | 16,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.