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
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
grantRole
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); }
/** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3649, 3801 ] }
20,600
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
revokeRole
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); }
/** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4041, 4195 ] }
20,601
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
renounceRole
function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); }
/** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4697, 4920 ] }
20,602
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
_setupRole
function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); }
/** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor w...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 5498, 5615 ] }
20,603
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
_setRoleAdmin
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, getRoleAdmin(role), adminRole); _roles[role].adminRole = adminRole; }
/** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 5742, 5942 ] }
20,604
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) external view returns (uint256 balance);
/** * @dev Returns the number of tokens in ``owner``'s account. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 719, 798 ] }
20,605
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) external view returns (address owner);
/** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 944, 1021 ] }
20,606
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token mus...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1733, 1816 ] }
20,607
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint256 tokenId) external;
/** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If th...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2342, 2421 ] }
20,608
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) external;
/** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2894, 2954 ] }
20,609
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) external view returns (address operator);
/** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3108, 3192 ] }
20,610
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool _approved) external;
/** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3519, 3594 ] }
20,611
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) external view returns (bool);
/** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3745, 3838 ] }
20,612
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {appro...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4427, 4531 ] }
20,613
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721Receiver
interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other valu...
/** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */
NatSpecMultiLine
onERC721Received
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
/** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by ...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 528, 655 ] }
20,614
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721Metadata
interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @d...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the token collection name. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 108, 167 ] }
20,615
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721Metadata
interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @d...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the token collection symbol. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 238, 299 ] }
20,616
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
IERC721Metadata
interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @d...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) external view returns (string memory);
/** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 400, 478 ] }
20,617
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 977, 1274 ] }
20,618
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1333, 1546 ] }
20,619
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1603, 1847 ] }
20,620
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev See {IERC721Metadata-name}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1909, 2014 ] }
20,621
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev See {IERC721Metadata-symbol}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2078, 2187 ] }
20,622
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) ...
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2253, 2618 ] }
20,623
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return ""; }
/** * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden * in child contracts. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2750, 2849 ] }
20,624
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved ...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2906, 3308 ] }
20,625
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3369, 3595 ] }
20,626
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3662, 3962 ] }
20,627
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev See {IERC721-isApprovedForAll}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4028, 4197 ] }
20,628
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4259, 4569 ] }
20,629
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4635, 4791 ] }
20,630
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4857, 5147 ] }
20,631
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeTransfer
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is eq...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 6024, 6301 ] }
20,632
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); }
/** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 6609, 6741 ] }
20,633
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, s...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 6903, 7256 ] }
20,634
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 7593, 7708 ] }
20,635
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 7930, 8185 ] }
20,636
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_mint
function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Tra...
/** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 8516, 8903 ] }
20,637
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), toke...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 9127, 9492 ] }
20,638
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_transfer
function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals f...
/** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 9824, 10373 ] }
20,639
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 10486, 10665 ] }
20,640
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onER...
/** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param to...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 11225, 12073 ] }
20,641
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _o...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 12681, 12779 ] }
20,642
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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 () { address msgSender = _msgSend...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 497, 589 ] }
20,643
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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 () { address msgSender = _msgSend...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1148, 1301 ] }
20,644
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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 () { address msgSender = _msgSend...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1451, 1700 ] }
20,645
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 161, 388 ] }
20,646
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 536, 735 ] }
20,647
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 885, 1393 ] }
20,648
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1544, 1744 ] }
20,649
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1905, 2105 ] }
20,650
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2347, 2450 ] }
20,651
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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) internal pure returns (uint256) { return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2728, 2831 ] }
20,652
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3085, 3188 ] }
20,653
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3484, 3587 ] }
20,654
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4049, 4152 ] }
20,655
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4626, 4837 ] }
20,656
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 5557, 5767 ] }
20,657
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
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) ...
/** * @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.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 6425, 6635 ] }
20,658
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
getStakeTokenIds
function getStakeTokenIds( address account ) public override view returns (uint256[] memory) { return stakerIds[account]; }
/** * @dev Get stake token id array owned by wallet address. * @param account address */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 820, 1017 ] }
20,659
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
getStakeAmount
function getStakeAmount( address account ) external view returns (uint256) { uint256[] memory stakeIds = stakerIds[account]; uint256 totalStakeAmount; for (uint256 i = 0; i < stakeIds.length; i++) { totalStakeAmount += stakes[stakeIds[i]].amount; } return totalSta...
/** * @dev Return total stake amount of `account` */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1090, 1479 ] }
20,660
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
isHolder
function isHolder( address account ) public override view returns (bool) { return balanceOf(account) > 0; }
/** * @dev Check if wallet address owns any stake tokens. * @param account address */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1591, 1772 ] }
20,661
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
getStakeInfo
function getStakeInfo( uint256 stakeId ) public override view returns (uint256, uint256, uint256) { require(_exists(stakeId), "StakeToken#getStakeInfo: STAKE_NOT_FOUND"); return (stakes[stakeId].amount, stakes[stakeId].multiplier, stakes[stakeId].depositedAt); }
/** * @dev Return stake info from `stakeId`. * Requirements: * * - `stakeId` must exist in stake pool * @param stakeId uint256 */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 1946, 2291 ] }
20,662
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
getEligibleStakeAmount
function getEligibleStakeAmount( uint256 fromDate ) public override view returns (uint256) { require(fromDate <= block.timestamp, "StakeToken#getEligibleStakeAmount: NO_PAST_DATE"); uint256 totalSAmount; for (uint256 i = 1; i <= tokenIds; i++) { if (_exists(i)) { ...
/** * @dev Return total stake amount that have been in the pool from `fromDate` * Requirements: * * - `fromDate` must be past date */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2463, 3132 ] }
20,663
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
_getMultiplier
function _getMultiplier() private view returns (uint256) { if (tokenIds < 300) { return 120; } else if (300 <= tokenIds && tokenIds < 4000) { return 110; } else { return 100; } }
/** * @dev Returns StakeToken multiplier. * * 0 < `tokenId` <300: 120. * 300 <= `tokenId` <4000: 110. * 4000 <= `tokenId`: 100. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3307, 3602 ] }
20,664
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
_mint
function _mint( address account, uint256 amount, uint256 depositedAt ) internal virtual returns (uint256) { require(amount > 0, "StakeToken#_mint: INVALID_AMOUNT"); tokenIds++; uint256 multiplier = _getMultiplier(); super._mint(account, tokenIds); Stake storage n...
/** * @dev Mint a new StakeToken. * Requirements: * * - `account` must not be zero address, check ERC721 {_mint} * - `amount` must not be zero * @param account address of recipient. * @param amount mint amount. * @param depositedAt timestamp when stake was deposited. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3935, 4541 ] }
20,665
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
_burn
function _burn( uint256 stakeId ) internal override { require(_exists(stakeId), "StakeToken#_burn: STAKE_NOT_FOUND"); address stakeOwner = ownerOf(stakeId); super._burn(stakeId); delete stakes[stakeId]; uint256[] storage stakeIds = stakerIds[stakeOwner]; for (uint256 i = 0...
/** * @dev Burn stakeToken. * Requirements: * * - `stakeId` must exist in stake pool * @param stakeId id of buring token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4710, 5375 ] }
20,666
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakeToken
contract StakeToken is IStakeToken, ERC721, Ownable { using SafeMath for uint256; // Last stake token id, start from 1 uint256 public tokenIds; uint256 public constant multiplierDenominator = 100; struct Stake { uint256 amount; uint256 multiplier; uint256 depositedA...
_decreaseStakeAmount
function _decreaseStakeAmount( uint256 stakeId, uint256 amount ) internal virtual { require(_exists(stakeId), "StakeToken#_decreaseStakeAmount: STAKE_NOT_FOUND"); require(amount <= stakes[stakeId].amount, "StakeToken#_decreaseStakeAmount: INSUFFICIENT_STAKE_AMOUNT"); if (amount == s...
/** * @dev Decrease stake amount. * If stake amount leads to be zero, the stake is burned. * Requirements: * * - `stakeId` must exist in stake pool * @param stakeId id of buring token. * @param amount to withdraw. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 5648, 6229 ] }
20,667
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
supportsInterface
function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC165, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); }
/** * @dev Override supportInterface. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 2524, 2772 ] }
20,668
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
addOperator
function addOperator( address account ) public override onlyAdmin { // Check if `account` already has operator role require(!hasRole(OPERATOR_ROLE, account), "StakePool#addOperator: ALREADY_OERATOR_ROLE"); grantRole(OPERATOR_ROLE, account); }
/** * @dev Add an account to the operator role. * @param account address of recipient. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3440, 3765 ] }
20,669
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
removeOperator
function removeOperator( address account ) public override onlyAdmin { // Check if `account` has operator role require(hasRole(OPERATOR_ROLE, account), "StakePool#removeOperator: NO_OPERATOR_ROLE"); revokeRole(OPERATOR_ROLE, account); }
/** * @dev Remove an account from the operator role. * @param account address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 3873, 4192 ] }
20,670
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
checkOperator
function checkOperator( address account ) public override view returns (bool) { return hasRole(OPERATOR_ROLE, account); }
/** * @dev Check if an account is operator. * @param account address of operator being checked. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4317, 4512 ] }
20,671
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
deposit
function deposit( uint256 amount ) external override { require(amount >= minStakeAmount, "StakePool#deposit: UNDER_MINIMUM_STAKE_AMOUNT"); _deposit(msg.sender, amount); }
/** * @dev Deposit stake to the pool. * Requirements: * * - `amount` must not be zero * @param amount deposit amount. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 4775, 5010 ] }
20,672
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
withdraw
function withdraw( uint256 stakeId, uint256 amount ) external override { require(amount > 0, "StakePool#withdraw: UNDER_MINIMUM_WITHDRAW_AMOUNT"); _withdraw(msg.sender, stakeId, amount); }
/** * @dev Withdraw from the pool. * * If amount is less than amount of the stake, cut down amount. * If amount is equal to amount of the stake, burn the stake. * * Requirements: * * - `amount` >= `minStakeAmount` * @param stakeId id of Stake that is being withdrawn. * @param amount withdraw amount....
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 5388, 5650 ] }
20,673
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
_deposit
function _deposit( address account, uint256 amount ) private nonReentrant { uint256 stakeId = _mint(account, amount, block.timestamp); require(depositToken.transferFrom(account, address(this), amount), "StakePool#_deposit: TRANSFER_FAILED"); emit Deposited(account, stakeId, amount...
/** * @dev Deposit stake to the pool. * @param account address of recipient. * @param amount deposit amount. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 5794, 6164 ] }
20,674
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
_withdraw
function _withdraw( address account, uint256 stakeId, uint256 withdrawAmount ) private nonReentrant { require(ownerOf(stakeId) == account, "StakePool#_withdraw: NO_STAKE_OWNER"); _decreaseStakeAmount(stakeId, withdrawAmount); require(depositToken.transfer(account, withdrawAmoun...
/** * @dev If amount is less than amount of the stake, cut off amount. * If amount is equal to amount of the stake, burn the stake. * * Requirements: * * - `account` must be owner of `stakeId` * @param account address whose stake is being withdrawn. * @param stakeId id of stake that is being withdrawn. ...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 6580, 7057 ] }
20,675
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
depositReward
function depositReward( uint256 amount ) external override onlyOperator { require(amount > 0, "StakePool#depositReward: ZERO_AMOUNT"); _depositReward(msg.sender, amount); }
/** * @dev Deposit reward to the pool. * Requirements: * * - `amount` must not be zero * @param amount deposit amount. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 7324, 7570 ] }
20,676
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
getRewardDeposit
function getRewardDeposit( uint256 id ) external view returns (address, uint256, uint256) { return (rewardDeposits[id].operator, rewardDeposits[id].amount, rewardDeposits[id].depositedAt); }
/** * @dev Return reward deposit info by id. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 7638, 7893 ] }
20,677
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
getClaimableReward
function getClaimableReward( uint256 tokenId ) external view returns (uint256) { return (claimableRewards[tokenId]); }
/** * @dev Return reward deposit info by id. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 7961, 8144 ] }
20,678
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
addClaimableReward
function addClaimableReward( uint256 tokenId, uint256 amount ) external onlyOperator { claimableRewards[tokenId] += amount; }
/** * @dev add to claimable reward for a given token id */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 8223, 8413 ] }
20,679
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
addClaimableRewards
function addClaimableRewards( uint256[] calldata tokenIds, uint256[] calldata amounts ) external onlyOperator { for (uint256 i = 0; i < tokenIds.length; i++) { claimableRewards[tokenIds[i]] += amounts[i]; } }
/** * @dev batch add to claimable reward for given token ids */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 8497, 8792 ] }
20,680
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
claimReward
function claimReward( uint256 tokenId, uint256 amount ) external nonReentrant { require((ownerOf(tokenId) == msg.sender), "StakePool#claimReward: CALLER_NO_TOKEN_OWNER"); require(claimableRewards[tokenId] >= amount, "StakePool#claimReward: INSUFFICIENT_FUNDS"); claimableRewards[toke...
/** * @dev Claim reward. * * Requirements: * * - stake token owner must call * - `amount` must be less than claimable reward * @param amount claim amount */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 9007, 9494 ] }
20,681
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
sweep
function sweep( address token_, address to, uint256 amount ) public onlyOperator { IERC20 token = IERC20(token_); // balance check is being done in ERC20 token.transfer(to, amount); emit Swept(msg.sender, token_, to, amount); }
/** * @dev Sweep funds * Accessible by operators */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 9574, 9902 ] }
20,682
StakePoolSimpleCombined
StakePoolSimpleCombined.sol
0x5d69b2f978047642ee287d8211c76b0f2aa2e457
Solidity
StakePoolSimpleCombined
contract StakePoolSimpleCombined is IStakePool, StakeToken, AccessControl, ReentrancyGuard { using SafeERC20 for IERC20; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); uint256 public constant MONTH = 31 days; uint256 public constant QUARTER = 93 days; uint256 public const...
_depositReward
function _depositReward( address account, uint256 amount ) private { rewardToken.safeTransferFrom(account, address(this), amount); rewardDeposits.push(RewardDeposit({ operator: account, amount: amount, depositedAt: block.timestamp })); emit RewardDeposited...
/** * @dev Deposit reward to the pool. * @param account address who deposits to the pool. * @param amount deposit amount. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced
{ "func_code_index": [ 10059, 10457 ] }
20,683
TutellusCrowdsale
zeppelin-solidity/contracts/crowdsale/Crowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they a...
NatSpecMultiLine
createTokenContract
function createTokenContract() internal returns (MintableToken) { return new MintableToken(); }
// creates the token to be sold. // override this method to have crowdsale of a specific mintable token.
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 1280, 1386 ] }
20,684
TutellusCrowdsale
zeppelin-solidity/contracts/crowdsale/Crowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they a...
NatSpecMultiLine
function () payable { buyTokens(msg.sender); }
// fallback function can be used to buy tokens
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 1441, 1498 ] }
20,685
TutellusCrowdsale
zeppelin-solidity/contracts/crowdsale/Crowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they a...
NatSpecMultiLine
buyTokens
function buyTokens(address beneficiary) public payable { require(beneficiary != 0x0); require(validPurchase()); uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = weiAmount.mul(rate); // update state weiRaised = weiRaised.add(weiAmount); token.mint(be...
// low level token purchase function
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 1541, 1991 ] }
20,686
TutellusCrowdsale
zeppelin-solidity/contracts/crowdsale/Crowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they a...
NatSpecMultiLine
forwardFunds
function forwardFunds() internal { wallet.transfer(msg.value); }
// send ether to the fund collection wallet // override to create custom fund forwarding mechanisms
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 2100, 2175 ] }
20,687
TutellusCrowdsale
zeppelin-solidity/contracts/crowdsale/Crowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they a...
NatSpecMultiLine
validPurchase
function validPurchase() internal constant returns (bool) { bool withinPeriod = now >= startTime && now <= endTime; bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; }
// @return true if the transaction can buy tokens
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 2231, 2448 ] }
20,688
TutellusCrowdsale
zeppelin-solidity/contracts/crowdsale/Crowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they a...
NatSpecMultiLine
hasEnded
function hasEnded() public constant returns (bool) { return now > endTime; }
// @return true if crowdsale event has ended
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 2499, 2586 ] }
20,689
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _valu...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 274, 513 ] }
20,690
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _valu...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 720, 829 ] }
20,691
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_to] = balances[_to].add(_val...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 388, 891 ] }
20,692
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs...
/** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 1126, 1674 ] }
20,693
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 1997, 2135 ] }
20,694
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier o...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 173, 226 ] }
20,695
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier o...
/** * @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 { require(newOwner != address(0)); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 545, 676 ] }
20,696
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The addre...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 491, 714 ] }
20,697
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The addre...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 831, 958 ] }
20,698
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused); _; } /** * @dev modifier to allow actions only when ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 497, 581 ] }
20,699