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
WtaERC20
WtaERC20.sol
0xa580853c469fa5edaaf59acc69ef0cacde325af5
Solidity
WtaERC20
contract WtaERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://d1ded5cf3702362f8ed90ec229935e9c0b8013b5caf5b0a2e5db56cd2fb2f2a4
{ "func_code_index": [ 4036, 4388 ] }
24,900
WtaERC20
WtaERC20.sol
0xa580853c469fa5edaaf59acc69ef0cacde325af5
Solidity
WtaERC20
contract WtaERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender,...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://d1ded5cf3702362f8ed90ec229935e9c0b8013b5caf5b0a2e5db56cd2fb2f2a4
{ "func_code_index": [ 4558, 4937 ] }
24,901
WtaERC20
WtaERC20.sol
0xa580853c469fa5edaaf59acc69ef0cacde325af5
Solidity
WtaERC20
contract WtaERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://d1ded5cf3702362f8ed90ec229935e9c0b8013b5caf5b0a2e5db56cd2fb2f2a4
{ "func_code_index": [ 5195, 5811 ] }
24,902
CRPFactory
contracts/IBFactory.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
IBPool
interface IBPool { function rebind(address token, uint balance, uint denorm) external; function setSwapFee(uint swapFee) external; function setPublicSwap(bool publicSwap) external; function bind(address token, uint balance, uint denorm) external; function unbind(address token) external; function...
EXIT_FEE
function EXIT_FEE() external view returns (uint);
// solhint-disable-next-line func-name-mixedcase
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 861, 914 ] }
24,903
CRPFactory
interfaces/IERC20.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
IERC20
interface IERC20 { // Emitted when the allowance of a spender for an owner is set by a call to approve. // Value is the new allowance event Approval(address indexed owner, address indexed spender, uint value); // Emitted when value tokens are moved from one account (from) to another (to). // Note t...
/* solhint-disable func-order */
Comment
totalSupply
function totalSupply() external view returns (uint);
// Returns the amount of tokens in existence
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 466, 522 ] }
24,904
CRPFactory
interfaces/IERC20.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
IERC20
interface IERC20 { // Emitted when the allowance of a spender for an owner is set by a call to approve. // Value is the new allowance event Approval(address indexed owner, address indexed spender, uint value); // Emitted when value tokens are moved from one account (from) to another (to). // Note t...
/* solhint-disable func-order */
Comment
balanceOf
function balanceOf(address account) external view returns (uint);
// Returns the amount of tokens owned by account
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 577, 646 ] }
24,905
CRPFactory
interfaces/IERC20.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
IERC20
interface IERC20 { // Emitted when the allowance of a spender for an owner is set by a call to approve. // Value is the new allowance event Approval(address indexed owner, address indexed spender, uint value); // Emitted when value tokens are moved from one account (from) to another (to). // Note t...
/* solhint-disable func-order */
Comment
allowance
function allowance(address owner, address spender) external view returns (uint);
// 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
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 870, 954 ] }
24,906
CRPFactory
interfaces/IERC20.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
IERC20
interface IERC20 { // Emitted when the allowance of a spender for an owner is set by a call to approve. // Value is the new allowance event Approval(address indexed owner, address indexed spender, uint value); // Emitted when value tokens are moved from one account (from) to another (to). // Note t...
/* solhint-disable func-order */
Comment
approve
function approve(address spender, uint amount) external returns (bool);
// Sets amount as the allowance of spender over the caller’s tokens // Returns a boolean value indicating whether the operation succeeded // Emits an Approval event.
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 1134, 1209 ] }
24,907
CRPFactory
interfaces/IERC20.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
IERC20
interface IERC20 { // Emitted when the allowance of a spender for an owner is set by a call to approve. // Value is the new allowance event Approval(address indexed owner, address indexed spender, uint value); // Emitted when value tokens are moved from one account (from) to another (to). // Note t...
/* solhint-disable func-order */
Comment
transfer
function transfer(address recipient, uint amount) external returns (bool);
// Moves amount tokens from the caller’s account to recipient // Returns a boolean value indicating whether the operation succeeded // Emits a Transfer event.
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 1382, 1460 ] }
24,908
CRPFactory
interfaces/IERC20.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
IERC20
interface IERC20 { // Emitted when the allowance of a spender for an owner is set by a call to approve. // Value is the new allowance event Approval(address indexed owner, address indexed spender, uint value); // Emitted when value tokens are moved from one account (from) to another (to). // Note t...
/* solhint-disable func-order */
Comment
transferFrom
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
// 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
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 1707, 1805 ] }
24,909
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 100, 159 ] }
24,910
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 226, 287 ] }
24,911
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the decimals places of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 363, 418 ] }
24,912
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 776, 881 ] }
24,913
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 995, 1104 ] }
24,914
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
decimals
function decimals() public view virtual override returns (uint8) { return 18; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 1738, 1836 ] }
24,915
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 1896, 2009 ] }
24,916
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 2067, 2199 ] }
24,917
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 2407, 2587 ] }
24,918
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 2645, 2801 ] }
24,919
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 2943, 3117 ] }
24,920
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds all...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 3594, 4091 ] }
24,921
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 4495, 4715 ] }
24,922
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, c...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 5213, 5631 ] }
24,923
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
_transfer
function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); ...
/** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 6116, 6854 ] }
24,924
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 7136, 7540 ] }
24,925
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 7868, 8464 ] }
24,926
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
_approve
function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(own...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 8897, 9282 ] }
24,927
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - wh...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 9877, 10007 ] }
24,928
ERC20PresetFixedSupply
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
0xcdf8daae4de9c44b8da3b1e20f4767afe9ba8ebf
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
_afterTokenTransfer
function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - ...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://0f1746466fd047f954c3f8360c951f9bfcd1c18c09f71138a665bd2cfe61eb28
{ "func_code_index": [ 10606, 10735 ] }
24,929
CRPFactory
libraries/SafeApprove.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
SafeApprove
library SafeApprove { /** * @notice handle approvals of tokens that require approving from a base of 0 * @param token - the token we're approving * @param spender - entity the owner (sender) is approving to spend his tokens * @param amount - number of tokens being approved */ function s...
/** * @author PieDAO (ported to Balancer Labs) * @title SafeApprove - set approval for tokens that require 0 prior approval * @dev Perhaps to address the known ERC20 race condition issue * See https://github.com/crytic/not-so-smart-contracts/tree/master/race_condition * Some tokens - notably KNC - only a...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20 token, address spender, uint amount) internal returns (bool) { uint currentAllowance = token.allowance(address(this), spender); // Do nothing if allowance is already set to this value if(currentAllowance == amount) { return true; } // If approval is not zero res...
/** * @notice handle approvals of tokens that require approving from a base of 0 * @param token - the token we're approving * @param spender - entity the owner (sender) is approving to spend his tokens * @param amount - number of tokens being approved */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 306, 853 ] }
24,930
CRPFactory
contracts/Migrations.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
Migrations
contract Migrations { address public owner; uint public lastCompletedMigration; constructor() public { owner = msg.sender; } modifier restricted() { if (msg.sender == owner) _; } /** * @notice set lastCompletedMigration variable * @param completed - id of the desired migration level */...
setCompleted
function setCompleted(uint completed) external restricted { lastCompletedMigration = completed; }
/** * @notice set lastCompletedMigration variable * @param completed - id of the desired migration level */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 321, 426 ] }
24,931
CRPFactory
contracts/CRPFactory.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
CRPFactory
contract CRPFactory { // State variables // Keep a list of all Configurable Rights Pools mapping(address=>bool) private _isCrp; // Event declarations // Log the address of each new smart pool, and its creator event LogNewCrp( address indexed caller, address indexed pool );...
/** * @author Balancer Labs * @title Configurable Rights Pool Factory - create parameterized smart pools * @dev Rights are held in a corresponding struct in ConfigurableRightsPool * Index values are as follows: * 0: canPauseSwapping - can setPublicSwap back to false after turning it on * ...
NatSpecMultiLine
newCrp
function newCrp( address factoryAddress, ConfigurableRightsPool.PoolParams calldata poolParams, RightsManager.Rights calldata rights ) external returns (ConfigurableRightsPool) { require(poolParams.constituentTokens.length >= BalancerConstants.MIN_ASSET_LIMIT, "ERR_TOO_FEW_TOKENS"); // Arra...
/** * @notice Create a new CRP * @dev emits a LogNewCRP event * @param factoryAddress - the BFactory instance used to create the underlying pool * @param poolParams - struct containing the names, tokens, weights, balances, and swap fee * @param rights - struct of permissions, configuring this CRP instance (see abo...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 724, 1766 ] }
24,932
CRPFactory
contracts/CRPFactory.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
CRPFactory
contract CRPFactory { // State variables // Keep a list of all Configurable Rights Pools mapping(address=>bool) private _isCrp; // Event declarations // Log the address of each new smart pool, and its creator event LogNewCrp( address indexed caller, address indexed pool );...
/** * @author Balancer Labs * @title Configurable Rights Pool Factory - create parameterized smart pools * @dev Rights are held in a corresponding struct in ConfigurableRightsPool * Index values are as follows: * 0: canPauseSwapping - can setPublicSwap back to false after turning it on * ...
NatSpecMultiLine
isCrp
function isCrp(address addr) external view returns (bool) { return _isCrp[addr]; }
/** * @notice Check to see if a given address is a CRP * @param addr - address to check * @return boolean indicating whether it is a CRP */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1932, 2030 ] }
24,933
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } /** * @dev Integer division...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; }
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 90, 285 ] }
24,934
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } /** * @dev Integer division...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b > 0); uint256 c = _a / _b; return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 397, 541 ] }
24,935
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } /** * @dev Integer division...
/** * @title SafeMath * @dev 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 numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 656, 801 ] }
24,936
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } /** * @dev Integer division...
/** * @title SafeMath * @dev 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 numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 866, 1010 ] }
24,937
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } /** * @dev Integer division...
/** * @title SafeMath * @dev 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 numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 1145, 1262 ] }
24,938
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onl...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner)public onlyOwner { require(newOwner != address(0)); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 543, 674 ] }
24,939
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 2090, 2178 ] }
24,940
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances_[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 2384, 2489 ] }
24,941
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed_[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 2813, 2979 ] }
24,942
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(!frozenAccount[msg.sender]); require(_value <= balances_[msg.sender]); require(_to != address(0)); balances_[msg.sender] = balances_[msg.sender].sub(_value); balances_[_to] = balances_[_to].add(_value); emit Transfer(msg....
/** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 3137, 3516 ] }
24,943
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed_[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 4142, 4338 ] }
24,944
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_value <= balances_[_from]); require(_value <= allowed_[_from][msg.sender]); require(_to != address(0)); require(!frozenAccount[_from]); balances_[_from] = balances_[_from].sub(_value)...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 4618, 5155 ] }
24,945
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed_[msg.sender][_spender] = ( allowed_[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed_[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 5616, 5929 ] }
24,946
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
decreaseApproval
function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed_[msg.sender][_spender]; if (_subtractedValue >= oldValue) { allowed_[msg.sender][_spender] = 0; } else { allowed_[msg.sender][_spender] = oldValue.sub(_subtractedVa...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 6395, 6849 ] }
24,947
SecuryptoToken
SecuryptoToken.sol
0x2ed92cae08b7e24d7c01a11049750498ebcae8e0
Solidity
SecuryptoToken
contract SecuryptoToken is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balances_; mapping (address => mapping (address => uint256)) private allowed_; mapping (address => bool) private frozenAccount; uint256 private totalSupply_; event FrozenFunds( ...
/** * @title AdvanceToken ERC20 token */
NatSpecMultiLine
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); }
/** * @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens * @param target Address to be frozen * @param freeze either to freeze it or not */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://43e9f32f6b38e6cdf139451545c7f1a87b55bd28272f4f0969bbf91e34cc5de8
{ "func_code_index": [ 7048, 7214 ] }
24,948
CRPFactory
contracts/templates/ESPFactory.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
ESPFactory
contract ESPFactory { // State variables // Keep a list of all Elastic Supply Pools mapping(address => bool) private _isEsp; // Event declarations // Log the address of each new smart pool, and its creator event LogNewEsp( address indexed caller, address indexed pool ); ...
/** * @author Balancer Labs * @title Configurable Rights Pool Factory - create parameterized smart pools * @dev Rights are held in a corresponding struct in ConfigurableRightsPool * Index values are as follows: * 0: canPauseSwapping - can setPublicSwap back to false after turning it on * ...
NatSpecMultiLine
newEsp
function newEsp( address factoryAddress, ConfigurableRightsPool.PoolParams calldata poolParams, RightsManager.Rights calldata rights ) external returns (ElasticSupplyPool) { require(poolParams.constituentTokens.length >= BalancerConstants.MIN_ASSET_LIMIT, "ERR_TOO_FEW_TOKENS"); // Arrays mu...
/** * @notice Create a new ESP * @dev emits a LogNewESP event * @param factoryAddress - the BFactory instance used to create the underlying pool * @param poolParams - CRP pool parameters * @param rights - struct of permissions, configuring this CRP instance (see above for definitions) */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 672, 1577 ] }
24,949
CRPFactory
contracts/templates/ESPFactory.sol
0xed52d8e202401645edad1c0aa21e872498ce47d0
Solidity
ESPFactory
contract ESPFactory { // State variables // Keep a list of all Elastic Supply Pools mapping(address => bool) private _isEsp; // Event declarations // Log the address of each new smart pool, and its creator event LogNewEsp( address indexed caller, address indexed pool ); ...
/** * @author Balancer Labs * @title Configurable Rights Pool Factory - create parameterized smart pools * @dev Rights are held in a corresponding struct in ConfigurableRightsPool * Index values are as follows: * 0: canPauseSwapping - can setPublicSwap back to false after turning it on * ...
NatSpecMultiLine
isEsp
function isEsp(address addr) external view returns (bool) { return _isEsp[addr]; }
/** * @notice Check to see if a given address is an ESP * @param addr - address to check * @return boolean indicating whether it is an ESP */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1745, 1843 ] }
24,950
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 971, 1281 ] }
24,951
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1340, 1553 ] }
24,952
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1610, 1854 ] }
24,953
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev See {IERC721Metadata-name}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1916, 2021 ] }
24,954
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev See {IERC721Metadata-symbol}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 2085, 2194 ] }
24,955
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 2260, 2599 ] }
24,956
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return ""; }
/** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 2842, 2941 ] }
24,957
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 2998, 3414 ] }
24,958
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 3475, 3701 ] }
24,959
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 3768, 4068 ] }
24,960
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev See {IERC721-isApprovedForAll}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 4134, 4303 ] }
24,961
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 4365, 4709 ] }
24,962
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 4775, 4965 ] }
24,963
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 5031, 5364 ] }
24,964
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeTransfer
function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is eq...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 6241, 6561 ] }
24,965
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); }
/** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 6869, 7001 ] }
24,966
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, s...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 7163, 7516 ] }
24,967
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 7853, 7968 ] }
24,968
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); }
/** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 8190, 8516 ] }
24,969
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Tra...
/** * @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.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 8847, 9234 ] }
24,970
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), toke...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 9458, 9823 ] }
24,971
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_transfer
function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); //...
/** * @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.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 10155, 10738 ] }
24,972
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 10851, 11030 ] }
24,973
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721...
/** * @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.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 11590, 12398 ] }
24,974
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {}
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 12965, 13096 ] }
24,975
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 605, 834 ] }
24,976
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 913, 1174 ] }
24,977
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1245, 1363 ] }
24,978
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1435, 1673 ] }
24,979
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnume...
/** * @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.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 2281, 2875 ] }
24,980
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; }
/** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 3171, 3397 ] }
24,981
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToAllTokensEnumeration
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); }
/** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 3593, 3762 ] }
24,982
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 ...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes)....
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 4384, 5377 ] }
24,983
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 5667, 6751 ] }
24,984
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721URIStorage
abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (stri...
/** * @dev ERC721 token with storage based token URI management. */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token U...
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 239, 923 ] }
24,985
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721URIStorage
abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (stri...
/** * @dev ERC721 token with storage based token URI management. */
NatSpecMultiLine
_setTokenURI
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; }
/** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1074, 1296 ] }
24,986
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
ERC721URIStorage
abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (stri...
/** * @dev ERC721 token with storage based token URI management. */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } }
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1520, 1731 ] }
24,987
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
SodaPassNFT
contract SodaPassNFT is ERC721, ERC721Enumerable,ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; uint16 public constant maxSupply = 5100; string private _baseTokenURI; uint256 public _startDate = 1634850000000; uint256 public ...
getCurrentMintLimit
function getCurrentMintLimit() public view returns (uint8) { return block.timestamp >= _startDate ? 20 : 4; }
// Get minting limit (for a single transaction) based on current token supply
LineComment
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 1822, 1950 ] }
24,988
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
SodaPassNFT
contract SodaPassNFT is ERC721, ERC721Enumerable,ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; uint16 public constant maxSupply = 5100; string private _baseTokenURI; uint256 public _startDate = 1634850000000; uint256 public ...
getCurrentPrice
function getCurrentPrice() public pure returns (uint64) { return 100_000_000_000_000_000; }
// Get ether price based on current token supply
LineComment
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 2007, 2117 ] }
24,989
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
SodaPassNFT
contract SodaPassNFT is ERC721, ERC721Enumerable,ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; uint16 public constant maxSupply = 5100; string private _baseTokenURI; uint256 public _startDate = 1634850000000; uint256 public ...
mint
function mint(uint8 _quantityToMint) public payable { require(_startDate <= block.timestamp || (block.timestamp >= _whitelistStartDate && _whitelisted[msg.sender] == true), block.timestamp <= _whitelistStartDate ? "Sale is not open" : "Not whitelisted"); require(_quantityToMint >= 1, "Must mint at least 1"); ...
// Mint new token(s)
LineComment
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 2394, 3578 ] }
24,990
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
SodaPassNFT
contract SodaPassNFT is ERC721, ERC721Enumerable,ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; uint16 public constant maxSupply = 5100; string private _baseTokenURI; uint256 public _startDate = 1634850000000; uint256 public ...
withdraw
function withdraw() public onlyOwner { require(address(this).balance > 0, "Balance must be positive"); uint256 _balance = address(this).balance; address _coldWallet = 0x9781F65af8324b40Ee9Ca421ea963642Bc8a8C2b; payable(_coldWallet).transfer((_balance * 9)/10); address _devWa...
// Withdraw ether from contract
LineComment
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 3826, 4286 ] }
24,991
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
Viento
contract Viento is ERC721, ERC721Enumerable,ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter public _tokenIds; uint16 public constant maxSupply = 1052; string private _baseTokenURI; uint256 public _startDate; // start uint256 public _next48hour ...
mint
function mint(uint8 _quantityToMint) public payable { delete idTOKENs; require(_quantityToMint <= 10, 'can mint only 10 max at a time'); require((_quantityToMint + totalSupply()) <= maxSupply,"Exceeds maximum supply"); require(sale_started == true,"Sale Not Started"); //...
// Mint new token(s)
LineComment
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 3248, 6065 ] }
24,992
Viento
@openzeppelin/contracts/token/ERC721/ERC721.sol
0x8b88bb4a9e0b59b7128ddb69ae04f280d6a568a9
Solidity
Viento
contract Viento is ERC721, ERC721Enumerable,ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter public _tokenIds; uint16 public constant maxSupply = 1052; string private _baseTokenURI; uint256 public _startDate; // start uint256 public _next48hour ...
withdraw
function withdraw() public onlyOwner { require(address(this).balance > 0, "Balance must be positive"); uint256 _balance = address(this).balance; address _coldWallet = 0x344fbA0aBEa40E22d536FD023Dd514757ee98FD1; payable(_coldWallet).transfer((_balance * 7)/10); address _devWa...
// Withdraw ether from contract
LineComment
v0.8.3+commit.8d00100c
None
ipfs://41f060275aeb583df00924d45b25adff4ebfd971015fbf8946e663f4dd72548f
{ "func_code_index": [ 6426, 7032 ] }
24,993
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
buyAndSetDivPercentage
function buyAndSetDivPercentage(address _referredBy, uint8 _divChoice, string providedUnhashedPass) public payable returns (uint) { require(icoPhase || regularPhase); if (icoPhase) { // Anti-bot measures - not perfect, but should help some. bytes32 hashedProvidedPass = keccak256(providedUnhashe...
/** * Same as buy, but explicitly sets your dividend percentage. * If this has been called before, it will update your `default' dividend * percentage for regular buy transactions going forward. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 5565, 6676 ] }
24,994
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
buy
function buy(address _referredBy) public payable returns(uint) { require(regularPhase); address _customerAddress = msg.sender; require (userSelectedRate[_customerAddress]); purchaseTokens(msg.value, _referredBy); }
// All buys except for the above one require regular phase.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 6744, 6996 ] }
24,995
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
buyAndTransfer
function buyAndTransfer(address _referredBy, address target, bytes _data, uint8 divChoice) public payable { require(regularPhase); address _customerAddress = msg.sender; uint256 frontendBalance = frontTokenBalanceLedger_[msg.sender]; if (userSelectedRate[_customerAddress] && divChoice == 0) { purcha...
// Overload
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 7351, 7962 ] }
24,996
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
function() payable public { /** / If the user has previously set a dividend rate, sending / Ether directly to the contract simply purchases more at / the most recent rate. If this is their first time, they / are automatically placed into the 20% rate `bucket'. **/ require(regularPhase); ...
// Fallback function only works during regular phase - part of anti-bot protection.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 8052, 8595 ] }
24,997
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
sell
function sell(uint _amountOfTokens) onlyHolders() public { // No selling during the ICO. You don't get to flip that fast, sorry! require(!icoPhase); require(regularPhase); require(_amountOfTokens <= frontTokenBalanceLedger_[msg.sender]); uint _frontEndTokensToBurn = _amountOfTokens; // Calcul...
// Sells front-end tokens. // Logic concerning step-pricing of tokens pre/post-ICO is encapsulated in tokensToEthereum_.
LineComment
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 10370, 12827 ] }
24,998
XYZethr
XYZethr.sol
0x145bf25dc666239030934b28d34fd0db7cf1b583
Solidity
XYZethr
contract XYZethr { using SafeMath for uint; /*================================= = MODIFIERS = =================================*/ modifier onlyHolders() { require(myFrontEndTokens() > 0); _; } modifier dividendHolder() { require(myDividends(true) > 0); ...
/** https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk https://xyzethr.tk __ __ __ __ ________ ________ ________ __ __ _______ | \ | \| \ / \| \| \| \| \ | \| \ | $$ | $$ \$$\ / $$ \$$$$$$$$| $$$$$$$$ \$$$$$$$$| $...
NatSpecMultiLine
transfer
function transfer(address _toAddress, uint _amountOfTokens) onlyHolders() public returns(bool) { require(_amountOfTokens >= MIN_TOKEN_TRANSFER && _amountOfTokens <= frontTokenBalanceLedger_[msg.sender]); bytes memory empty; transferFromInternal(msg.sender, _toAddress, _amountOfTokens, empty); return ...
/** * Transfer tokens from the caller to a new holder. * No charge incurred for the transfer. We'd make a terrible bank. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://30952958986b2e308a8435b3ce6f1d77b139bbefaae3a925e2908ba73ffbdfd6
{ "func_code_index": [ 12969, 13322 ] }
24,999