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
InitializableAdminUpgradeabilityProxy
InitializableAdminUpgradeabilityProxy.sol
0xcd55262c3ea354a58661597f71037d5fa26b72bd
Solidity
InitializableAdminUpgradeabilityProxy
contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { /** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the im...
/** * @title InitializableAdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for * initializing the implementation, admin, and init data. */
NatSpecMultiLine
initialize
function initialize(address _logic, address _admin, bytes memory _data) public payable { require(_implementation() == address(0)); InitializableUpgradeabilityProxy.initialize(_logic, _data); assert(ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); _setAdmin(_admin); }
/** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be ca...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unknown
ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f
{ "func_code_index": [ 699, 1034 ] }
11,100
InitializableAdminUpgradeabilityProxy
InitializableAdminUpgradeabilityProxy.sol
0xcd55262c3ea354a58661597f71037d5fa26b72bd
Solidity
InitializableAdminUpgradeabilityProxy
contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { /** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the im...
/** * @title InitializableAdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for * initializing the implementation, admin, and init data. */
NatSpecMultiLine
_willFallback
function _willFallback() internal override(BaseAdminUpgradeabilityProxy, Proxy) { BaseAdminUpgradeabilityProxy._willFallback(); }
/** * @dev Only fall back when the sender is not the admin. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unknown
ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f
{ "func_code_index": [ 1115, 1263 ] }
11,101
AstronautApes
@openzeppelin/contracts/access/Ownable.sol
0xfffc8336c1b2ea1265699bd2f029a6a653190b69
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cecc299085dde543f995524a10c30445377d0d46dd5bbd4aad8e58b20a52454f
{ "func_code_index": [ 399, 491 ] }
11,102
AstronautApes
@openzeppelin/contracts/access/Ownable.sol
0xfffc8336c1b2ea1265699bd2f029a6a653190b69
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cecc299085dde543f995524a10c30445377d0d46dd5bbd4aad8e58b20a52454f
{ "func_code_index": [ 1050, 1149 ] }
11,103
AstronautApes
@openzeppelin/contracts/access/Ownable.sol
0xfffc8336c1b2ea1265699bd2f029a6a653190b69
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cecc299085dde543f995524a10c30445377d0d46dd5bbd4aad8e58b20a52454f
{ "func_code_index": [ 1299, 1496 ] }
11,104
AstronautApes
@openzeppelin/contracts/access/Ownable.sol
0xfffc8336c1b2ea1265699bd2f029a6a653190b69
Solidity
AstronautApes
contract AstronautApes is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = .06 ether; uint256 public maxSupply = 10000; uint256 public maxMintAmount = 20; uint256 public nftP...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// internal
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cecc299085dde543f995524a10c30445377d0d46dd5bbd4aad8e58b20a52454f
{ "func_code_index": [ 910, 1015 ] }
11,105
AstronautApes
@openzeppelin/contracts/access/Ownable.sol
0xfffc8336c1b2ea1265699bd2f029a6a653190b69
Solidity
AstronautApes
contract AstronautApes is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = .06 ether; uint256 public maxSupply = 10000; uint256 public maxMintAmount = 20; uint256 public nftP...
mint
function mint(uint256 _mintAmount) public payable { require(!paused, "the contract is paused"); uint256 supply = totalSupply(); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded"); require(supply + _mintAmount <= maxSupply...
// public
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cecc299085dde543f995524a10c30445377d0d46dd5bbd4aad8e58b20a52454f
{ "func_code_index": [ 1031, 2083 ] }
11,106
AstronautApes
@openzeppelin/contracts/access/Ownable.sol
0xfffc8336c1b2ea1265699bd2f029a6a653190b69
Solidity
AstronautApes
contract AstronautApes is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = .06 ether; uint256 public maxSupply = 10000; uint256 public maxMintAmount = 20; uint256 public nftP...
reveal
function reveal() public onlyOwner() { revealed = true; }
//only owner
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://cecc299085dde543f995524a10c30445377d0d46dd5bbd4aad8e58b20a52454f
{ "func_code_index": [ 3206, 3276 ] }
11,107
Crypton
Crypton.sol
0x9214c43b602f68bb0c8968f43d702865bf1b225d
Solidity
Crypton
contract Crypton is StandardToken, Owned { string public name = "Crypton"; uint256 public decimals = 18; string public symbol = "CRP"; function Crypton() public { totalSupply = 100000000e18; balances[msg.sender] = totalSupply; } function() public payab...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature man...
/* Approves and then calls the receiving contract */
Comment
v0.4.19+commit.c4cbbb05
bzzr://d2fb27ff715c6c04e179a6fddd05639e22485b4ee46963f0bea8664564f4b58b
{ "func_code_index": [ 416, 1261 ] }
11,108
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view virtual returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 765, 861 ] }
11,109
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view virtual returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 975, 1075 ] }
11,110
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view virtual 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.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 1709, 1798 ] }
11,111
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 1858, 1971 ] }
11,112
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 2029, 2161 ] }
11,113
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _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.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 2369, 2549 ] }
11,114
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 2607, 2763 ] }
11,115
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 2905, 3079 ] }
11,116
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _ap...
/** * @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.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 3556, 3983 ] }
11,117
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address 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.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 4387, 4607 ] }
11,118
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - sub...
/** * @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.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 5105, 5487 ] }
11,119
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 sende...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 5972, 6581 ] }
11,120
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) 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: * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 6858, 7201 ] }
11,121
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); 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.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 7529, 8028 ] }
11,122
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @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.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 8461, 8812 ] }
11,123
ERC20Vested
contracts/token/ERC20/ERC20.sol
0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1
Solidity
ERC20
contract ERC20 is Context, IERC20 { 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} and {sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.8.1+commit.df193b15
MIT
ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f
{ "func_code_index": [ 9410, 9507 ] }
11,124
UniqGenesis
./contracts/UniqGenesis.sol
0xd804c52524f1cfad0fae54d2f2b15871337e96b3
Solidity
UniqGenesis
contract UniqGenesis is ERC721Claimable, VRFConsumerBase { // ----- EVENTS ----- // event PrizeCollected(address indexed _winner, uint256 _tokenId); // ----- VARIABLES ----- // //Sale uint256 internal constant _maxUniqly = 10000; bool internal _saleStarted; uint256 internal _tokenPrice; ...
contractURI
function contractURI() public pure returns (string memory) { return "https://uniqly.io/api/nft-genesis/"; }
// ----- VIEWS ----- //
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://5adf4d24848f3e599a1110d0be7c407fa8f355a20311f48c1565b436f59758af
{ "func_code_index": [ 1159, 1282 ] }
11,125
UniqGenesis
./contracts/UniqGenesis.sol
0xd804c52524f1cfad0fae54d2f2b15871337e96b3
Solidity
UniqGenesis
contract UniqGenesis is ERC721Claimable, VRFConsumerBase { // ----- EVENTS ----- // event PrizeCollected(address indexed _winner, uint256 _tokenId); // ----- VARIABLES ----- // //Sale uint256 internal constant _maxUniqly = 10000; bool internal _saleStarted; uint256 internal _tokenPrice; ...
mintUniqly
function mintUniqly(uint256 numUniqlies) external payable { require(_saleStarted, "Sale not started yet"); uint256 requiredValue = numUniqlies * _tokenPrice; uint256 mintIndex = totalSupply(); require(msg.value >= requiredValue, "Not enough ether"); require( (numUniqlies + mintIndex) <= _max...
// ----- PUBLIC METHODS ----- // //emits Transfer event
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://5adf4d24848f3e599a1110d0be7c407fa8f355a20311f48c1565b436f59758af
{ "func_code_index": [ 2829, 3553 ] }
11,126
UniqGenesis
./contracts/UniqGenesis.sol
0xd804c52524f1cfad0fae54d2f2b15871337e96b3
Solidity
UniqGenesis
contract UniqGenesis is ERC721Claimable, VRFConsumerBase { // ----- EVENTS ----- // event PrizeCollected(address indexed _winner, uint256 _tokenId); // ----- VARIABLES ----- // //Sale uint256 internal constant _maxUniqly = 10000; bool internal _saleStarted; uint256 internal _tokenPrice; ...
fulfillRandomness
function fulfillRandomness(bytes32, uint256 randomness) internal override { randomResult = randomness; }
// ----- PRIVATE METHODS ----- //
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://5adf4d24848f3e599a1110d0be7c407fa8f355a20311f48c1565b436f59758af
{ "func_code_index": [ 4129, 4249 ] }
11,127
UniqGenesis
./contracts/UniqGenesis.sol
0xd804c52524f1cfad0fae54d2f2b15871337e96b3
Solidity
UniqGenesis
contract UniqGenesis is ERC721Claimable, VRFConsumerBase { // ----- EVENTS ----- // event PrizeCollected(address indexed _winner, uint256 _tokenId); // ----- VARIABLES ----- // //Sale uint256 internal constant _maxUniqly = 10000; bool internal _saleStarted; uint256 internal _tokenPrice; ...
getRandomNumber
function getRandomNumber(uint256 adminProvidedSeed) external onlyOwner returns (bytes32) { require(totalSupply() >= _maxUniqly, "Sale must be ended"); require(randomResult == 0, "Random number already initiated"); require(address(this).balance >= 10 ether, "min 10 ETH balance required"); req...
// ----- OWNERS METHODS ----- //
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://5adf4d24848f3e599a1110d0be7c407fa8f355a20311f48c1565b436f59758af
{ "func_code_index": [ 4598, 5123 ] }
11,128
ProxyRoot
@openzeppelin/upgrades/contracts/upgradeability/ProxyAdmin.sol
0x4d2a5e3b7831156f62c8df47604e321cdaf35fec
Solidity
ProxyAdmin
contract ProxyAdmin is OpenZeppelinUpgradesOwnable { /** * @dev Returns the current implementation of a proxy. * This is needed because only the proxy admin can query it. * @return The address of the current implementation of the proxy. */ function getProxyImplementation(AdminUpgradeabilityProxy prox...
/** * @title ProxyAdmin * @dev This contract is the admin of a proxy, and is in charge * of upgrading it as well as transferring it to another admin. */
NatSpecMultiLine
getProxyImplementation
function getProxyImplementation(AdminUpgradeabilityProxy proxy) public view returns (address) { // We need to manually run the static call since the getter cannot be flagged as view // bytes4(keccak256("implementation()")) == 0x5c60da1b (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60d...
/** * @dev Returns the current implementation of a proxy. * This is needed because only the proxy admin can query it. * @return The address of the current implementation of the proxy. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
{ "func_code_index": [ 257, 663 ] }
11,129
ProxyRoot
@openzeppelin/upgrades/contracts/upgradeability/ProxyAdmin.sol
0x4d2a5e3b7831156f62c8df47604e321cdaf35fec
Solidity
ProxyAdmin
contract ProxyAdmin is OpenZeppelinUpgradesOwnable { /** * @dev Returns the current implementation of a proxy. * This is needed because only the proxy admin can query it. * @return The address of the current implementation of the proxy. */ function getProxyImplementation(AdminUpgradeabilityProxy prox...
/** * @title ProxyAdmin * @dev This contract is the admin of a proxy, and is in charge * of upgrading it as well as transferring it to another admin. */
NatSpecMultiLine
getProxyAdmin
function getProxyAdmin(AdminUpgradeabilityProxy proxy) public view returns (address) { // We need to manually run the static call since the getter cannot be flagged as view // bytes4(keccak256("admin()")) == 0xf851a440 (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); require(s...
/** * @dev Returns the admin of a proxy. Only the admin can query it. * @return The address of the current admin of the proxy. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
{ "func_code_index": [ 806, 1194 ] }
11,130
ProxyRoot
@openzeppelin/upgrades/contracts/upgradeability/ProxyAdmin.sol
0x4d2a5e3b7831156f62c8df47604e321cdaf35fec
Solidity
ProxyAdmin
contract ProxyAdmin is OpenZeppelinUpgradesOwnable { /** * @dev Returns the current implementation of a proxy. * This is needed because only the proxy admin can query it. * @return The address of the current implementation of the proxy. */ function getProxyImplementation(AdminUpgradeabilityProxy prox...
/** * @title ProxyAdmin * @dev This contract is the admin of a proxy, and is in charge * of upgrading it as well as transferring it to another admin. */
NatSpecMultiLine
changeProxyAdmin
function changeProxyAdmin(AdminUpgradeabilityProxy proxy, address newAdmin) public onlyOwner { proxy.changeAdmin(newAdmin); }
/** * @dev Changes the admin of a proxy. * @param proxy Proxy to change admin. * @param newAdmin Address to transfer proxy administration to. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
{ "func_code_index": [ 1355, 1488 ] }
11,131
ProxyRoot
@openzeppelin/upgrades/contracts/upgradeability/ProxyAdmin.sol
0x4d2a5e3b7831156f62c8df47604e321cdaf35fec
Solidity
ProxyAdmin
contract ProxyAdmin is OpenZeppelinUpgradesOwnable { /** * @dev Returns the current implementation of a proxy. * This is needed because only the proxy admin can query it. * @return The address of the current implementation of the proxy. */ function getProxyImplementation(AdminUpgradeabilityProxy prox...
/** * @title ProxyAdmin * @dev This contract is the admin of a proxy, and is in charge * of upgrading it as well as transferring it to another admin. */
NatSpecMultiLine
upgrade
function upgrade(AdminUpgradeabilityProxy proxy, address implementation) public onlyOwner { proxy.upgradeTo(implementation); }
/** * @dev Upgrades a proxy to the newest implementation of a contract. * @param proxy Proxy to be upgraded. * @param implementation the address of the Implementation. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
{ "func_code_index": [ 1675, 1809 ] }
11,132
ProxyRoot
@openzeppelin/upgrades/contracts/upgradeability/ProxyAdmin.sol
0x4d2a5e3b7831156f62c8df47604e321cdaf35fec
Solidity
ProxyAdmin
contract ProxyAdmin is OpenZeppelinUpgradesOwnable { /** * @dev Returns the current implementation of a proxy. * This is needed because only the proxy admin can query it. * @return The address of the current implementation of the proxy. */ function getProxyImplementation(AdminUpgradeabilityProxy prox...
/** * @title ProxyAdmin * @dev This contract is the admin of a proxy, and is in charge * of upgrading it as well as transferring it to another admin. */
NatSpecMultiLine
upgradeAndCall
function upgradeAndCall(AdminUpgradeabilityProxy proxy, address implementation, bytes memory data) payable public onlyOwner { proxy.upgradeToAndCall.value(msg.value)(implementation, data); }
/** * @dev Upgrades a proxy to the newest implementation of a contract and forwards a function call to it. * This is useful to initialize the proxied contract. * @param proxy Proxy to be upgraded. * @param implementation Address of the Implementation. * @param data Data to send as msg.data in the low level call. ...
NatSpecMultiLine
v0.5.17+commit.d19bba13
{ "func_code_index": [ 2353, 2551 ] }
11,133
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
_baseURI
function _baseURI() internal view override(ERC721A) returns (string memory) { return uriPrefix; }
/* * Base URI for computing {tokenURI}. The resulting URI for each token will be * the concatenation of the `baseURI` and the `tokenId`. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 1426, 1530 ] }
11,134
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
pause
function pause() public onlyOwner { _pause(); }
/* * @dev Pauses the contract. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 2046, 2100 ] }
11,135
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
resume
function resume() public onlyOwner { _resume(); }
/* * @dev Resumes the contract. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 2146, 2202 ] }
11,136
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
disablePreSale
function disablePreSale() public onlyOwner { _disablePreSale(); }
/* * @dev Disables presale. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 2244, 2316 ] }
11,137
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
enablePreSale
function enablePreSale() public onlyOwner { _enablePreSale(); }
/* * @dev Enables presale. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 2357, 2427 ] }
11,138
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
withdraw
function withdraw() public onlyOwner { // Reserve 30% for DAO treasury (bool hs, ) = payable(DAO_TREASURY_ADDRESS).call{ value: (address(this).balance * 30) / 100 }(""); require(hs, "DAO tranfer failed"); // owner only (bool os, ) = payable(owner()).call{ value: address(this).balance }(""); require(os, "o...
/* * @dev Withdraws the contracts balance to owner and DAO. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 2501, 2856 ] }
11,139
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
reveal
function reveal() public onlyOwner { revealed = true; }
/* * @dev Reveals the artwork. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 2901, 2963 ] }
11,140
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
hide
function hide() public onlyOwner { revealed = false; }
/* * @dev Hides the artwork. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 3006, 3067 ] }
11,141
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
setUriPrefix
function setUriPrefix(string memory _uriPrefix) public onlyOwner { uriPrefix = _uriPrefix; }
/* * @dev Sets uri prefix for revealed tokens */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 3127, 3226 ] }
11,142
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
setHiddenMetadataUri
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { hiddenMetadataUri = _hiddenMetadataUri; }
/* * @dev Sets uri prefix for hidden tokens */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 3284, 3415 ] }
11,143
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
_mintDoggo
function _mintDoggo(address to, uint256 quantity) private { _safeMint(to, quantity); }
/* * @dev Mints a doggo to an address */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 3467, 3560 ] }
11,144
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
presaleMintDoggo
function presaleMintDoggo(uint256 quantity, bytes32[] calldata merkleProof) external payable whenNotPaused whenPreSale nonReentrant { require(totalSupply() + quantity < MAX_SUPPLY, "max supply reached"); if (_msgSender() != owner()) { require(totalSupply() + quantity < MAX_PUBLIC_SUPPLY, "max public...
/* * @dev Mints doggos when presale is enabled. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 3622, 4354 ] }
11,145
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
mintDoggo
function mintDoggo(uint256 quantity) external payable whenNotPaused whenNotPreSale nonReentrant { require(totalSupply() + quantity < MAX_SUPPLY, "max supply reached"); if (_msgSender() != owner()) { require(totalSupply() + quantity < MAX_PUBLIC_SUPPLY, "max public supply reached"); require(_numberMinted(_ms...
/* * @dev Mints doggos when presale is disabled. */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 4417, 4925 ] }
11,146
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
numberMinted
function numberMinted(address _owner) public view returns (uint256) { return _numberMinted(_owner); }
/* * @dev Returns the number of tokens minted by an address */
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 4999, 5107 ] }
11,147
Doggo
contracts/Doggo.sol
0x46ccb782da782b9e921dd447736ab64fc4fb2636
Solidity
Doggo
contract Doggo is ERC721A, Ownable, Pausable, PreSaleAware, ReentrancyGuard { using Strings for uint256; uint256 public constant COST = 0.08 ether; // the cost per doggo // the merkle root used for verifying proofs during presale bytes32 public constant PRE_SALE_MERKLE_ROOT = 0x9f93df4f70710b1cc9fa86ee3c87c...
/* `..:`. ``.-/.::/..```.-----:-` ```....````.-.` `...-:+------..:. `.:-..``..---` ./+//-`./`+ `/. ``` :: /-`+`+ `+` .::+ /. :+::` .: `/ -+ `+ `/ /. `o /.` ::` + `o `:-:` ...
Comment
supportsInterface
function supportsInterface(bytes4 interfaceId) public view override(ERC721A) returns (bool) { return super.supportsInterface(interfaceId); }
// The following functions are overrides required by Solidity.
LineComment
v0.8.11+commit.d7f03943
MIT
ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99
{ "func_code_index": [ 5177, 5324 ] }
11,148
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
hasSendDirection
function hasSendDirection(Direction _direction) public pure returns (bool) { return _direction == Direction.SEND || _direction == Direction.BOTH; }
/** * @dev hasSendDirection */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 435, 593 ] }
11,149
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
hasReceiveDirection
function hasReceiveDirection(Direction _direction) public pure returns (bool) { return _direction == Direction.RECEIVE || _direction == Direction.BOTH; }
/** * @dev hasReceiveDirection */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 641, 813 ] }
11,150
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
restriction
function restriction() public view returns (Direction) { return lock.restriction; }
/** * @dev restriction */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 853, 947 ] }
11,151
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
scheduledStartAt
function scheduledStartAt() public view returns (uint256) { return lock.startAt; }
/** * @dev scheduledStartAt */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 992, 1085 ] }
11,152
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
scheduledEndAt
function scheduledEndAt() public view returns (uint256) { return lock.endAt; }
/** * @dev scheduledEndAt */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 1128, 1217 ] }
11,153
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
isScheduleInverted
function isScheduleInverted() public view returns (bool) { return lock.scheduleInverted; }
/** * @dev lock inverted */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 1259, 1360 ] }
11,154
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
isLocked
function isLocked() public view returns (bool) { // solium-disable-next-line security/no-block-members return (lock.startAt <= now && lock.endAt > now) ? !lock.scheduleInverted : lock.scheduleInverted; }
/** * @dev isLocked */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 1397, 1623 ] }
11,155
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
individualPass
function individualPass(address _address) public view returns (Direction) { return individualPasses[_address]; }
/** * @dev individualPass */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 1666, 1797 ] }
11,156
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
canSend
function canSend(address _address) public view returns (bool) { if (isLocked() && hasSendDirection(lock.restriction)) { return hasSendDirection(individualPasses[_address]); } return true; }
/** * @dev can the address send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 1846, 2063 ] }
11,157
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
canReceive
function canReceive(address _address) public view returns (bool) { if (isLocked() && hasReceiveDirection(lock.restriction)) { return hasReceiveDirection(individualPasses[_address]); } return true; }
/** * @dev can the address receive */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 2115, 2341 ] }
11,158
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
definePass
function definePass(address _address, uint256 _lock) public onlyAuthority returns (bool) { individualPasses[_address] = Direction(_lock); emit PassDefinition(_address, Direction(_lock)); return true; }
/** * @dev allow authority to provide a pass to an address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 2417, 2647 ] }
11,159
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
defineManyPasses
function defineManyPasses(address[] _addresses, uint256 _lock) public onlyAuthority returns (bool) { for (uint256 i = 0; i < _addresses.length; i++) { require(definePass(_addresses[i], _lock), "LOR01"); } return true; }
/** * @dev allow authority to provide addresses with lock passes */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 2729, 2984 ] }
11,160
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
scheduleLock
function scheduleLock( Direction _restriction, uint256 _startAt, uint256 _endAt, bool _scheduleInverted) public onlyAuthority returns (bool) { require(_startAt <= _endAt, "LOR02"); lock = ScheduledLock( _restriction, _startAt, _endAt, _scheduleInverted ); emit LockDefinition( ...
/** * @dev schedule lock */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 3026, 3451 ] }
11,161
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
isAddressValid
function isAddressValid(address /*_address*/) public view returns (bool) { return true; }
/** * @dev validates an address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 3500, 3600 ] }
11,162
LockRule
contracts/rule/LockRule.sol
0x80c26f10fa35a1b5ef3fb96e34920994400aa21f
Solidity
LockRule
contract LockRule is IRule, Authority { enum Direction { NONE, RECEIVE, SEND, BOTH } struct ScheduledLock { Direction restriction; uint256 startAt; uint256 endAt; bool scheduleInverted; } mapping(address => Direction) individualPasses; ScheduledLock lock =...
/** * @title LockRule * @dev LockRule contract * This rule allow to lock assets for a period of time * for event such as investment vesting * * @author Cyril Lapinte - <cyril.lapinte@mtpelerin.com> * * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved * @notice Please refer to ...
NatSpecMultiLine
isTransferValid
function isTransferValid(address _from, address _to, uint256 /* _amount */) public view returns (bool) { return (canSend(_from) && canReceive(_to)); }
/** * @dev validates a transfer of ownership */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c1f712e9dff61460e0127a4a1f5d3662d216953bc421acfb25d035c986a6c95d
{ "func_code_index": [ 3662, 3831 ] }
11,163
TulipFloorBidding
contracts/EtherTulip.sol
0x40ab332dd48f35ebd227708ef381c946c4959eb6
Solidity
EtherTulip
contract EtherTulip is ERC721("EtherTulip", unicode"🌷") { struct Tulip { uint256 listingTime; uint256 price; uint256 timesSold; } mapping(uint256 => Tulip) public tulips; uint256 public latestNewTulipForSale; address public immutable feeRecipient; event TulipForSale(...
// This is a revised version of the revised version of the original EtherRock contract 0x41f28833Be34e6EDe3c58D1f597bef429861c4E2 with all the rocks removed and rock properties replaced by tulips. // The original contract at 0x41f28833Be34e6EDe3c58D1f597bef429861c4E2 had a simple mistake in the buyRock() function where...
LineComment
currentPrice
function currentPrice(uint256 tulipNumber) public view returns (uint256 price) { if (tulipNumber == latestNewTulipForSale) { // if currently in auction uint256 initialPrice = 1000 ether; uint256 decayPeriod = 1 days; // price = initial_price - initial_price * (current_time - start_ti...
// Dutch-ish Auction
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 925, 1618 ] }
11,164
TulipFloorBidding
contracts/EtherTulip.sol
0x40ab332dd48f35ebd227708ef381c946c4959eb6
Solidity
EtherTulip
contract EtherTulip is ERC721("EtherTulip", unicode"🌷") { struct Tulip { uint256 listingTime; uint256 price; uint256 timesSold; } mapping(uint256 => Tulip) public tulips; uint256 public latestNewTulipForSale; address public immutable feeRecipient; event TulipForSale(...
// This is a revised version of the revised version of the original EtherRock contract 0x41f28833Be34e6EDe3c58D1f597bef429861c4E2 with all the rocks removed and rock properties replaced by tulips. // The original contract at 0x41f28833Be34e6EDe3c58D1f597bef429861c4E2 had a simple mistake in the buyRock() function where...
LineComment
_baseURI
function _baseURI() internal pure override returns (string memory) { return "ipfs://"; }
// ERC721
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1635, 1739 ] }
11,165
TulipFloorBidding
contracts/EtherTulip.sol
0x40ab332dd48f35ebd227708ef381c946c4959eb6
Solidity
EtherTulip
contract EtherTulip is ERC721("EtherTulip", unicode"🌷") { struct Tulip { uint256 listingTime; uint256 price; uint256 timesSold; } mapping(uint256 => Tulip) public tulips; uint256 public latestNewTulipForSale; address public immutable feeRecipient; event TulipForSale(...
// This is a revised version of the revised version of the original EtherRock contract 0x41f28833Be34e6EDe3c58D1f597bef429861c4E2 with all the rocks removed and rock properties replaced by tulips. // The original contract at 0x41f28833Be34e6EDe3c58D1f597bef429861c4E2 had a simple mistake in the buyRock() function where...
LineComment
getTulipInfo
function getTulipInfo(uint256 tulipNumber) public view returns ( address owner, uint256 listingTime, uint256 price, uint256 timesSold ) { return ( ERC721.ownerOf(tulipNumber), tulips[tulipNumber].listingTime, currentPrice(tulipNumber), ...
// ETHERROCK
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 10062, 10488 ] }
11,166
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 92, 152 ] }
11,167
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 233, 306 ] }
11,168
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 524, 606 ] }
11,169
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 879, 967 ] }
11,170
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 1618, 1697 ] }
11,171
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 2002, 2104 ] }
11,172
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 157, 384 ] }
11,173
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 528, 727 ] }
11,174
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 873, 1381 ] }
11,175
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 1528, 1728 ] }
11,176
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 1885, 2085 ] }
11,177
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 2318, 2421 ] }
11,178
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 3193, 3296 ] }
11,179
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 3758, 3969 ] }
11,180
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invali...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 4674, 4884 ] }
11,181
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 5528, 5738 ] }
11,182
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 590, 1017 ] }
11,183
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 1932, 2334 ] }
11,184
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 3073, 3251 ] }
11,185
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 3471, 3671 ] }
11,186
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 4031, 4262 ] }
11,187
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disa...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 4508, 5043 ] }
11,188
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 5218, 5422 ] }
11,189
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.stat...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 5604, 6031 ] }
11,190
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 6208, 6413 ] }
11,191
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.deleg...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 6597, 7025 ] }
11,192
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 450, 542 ] }
11,193
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 1093, 1246 ] }
11,194
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 1393, 1642 ] }
11,195
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
maruinu
contract maruinu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint8 private _decimals = 9; // string private _name = "Maru Inu"; // name string private _symbol = "$MARU"; ...
//to recieve ETH
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 7100, 7134 ] }
11,196
maruinu
maruinu.sol
0x7bf4581c5507f1df0e9587cdc18841e0ed4ee884
Solidity
maruinu
contract maruinu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint8 private _decimals = 9; // string private _name = "Maru Inu"; // name string private _symbol = "$MARU"; ...
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipie...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://a23930b8ccc2ecc6e8dcdb0daba89afd1da21e66d1c484edc1aa0b3e77f91cfd
{ "func_code_index": [ 13642, 14465 ] }
11,197
BSB_Locking_Development
BSB_Locking_Development.sol
0x16933f45201c9db038fc573afaed02d79ca8d209
Solidity
Ownable
contract Ownable { address public owner ; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() { owner = msg.sender; } /*...
/** * @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) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); 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.8.7+commit.e28d00a7
BSD-3-Clause
ipfs://cb9d98819010829312628b5bebffdfa48219a57a0201b81be9e62c2a6420b4a8
{ "func_code_index": [ 634, 815 ] }
11,198
CryptoverseBit
contracts/CryptoverseBit.sol
0x66733bccdc2ea3019a0683c1e7435a30ccb79549
Solidity
CryptoverseBit
contract CryptoverseBit is ERC1155, Ownable { /** * Emitted when prediction is submitted to the chain. */ event PredictionMinted(address indexed player, uint256 tokenId, string series, uint256 seriesNumber, string nickname, uint64 lucky, uint64 predict_1, uint64 predict_2, uint64 predict_3, u...
/** * @author radek.hecl * @title Cryptoverse BIT contract. */
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * Returns the contract name. * * @return contract name */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3101, 3186 ] }
11,199