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
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 534, 616 ] }
7,907
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 895, 983 ] }
7,908
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 1647, 1726 ] }
7,909
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 2039, 2141 ] }
7,910
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
claim
function claim( uint _amount ) external { OHM.safeTransfer( msg.sender, _claim( _amount ) ); }
/** * @notice allows wallet to claim OHM * @param _amount uint */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 2326, 2439 ] }
7,911
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
stake
function stake( uint _amount, bool _claimsOHM ) external { uint toStake = _claim( _amount ); OHM.approve( address( staking ), toStake ); staking.stake( toStake, msg.sender ); if ( _claimsOHM ) { staking.claim( msg.sender ); } }
/** * @notice allows wallet to claim OHM and stake. set _claim = true if warmup is 0. * @param _amount uint * @param _claimsOHM bool */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 2610, 2917 ] }
7,912
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
_claim
function _claim( uint _amount ) internal returns ( uint ToSend_ ) { Term memory info = terms[ msg.sender ]; DAI.safeTransferFrom( msg.sender, address( this ), _amount ); DAI.approve( address( treasury ), _amount ); ToSend_ = treasury.deposit( _amount, address( DAI ), 0 ); require(...
/** * @notice logic for claiming OHM * @param _amount uint * @return ToSend_ uint */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 3037, 3896 ] }
7,913
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
pushWalletChange
function pushWalletChange( address _newAddress ) external { require( terms[ msg.sender ].percent != 0 ); walletChange[ msg.sender ] = _newAddress; }
/** * @notice allows address to push terms to new address * @param _newAddress address */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 4014, 4190 ] }
7,914
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
pullWalletChange
function pullWalletChange( address _oldAddress ) external { require( walletChange[ _oldAddress ] == msg.sender, "wallet did not push" ); walletChange[ _oldAddress ] = address(0); terms[ msg.sender ] = terms[ _oldAddress ]; delete terms[ _oldAddress ]; }
/** * @notice allows new address to pull terms * @param _oldAddress address */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 4301, 4610 ] }
7,915
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
redeemableFor
function redeemableFor( address _address ) public view returns (uint) { uint max = circulatingSupply().mul( terms[ _address ].percent ).mul( 1e3 ); return max.sub( claimed( _address ).mul( 1e9 ) ); }
/** * @notice view OHM claimable for address. DAI decimals (18). * @param _address address * @return uint */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 4808, 5035 ] }
7,916
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
claimed
function claimed( address _address ) public view returns ( uint ) { return wOHM.wOHMTosOHM( terms[ _address ].wClaimed ).add( terms[ _address ].claimed ); }
/** * @notice view OHM claimed by address. OHM decimals (9). * @param _address address * @return uint */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 5175, 5350 ] }
7,917
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
circulatingSupply
function circulatingSupply() public view returns ( uint ) { return OHM.totalSupply().sub( OHM.balanceOf( DAO ) ); }
/** * @notice view circulating supply of OHM * @notice calculated as total supply minus DAO holdings * @return uint */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 5504, 5638 ] }
7,918
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
setTerms
function setTerms(address _address, uint _amountCanClaim, uint _rate, uint _hasClaimed ) external { require( msg.sender == owner, "Sender is not owner" ); require( _amountCanClaim >= terms[ _address ].max, "cannot lower amount claimable" ); require( _rate >= terms[ _address ].percent, "cannot lower vesti...
/** * @notice set terms for new address * @notice cannot lower for address or exceed maximum total allocation * @param _address address * @param _amountCanClaim uint * @param _rate uint * @param _hasClaimed uint */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 5964, 6697 ] }
7,919
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
pushOwnership
function pushOwnership( address _newOwner ) external { require( msg.sender == owner, "Sender is not owner" ); require( _newOwner != address(0) ); newOwner = _newOwner; }
/** * @notice push ownership of contract * @param _newOwner address */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 6796, 7002 ] }
7,920
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
pullOwnership
function pullOwnership() external { require( msg.sender == newOwner ); owner = newOwner; newOwner = address(0); }
/** * @notice pull ownership of contract */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 7071, 7221 ] }
7,921
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() external { require( msg.sender == owner, "Sender is not owner" ); owner = address(0); newOwner = address(0); }
/** * @notice renounce ownership of contract (no owner) */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 7301, 7482 ] }
7,922
GenesisClaim
GenesisClaim.sol
0xeaaa9d97be33a764031eddeba1cb6cb385350ca3
Solidity
GenesisClaim
contract GenesisClaim { /* ========== DEPENDENCIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STRUCTS ========== */ struct Term { uint percent; // 4 decimals ( 5000 = 0.5% ) uint claimed; // static number uint wClaimed...
/** * This contract allows Olympus genesis contributors to claim OHM. It has been * revised to consider 2/3 tokens as staked at the time of claim; previously, * no claims were treated as staked. This change keeps network ownership in check. * 100% can be treated as staked, if the DAO sees fit to do so. *...
NatSpecMultiLine
treatAllAsStaked
function treatAllAsStaked() external { require( msg.sender == DAO, "Sender is not DAO" ); useStatic = false; }
/** * @notice all claims tracked under wClaimed (and track rebase) */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
Unknown
ipfs://5a515a354374dc9dd911960dee7091835ca7ba191068dea401122cc4c67afa84
{ "func_code_index": [ 7623, 7763 ] }
7,923
Master
contracts/external/ERC20Detailed.sol
0x26d93492ce054fe4ac0181998fa9965a2b6d948d
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
/** * @dev Optional functions from the ERC20 standard. */
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
None
bzzr://9e44dfd319eadf914d318b449a2ad6c42edb3330632184b0da6ff7b44b75a83f
{ "func_code_index": [ 550, 638 ] }
7,924
Master
contracts/external/ERC20Detailed.sol
0x26d93492ce054fe4ac0181998fa9965a2b6d948d
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
/** * @dev Optional functions from the ERC20 standard. */
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
None
bzzr://9e44dfd319eadf914d318b449a2ad6c42edb3330632184b0da6ff7b44b75a83f
{ "func_code_index": [ 752, 844 ] }
7,925
Master
contracts/external/ERC20Detailed.sol
0x26d93492ce054fe4ac0181998fa9965a2b6d948d
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
/** * @dev Optional functions from the ERC20 standard. */
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * *...
NatSpecMultiLine
v0.5.16+commit.9c3226ce
None
bzzr://9e44dfd319eadf914d318b449a2ad6c42edb3330632184b0da6ff7b44b75a83f
{ "func_code_index": [ 1408, 1496 ] }
7,926
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
addRaffleManager
function addRaffleManager(address account) public onlyAdmin { grantRole(RAFFLE_MANAGER_ROLE, account); emit RaffleManagerAdded(account, managerOf); }
/** * @dev Adds a new account to the manager role * @param account The account that will have the manager role */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 1629, 1791 ] }
7,927
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
renounceRaffleManager
function renounceRaffleManager() public { renounceRole(RAFFLE_MANAGER_ROLE, msg.sender); emit RaffleManagerRemoved(msg.sender, managerOf); }
/** * @dev Removes the sender from the list the manager role */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 1863, 2016 ] }
7,928
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
isRaffleManager
function isRaffleManager(address account) public view returns (bool) { return hasRole(RAFFLE_MANAGER_ROLE, account); }
/** * @dev checks if the given account is a prizeManager * @param account The account that will be checked */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 2136, 2262 ] }
7,929
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
removeRaffleManager
function removeRaffleManager(address manager) public onlyAdmin { revokeRole(RAFFLE_MANAGER_ROLE, manager); emit RaffleManagerRemoved(manager, managerOf); }
/** * @dev Removes the given account from the manager role, if msg.sender is manager * @param manager The account that will have the manager role removed */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 2429, 2597 ] }
7,930
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
isPrizeManager
function isPrizeManager(address account) public view returns (bool) { return hasRole(PRIZE_MANAGER_ROLE, account); }
/** * @dev checks if the given account is a prizeManager * @param account The account that will be checked */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 2723, 2850 ] }
7,931
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
addPrizeManager
function addPrizeManager(address account) public onlyAdmin virtual { grantRole(PRIZE_MANAGER_ROLE, account); emit PrizeManagerAdded(account, managerOf); }
/** * @dev Adds a new account to the prizeManager role * @param account The account that will have the prizeManager role */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 2991, 3162 ] }
7,932
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
renouncePrizeManager
function renouncePrizeManager() public { renounceRole(PRIZE_MANAGER_ROLE, msg.sender); emit PrizeManagerRemoved(msg.sender, managerOf); }
/** * @dev Removes the sender from the list the prizeManager role */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 3244, 3398 ] }
7,933
Raffle
contracts/AccessControl/RaffleAdminAccessControl.sol
0x13838388afa16c7a2507dd65feb961b53bb7b78c
Solidity
RaffleAdminAccessControl
contract RaffleAdminAccessControl is AccessControlEnumerable { bytes32 public constant RAFFLE_MANAGER_ROLE = keccak256("RAFFLE_MANAGER_ROLE"); bytes32 public constant PRIZE_MANAGER_ROLE = keccak256("PRIZE_MANAGER_ROLE"); address public managerOf; event RaffleManagerAdded(address indexed account, address manag...
removePrizeManager
function removePrizeManager(address prizeManager) onlyAdmin public { revokeRole(PRIZE_MANAGER_ROLE, prizeManager); emit PrizeManagerRemoved(prizeManager, managerOf); }
/** * @dev Removes the given account from the prizeManager role, if msg.sender is admin * @param prizeManager The account that will have the prizeManager role removed */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
{ "func_code_index": [ 3585, 3769 ] }
7,934
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
Buffer
library Buffer { struct buffer { bytes buf; uint capacity; } function init(buffer memory buf, uint _capacity) internal pure { uint capacity = _capacity; if(capacity % 32 != 0) capacity += 32 - (capacity % 32); // Allocate space for the buffer data b...
/* Begin solidity-cborutils https://github.com/smartcontractkit/solidity-cborutils MIT License Copyright (c) 2018 SmartContract ChainLink, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to de...
Comment
append
function append(buffer memory buf, bytes data) internal pure returns(buffer memory) { if(data.length + buf.buf.length > buf.capacity) { resize(buf, max(buf.capacity, data.length) * 2); } uint dest; uint src; uint len = data.length; assembly { // Memory address of the bu...
/** * @dev Appends a byte array to the end of the buffer. Resizes if doing so * would exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 1123, 2417 ] }
7,935
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
Buffer
library Buffer { struct buffer { bytes buf; uint capacity; } function init(buffer memory buf, uint _capacity) internal pure { uint capacity = _capacity; if(capacity % 32 != 0) capacity += 32 - (capacity % 32); // Allocate space for the buffer data b...
/* Begin solidity-cborutils https://github.com/smartcontractkit/solidity-cborutils MIT License Copyright (c) 2018 SmartContract ChainLink, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to de...
Comment
append
function append(buffer memory buf, uint8 data) internal pure { if(buf.buf.length + 1 > buf.capacity) { resize(buf, buf.capacity * 2); } assembly { // Memory address of the buffer data let bufptr := mload(buf) // Length of existing buffer data let buflen := m...
/** * @dev Appends a byte to the end of the buffer. Resizes if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 2682, 3318 ] }
7,936
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
Buffer
library Buffer { struct buffer { bytes buf; uint capacity; } function init(buffer memory buf, uint _capacity) internal pure { uint capacity = _capacity; if(capacity % 32 != 0) capacity += 32 - (capacity % 32); // Allocate space for the buffer data b...
/* Begin solidity-cborutils https://github.com/smartcontractkit/solidity-cborutils MIT License Copyright (c) 2018 SmartContract ChainLink, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to de...
Comment
appendInt
function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) { if(len + buf.buf.length > buf.capacity) { resize(buf, max(buf.capacity, len) * 2); } uint mask = 256 ** len - 1; assembly { // Memory address of the buffer data let bufptr :...
/** * @dev Appends a byte to the end of the buffer. Resizes if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 3583, 4365 ] }
7,937
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Ledger = 0x30; byte constant proofType_Android = 0x40; ...
/* End solidity-cborutils */
Comment
parseInt
function parseInt(string _a) internal pure returns (uint) { return parseInt(_a, 0); }
// parseInt
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 27483, 27587 ] }
7,938
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Ledger = 0x30; byte constant proofType_Android = 0x40; ...
/* End solidity-cborutils */
Comment
parseInt
function parseInt(string _a, uint _b) internal pure returns (uint) { bytes memory bresult = bytes(_a); uint mint = 0; bool decimals = false; for (uint i=0; i<bresult.length; i++){ if ((bresult[i] >= 48)&&(bresult[i] <= 57)){ if (decimals){ if (_b == 0) break; ...
// parseInt(parseFloat*10^_b)
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 27625, 28239 ] }
7,939
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Ledger = 0x30; byte constant proofType_Android = 0x40; ...
/* End solidity-cborutils */
Comment
copyBytes
function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal pure returns (bytes) { uint minLength = length + toOffset; // Buffer too small require(to.length >= minLength); // Should be a better way? // NOTE: the offset 32 is added to skip the `size` field of bo...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 38942, 39633 ] }
7,940
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Ledger = 0x30; byte constant proofType_Android = 0x40; ...
/* End solidity-cborutils */
Comment
safer_ecrecover
function safer_ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal returns (bool, address) { // We do our own memory management here. Solidity uses memory offset // 0x40 to store the current end of memory. We write past it (as // writes are memory extensions), but don't update the offset so ...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license // Duplicate Solidity's ecrecover, but catching the CALL return value
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 39830, 40833 ] }
7,941
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Ledger = 0x30; byte constant proofType_Android = 0x40; ...
/* End solidity-cborutils */
Comment
ecrecovery
function ecrecovery(bytes32 hash, bytes sig) internal returns (bool, address) { bytes32 r; bytes32 s; uint8 v; if (sig.length != 65) return (false, 0); // The signature format is a compact form of: // {bytes32 r}{bytes32 s}{uint8 v} // Compact means, uint8 is not padded t...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 40955, 42381 ] }
7,942
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
Crowdsale
contract Crowdsale is usingOraclize { using SafeMath for uint256; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; token tokenReward; // amount of raised money in wei uint256 public weiRaised; /** * event for...
function () public payable { buyTokens(msg.sender); }
// fallback function can be used to buy tokens
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 1572, 1636 ] }
7,943
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
Crowdsale
contract Crowdsale is usingOraclize { using SafeMath for uint256; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; token tokenReward; // amount of raised money in wei uint256 public weiRaised; /** * event for...
buyTokens
function buyTokens(address beneficiary) public payable { require(beneficiary != 0x0); require(validPurchase()); uint256 weiAmount = msg.value; // update state weiRaised = weiRaised.add(weiAmount); emit newOraclizeQuery("Oraclize query was sent, standing by for the answer.."); bytes32 qu...
// low level token purchase function
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 2272, 2840 ] }
7,944
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
Crowdsale
contract Crowdsale is usingOraclize { using SafeMath for uint256; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; token tokenReward; // amount of raised money in wei uint256 public weiRaised; /** * event for...
forwardFunds
function forwardFunds() internal { wallet.transfer(address(this).balance); }
// send ether to the fund collection wallet // override to create custom fund forwarding mechanisms
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 2949, 3036 ] }
7,945
Crowdsale
Crowdsale.sol
0xd011c319a81085155935ac113115b2ee07d7d425
Solidity
Crowdsale
contract Crowdsale is usingOraclize { using SafeMath for uint256; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; token tokenReward; // amount of raised money in wei uint256 public weiRaised; /** * event for...
validPurchase
function validPurchase() internal constant returns (bool) { bool withinPeriod = started; bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; }
// @return true if the transaction can buy tokens
LineComment
v0.4.24+commit.e67f0147
bzzr://40403a8be6ee11425a7e6a93fc8b6c99d38febc7ff683510a4ecc32f7f8fc351
{ "func_code_index": [ 3092, 3282 ] }
7,946
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
Token
contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public ...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20
LineComment
totalSupply
function totalSupply() public view returns (uint256 supply);
//uint256 public totalSupply;
LineComment
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 524, 590 ] }
7,947
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
Token
contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public ...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20
LineComment
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance);
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 698, 777 ] }
7,948
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
Token
contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public ...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20
LineComment
transfer
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 1014, 1097 ] }
7,949
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
Token
contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public ...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20
LineComment
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 1420, 1522 ] }
7,950
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
Token
contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public ...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20
LineComment
approve
function approve(address _spender, uint256 _value) public returns (bool success);
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 1806, 1893 ] }
7,951
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
Token
contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public ...
// Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20
LineComment
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 2101, 2200 ] }
7,952
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
OFV2
contract OFV2 is Token{ using SafeMath for uint256; string public name = "Orb Finance V2"; // Set the name for display purposes string public symbol = "OFV2";// Set the symbol for display purposes uint8 public decimals = 18; uint256 public totalSupply; address public owner; /* This c...
/// OFV2 token, ERC20 compliant
NatSpecSingleLine
transfer
function transfer(address _to, uint256 _value) public returns (bool){ require(_to != address(0)); // Prevent transfer to 0x0 address. Use burn() instead require(_value <= balanceOf[msg.sender]); // Check if the sender has enough require(balanceOf[_to] + _value >...
/* Send coins */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 1105, 1872 ] }
7,953
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
OFV2
contract OFV2 is Token{ using SafeMath for uint256; string public name = "Orb Finance V2"; // Set the name for display purposes string public symbol = "OFV2";// Set the symbol for display purposes uint8 public decimals = 18; uint256 public totalSupply; address public owner; /* This c...
/// OFV2 token, ERC20 compliant
NatSpecSingleLine
approve
function approve(address _spender, uint256 _value)public returns (bool success) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/* Allow another contract to spend some tokens in your behalf */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 1945, 2178 ] }
7,954
OFV2
OFV2.sol
0xb6b309934a16a797a4b92bb6f46427cde1ffc457
Solidity
OFV2
contract OFV2 is Token{ using SafeMath for uint256; string public name = "Orb Finance V2"; // Set the name for display purposes string public symbol = "OFV2";// Set the symbol for display purposes uint8 public decimals = 18; uint256 public totalSupply; address public owner; /* This c...
/// OFV2 token, ERC20 compliant
NatSpecSingleLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_to != address(0)); // Prevent transfer to 0x0 address. Use burn() instead require(_value <= balanceOf[_from]); // Check if the sender has enough re...
/* A contract attempts to get the coins */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://5d98eb6faef520a5354e5eb2c5027c00db0e4710afaed21c132fe0ecd240cc01
{ "func_code_index": [ 2238, 3114 ] }
7,955
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 399, 491 ] }
7,956
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 1050, 1149 ] }
7,957
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 1299, 1496 ] }
7,958
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
/** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 374, 455 ] }
7,959
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
Solidity
ERC165
abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interface...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 103, 265 ] }
7,960
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 719, 798 ] }
7,961
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 944, 1021 ] }
7,962
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 1733, 1850 ] }
7,963
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 2376, 2489 ] }
7,964
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 2962, 3022 ] }
7,965
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 3176, 3260 ] }
7,966
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 3587, 3662 ] }
7,967
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 3813, 3906 ] }
7,968
GhettoGrannyClub
@openzeppelin/contracts/access/Ownable.sol
0x2a2efa26af7d5c61b371bce8b4a5006adbef3588
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.0+commit.c7dfd78e
MIT
ipfs://424e3dba9d144c3a3c9e9b7b8263f195736fcd364dccfa6156e0f1be16d6a030
{ "func_code_index": [ 4483, 4630 ] }
7,969
DegenPass
contracts/DegenPass.sol
0x31b6d1289f96818e79dbb271bf77e8132b86e814
Solidity
DegenPass
contract DegenPass is ERC1155, Ownable, ReentrancyGuard { string public constant name = "Degen Pass"; string public constant symbol = "DEP"; uint private constant maxPasses = 222; uint public passCount = 0; uint private constant passID = 1; bool public isSecondPass = false; bool public is...
mintListMint
function mintListMint(bytes32[] calldata _merkleProof) external nonReentrant{ require(passCount < maxPasses, "Sold out."); require((whiteListMints[msg.sender] < 1) || (isSecondPass && (whiteListMints[msg.sender] < 2)), "Reached mint limit."); require(MerkleProof.verify(_merkleProof, merkleRoot,keccak256(abi.en...
/** Allows mintlisted members to mint 1 pass during the first pass and allows them to mint 1 more during the second pass. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
MIT
ipfs://865fab381d3d28ff78a6f85e1f9ea4b80b1974534177716cbc4b2e8d624a7070
{ "func_code_index": [ 737, 1253 ] }
7,970
DegenPass
contracts/DegenPass.sol
0x31b6d1289f96818e79dbb271bf77e8132b86e814
Solidity
DegenPass
contract DegenPass is ERC1155, Ownable, ReentrancyGuard { string public constant name = "Degen Pass"; string public constant symbol = "DEP"; uint private constant maxPasses = 222; uint public passCount = 0; uint private constant passID = 1; bool public isSecondPass = false; bool public is...
ownerMint
function ownerMint(address _to, uint _amount) external onlyOwner { require(passCount + _amount <= maxPasses, "Sold out."); passCount += _amount; _mint(_to, passID, _amount, ""); }
/** Allows contract owner to mint while still under mint limit. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
MIT
ipfs://865fab381d3d28ff78a6f85e1f9ea4b80b1974534177716cbc4b2e8d624a7070
{ "func_code_index": [ 1614, 1814 ] }
7,971
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
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 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); T...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 268, 659 ] }
7,972
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
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 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view 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.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 865, 977 ] }
7,973
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); 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 * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 401, 853 ] }
7,974
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 1485, 1675 ] }
7,975
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 1999, 2130 ] }
7,976
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 2375, 2639 ] }
7,977
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 261, 321 ] }
7,978
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 644, 820 ] }
7,979
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
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 address that ...
/** * @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 public returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 483, 754 ] }
7,980
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
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 address that ...
/** * @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 canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 871, 1013 ] }
7,981
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
YRXToken
contract YRXToken is MintableToken { string public constant name = "Yoritex Token"; string public constant symbol = "YRX"; uint8 public constant decimals = 18; address public crowdsaleAddress; uint256 public constant INITIAL_SUPPLY = 510000000 * 1 ether; modifier nonZeroAddress(address...
/** * @title YRXToken * @dev ERC20 based Token, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */
NatSpecMultiLine
YRXToken
function YRXToken() public { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = totalSupply; }
/** * @dev Constructor that gives msg.sender all of existing tokens. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 991, 1115 ] }
7,982
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
YRXToken
contract YRXToken is MintableToken { string public constant name = "Yoritex Token"; string public constant symbol = "YRX"; uint8 public constant decimals = 18; address public crowdsaleAddress; uint256 public constant INITIAL_SUPPLY = 510000000 * 1 ether; modifier nonZeroAddress(address...
/** * @title YRXToken * @dev ERC20 based Token, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */
NatSpecMultiLine
setCrowdsaleAddress
function setCrowdsaleAddress(address _crowdsaleAddress) external onlyOwner nonZeroAddress(_crowdsaleAddress) returns (bool success){ require(crowdsaleAddress == 0x0); crowdsaleAddress = _crowdsaleAddress; decrementBalance(owner, totalSupply); addToBalance(crowdsaleAddress, totalSupply); Transfe...
// ------------------------------------------------- // Sets the crowdsale address, can only be done once // -------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 1292, 1705 ] }
7,983
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
YRXToken
contract YRXToken is MintableToken { string public constant name = "Yoritex Token"; string public constant symbol = "YRX"; uint8 public constant decimals = 18; address public crowdsaleAddress; uint256 public constant INITIAL_SUPPLY = 510000000 * 1 ether; modifier nonZeroAddress(address...
/** * @title YRXToken * @dev ERC20 based Token, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */
NatSpecMultiLine
transferFromCrowdsale
function transferFromCrowdsale(address _to, uint256 _amount) external onlyCrowdsale nonZeroAmount(_amount) nonZeroAddress(_to) returns (bool success) { require(balanceOf(crowdsaleAddress) >= _amount); decrementBalance(crowdsaleAddress, _amount); addToBalance(_to, _amount); Transfer(0x0, _to, _amount...
// ------------------------------------------------- // Function for the Crowdsale to transfer tokens // -------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 1878, 2250 ] }
7,984
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
YRXToken
contract YRXToken is MintableToken { string public constant name = "Yoritex Token"; string public constant symbol = "YRX"; uint8 public constant decimals = 18; address public crowdsaleAddress; uint256 public constant INITIAL_SUPPLY = 510000000 * 1 ether; modifier nonZeroAddress(address...
/** * @title YRXToken * @dev ERC20 based Token, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */
NatSpecMultiLine
addToBalance
function addToBalance(address _address, uint _amount) internal { balances[_address] = balances[_address].add(_amount); }
// ------------------------------------------------- // Adds to balance // -------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 2393, 2532 ] }
7,985
YRXToken
YRXToken.sol
0x0c36d834a50e9149ff38ea6221cfaeabf607d57d
Solidity
YRXToken
contract YRXToken is MintableToken { string public constant name = "Yoritex Token"; string public constant symbol = "YRX"; uint8 public constant decimals = 18; address public crowdsaleAddress; uint256 public constant INITIAL_SUPPLY = 510000000 * 1 ether; modifier nonZeroAddress(address...
/** * @title YRXToken * @dev ERC20 based Token, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */
NatSpecMultiLine
decrementBalance
function decrementBalance(address _address, uint _amount) internal { balances[_address] = balances[_address].sub(_amount); }
// ------------------------------------------------- // Removes from balance // -------------------------------------------------
LineComment
v0.4.18+commit.9cf6e910
bzzr://a27a0f711955159ad9c4bc45ea157ace8a419e7948057a6b6b07df3953440255
{ "func_code_index": [ 2680, 2823 ] }
7,986
TNT
TNT.sol
0x23221fe28dadf788c7c59d0367bafef3b1607344
Solidity
TNT
contract TNT { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (addres...
TNT
function TNT() { initialSupply = 100000000; name ="TNT"; decimals = 0; symbol = "P"; balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens totalSupply = initialSupply; // Update total supply ...
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.19+commit.c4cbbb05
bzzr://6005f2b24e487fa37434c61f4e26e4bb23ec61e3c1235574b77416f8cf9691b5
{ "func_code_index": [ 522, 890 ] }
7,987
TNT
TNT.sol
0x23221fe28dadf788c7c59d0367bafef3b1607344
Solidity
TNT
contract TNT { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (addres...
transfer
function transfer(address _to, uint256 _value) { if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender balance...
/* Send coins */
Comment
v0.4.19+commit.c4cbbb05
bzzr://6005f2b24e487fa37434c61f4e26e4bb23ec61e3c1235574b77416f8cf9691b5
{ "func_code_index": [ 915, 1349 ] }
7,988
TNT
TNT.sol
0x23221fe28dadf788c7c59d0367bafef3b1607344
Solidity
TNT
contract TNT { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (addres...
function () { throw; // Prevents accidental sending of ether }
/* This unnamed function is called whenever someone tries to send ether to it */
Comment
v0.4.19+commit.c4cbbb05
bzzr://6005f2b24e487fa37434c61f4e26e4bb23ec61e3c1235574b77416f8cf9691b5
{ "func_code_index": [ 1460, 1545 ] }
7,989
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return metadataURI; }
// === URI ===
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 2105, 2219 ] }
7,990
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setBaseURI
function setBaseURI(string memory uri) public onlyOwner { metadataURI = uri; }
/// Set the base UIR for this collection. /// @param uri the new uri. /// @dev update the baseURI.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 2332, 2426 ] }
7,991
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
pauseSale
function pauseSale() external onlyOwner { state = SaleState.Paused; }
/// Pause sale.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 2475, 2560 ] }
7,992
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
startPresale
function startPresale() external onlyOwner { state = SaleState.Presale; }
/// Start Presale, if paused.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 3256, 3345 ] }
7,993
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
startCollectorsSale
function startCollectorsSale() external onlyOwner { state = SaleState.Collectors; }
/// Start Collectors sale, if paused.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 4066, 4165 ] }
7,994
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
startSale
function startSale(uint256 timeStamp) external onlyOwner { state = SaleState.Sale; revealTimeStamp = timeStamp; }
/// Start Sale, if paused.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 4198, 4335 ] }
7,995
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setPrice
function setPrice(uint256 _price) public onlyOwner whenSalePaused { require(_price > 0, "SuperRocks: Invalid price"); price = _price; }
// === Minting ===
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 4361, 4520 ] }
7,996
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
mintSuperRock
function mintSuperRock(uint8 numberOfTokens) public payable nonReentrant { require(state == SaleState.Sale, "SuperRocks: Minting not allowed"); uint256 supply = totalSupply(); require( supply + numberOfTokens <= MAX_ROCKS, "SuperRocks: More than max supply" ); require( numb...
/// Mints SuperRocks
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 4547, 5671 ] }
7,997
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setProvenanceHash
function setProvenanceHash(string memory provenance) public onlyOwner { require( isProvenanceHashFrozen == false, "SuperRocks: Provenance is frozen" ); provenanceHash = provenance; }
/// Set provenance hash once it's calculated.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 7786, 8024 ] }
7,998
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setRandomStartingIndex
function setRandomStartingIndex() public { require(randomStartingIndex == 0, "SuperRocks: index is set"); require(randomStartingIndexBlock != 0, "SuperRocks: block must be set"); randomStartingIndex = calculateStartingIndex(randomStartingIndexBlock); // Just a sanity case in the worst case if this fun...
/// Set the random starting index for the collection.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 8371, 9046 ] }
7,999
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
emergencySetRandomStartingIndexBlock
function emergencySetRandomStartingIndexBlock() public onlyOwner { require(randomStartingIndex == 0, "SuperRocks: index is set"); randomStartingIndexBlock = block.number; }
/// Set the random starting index block for the collection.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 9112, 9308 ] }
8,000
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
reserveTeamRocks
function reserveTeamRocks(uint8 numberOfTokens) public onlyOwner { uint256 supply = totalSupply(); require( supply + numberOfTokens <= MAX_ROCKS, "SuperRocks: More than max supply" ); require( teamSupply + numberOfTokens <= TEAM_RESERVED_ROCKS_LIMIT, "SuperRocks: Reached ...
/// Set some tokens aside for marketing.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 9384, 9921 ] }
8,001
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
withdrawAll
function withdrawAll() public onlyOwner { uint256 balance = address(this).balance; require(balance > 0, "SuperRocks: Nothing to split"); uint256 split1 = (balance * 15) / 100; _widthdraw(dev1, split1); uint256 split2 = (balance * 15) / 100; _widthdraw(dev2, split2); uint256 split3 = (bala...
/// Split the balance to all wallets.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 10346, 11343 ] }
8,002
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view override returns (bool) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return tr...
/// Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 11664, 12100 ] }
8,003
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setProxyRegistryAddress
function setProxyRegistryAddress(address _proxyRegistryAddress) public onlyOwner { proxyRegistryAddress = _proxyRegistryAddress; }
/// Update the registry address in case of an error.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 12159, 12325 ] }
8,004
SuperRocks
contracts/SuperRocks.sol
0xf66bb6beebd5942d71e5e64e6008ef722f90a050
Solidity
SuperRocks
contract SuperRocks is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleState { Paused, Collectors, Presale, Sale } SaleState public state; // Provenance string public provenanceHash = ""; uint256 public randomStarti...
/** * @title SuperRocks contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setRoyalty
function setRoyalty(address _royaltyAddress, uint256 _royaltyBasis) public onlyOwner { royaltyAddress = _royaltyAddress; royaltyBasis = _royaltyBasis; }
// === Royalties ===
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 12353, 12549 ] }
8,005
CosmicLabs
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/Math.sol
0x96316355c44be69414756d6706c61e61aecbd5f3
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure r...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
max
function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; }
/** * @dev Returns the largest of two numbers. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://a10847e6cf20c66bce0dfc9f136d780180511ecda3b9a86ce938006f46eec852
{ "func_code_index": [ 83, 195 ] }
8,006