comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
'Hm, no meta plays for this signer' | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
}
/**
* @dev remove an address' access to this role
*/
function remove(Role storage role, address addr)
internal
{
}
/**
* @dev check if an address has this role
* // reverts
*/
function check(Role storage role, address addr)
view
internal
{
}
/**
* @dev check if an address has this role
* @return bool
*/
function has(Role storage role, address addr)
view
internal
returns (bool)
{
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract RBAC {
using Roles for Roles.Role;
mapping (string => Roles.Role) private roles;
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
/**
* @dev reverts if addr does not have role
* @param addr address
* @param roleName the name of the role
* // reverts
*/
function checkRole(address addr, string roleName)
view
public
{
}
/**
* @dev determine if addr has role
* @param addr address
* @param roleName the name of the role
* @return bool
*/
function hasRole(address addr, string roleName)
view
public
returns (bool)
{
}
/**
* @dev add a role to an address
* @param addr address
* @param roleName the name of the role
*/
function addRole(address addr, string roleName)
internal
{
}
/**
* @dev remove a role from an address
* @param addr address
* @param roleName the name of the role
*/
function removeRole(address addr, string roleName)
internal
{
}
/**
* @dev modifier to scope access to a single role (uses msg.sender as addr)
* @param roleName the name of the role
* // reverts
*/
modifier onlyRole(string roleName)
{
}
/**
* @dev modifier to scope access to a set of roles (uses msg.sender as addr)
* @param roleNames the names of the roles to scope access to
* // reverts
*
* @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
* see: https://github.com/ethereum/solidity/issues/2467
*/
// modifier onlyRoles(string[] roleNames) {
// bool hasAnyRole = false;
// for (uint8 i = 0; i < roleNames.length; i++) {
// if (hasRole(msg.sender, roleNames[i])) {
// hasAnyRole = true;
// break;
// }
// }
// require(hasAnyRole);
// _;
// }
}
contract Whitelist is Ownable, RBAC {
event WhitelistedAddressAdded(address addr);
event WhitelistedAddressRemoved(address addr);
string public constant ROLE_WHITELISTED = "whitelist";
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
/**
* @dev add an address to the whitelist
* @param addr address
* @return true if the address was added to the whitelist, false if the address was already in the whitelist
*/
function addAddressToWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev getter to determine if address is in whitelist
*/
function whitelist(address addr)
public
view
returns (bool)
{
}
/**
* @dev add addresses to the whitelist
* @param addrs addresses
* @return true if at least one address was added to the whitelist,
* false if all addresses were already in the whitelist
*/
function addAddressesToWhitelist(address[] addrs)
onlyOwner
public
{
}
/**
* @dev remove an address from the whitelist
* @param addr address
* @return true if the address was removed from the whitelist,
* false if the address wasn't in the whitelist in the first place
*/
function removeAddressFromWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev remove addresses from the whitelist
* @param addrs addresses
* @return true if at least one address was removed from the whitelist,
* false if all addresses weren't in the whitelist in the first place
*/
function removeAddressesFromWhitelist(address[] addrs)
onlyOwner
public
{
}
}
contract StartersProxy is Whitelist{
using SafeMath for uint256;
uint256 public TX_PER_SIGNER_LIMIT = 5; //limit of metatx per signer
uint256 public META_BET = 1 finney; //wei, equal to 0.001 ETH
uint256 public DEBT_INCREASING_FACTOR = 3; //increasing factor (times) applied on the bet
struct Record {
uint256 nonce;
uint256 debt;
}
mapping(address => Record) signersBacklog;
event Received (address indexed sender, uint value);
event Forwarded (address signer, address destination, uint value, bytes data);
function() public payable {
}
constructor(address[] _senders) public {
}
function forwardPlay(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forwardWin(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
require(<FILL_ME>)
forward(signer, destination, 0, data, hash, signature);
}
function forward(address signer, address destination, uint256 value, bytes data, bytes32 hash, bytes signature) internal {
}
//borrowed from OpenZeppelin's ESDA stuff:
//https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/cryptography/ECDSA.sol
function recoverSigner(bytes32 _hash, bytes _signature) onlyWhitelisted public view returns (address){
}
// this originally was copied from GnosisSafe
// https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/GnosisSafe.sol
function executeCall(address to, uint256 value, bytes data) internal returns (bool success) {
}
function payDebt(address signer) public payable{
}
function debt(address signer) public view returns (uint256) {
}
function gamesLeft(address signer) public view returns (uint256) {
}
function withdraw(uint256 amountWei) onlyWhitelisted public {
}
function setMetaBet(uint256 _newMetaBet) onlyWhitelisted public {
}
function setTxLimit(uint256 _newTxLimit) onlyWhitelisted public {
}
function setDebtIncreasingFactor(uint256 _newFactor) onlyWhitelisted public {
}
}
| signersBacklog[signer].nonce>0,'Hm, no meta plays for this signer' | 303,866 | signersBacklog[signer].nonce>0 |
null | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
}
/**
* @dev remove an address' access to this role
*/
function remove(Role storage role, address addr)
internal
{
}
/**
* @dev check if an address has this role
* // reverts
*/
function check(Role storage role, address addr)
view
internal
{
}
/**
* @dev check if an address has this role
* @return bool
*/
function has(Role storage role, address addr)
view
internal
returns (bool)
{
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract RBAC {
using Roles for Roles.Role;
mapping (string => Roles.Role) private roles;
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
/**
* @dev reverts if addr does not have role
* @param addr address
* @param roleName the name of the role
* // reverts
*/
function checkRole(address addr, string roleName)
view
public
{
}
/**
* @dev determine if addr has role
* @param addr address
* @param roleName the name of the role
* @return bool
*/
function hasRole(address addr, string roleName)
view
public
returns (bool)
{
}
/**
* @dev add a role to an address
* @param addr address
* @param roleName the name of the role
*/
function addRole(address addr, string roleName)
internal
{
}
/**
* @dev remove a role from an address
* @param addr address
* @param roleName the name of the role
*/
function removeRole(address addr, string roleName)
internal
{
}
/**
* @dev modifier to scope access to a single role (uses msg.sender as addr)
* @param roleName the name of the role
* // reverts
*/
modifier onlyRole(string roleName)
{
}
/**
* @dev modifier to scope access to a set of roles (uses msg.sender as addr)
* @param roleNames the names of the roles to scope access to
* // reverts
*
* @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
* see: https://github.com/ethereum/solidity/issues/2467
*/
// modifier onlyRoles(string[] roleNames) {
// bool hasAnyRole = false;
// for (uint8 i = 0; i < roleNames.length; i++) {
// if (hasRole(msg.sender, roleNames[i])) {
// hasAnyRole = true;
// break;
// }
// }
// require(hasAnyRole);
// _;
// }
}
contract Whitelist is Ownable, RBAC {
event WhitelistedAddressAdded(address addr);
event WhitelistedAddressRemoved(address addr);
string public constant ROLE_WHITELISTED = "whitelist";
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
/**
* @dev add an address to the whitelist
* @param addr address
* @return true if the address was added to the whitelist, false if the address was already in the whitelist
*/
function addAddressToWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev getter to determine if address is in whitelist
*/
function whitelist(address addr)
public
view
returns (bool)
{
}
/**
* @dev add addresses to the whitelist
* @param addrs addresses
* @return true if at least one address was added to the whitelist,
* false if all addresses were already in the whitelist
*/
function addAddressesToWhitelist(address[] addrs)
onlyOwner
public
{
}
/**
* @dev remove an address from the whitelist
* @param addr address
* @return true if the address was removed from the whitelist,
* false if the address wasn't in the whitelist in the first place
*/
function removeAddressFromWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev remove addresses from the whitelist
* @param addrs addresses
* @return true if at least one address was removed from the whitelist,
* false if all addresses weren't in the whitelist in the first place
*/
function removeAddressesFromWhitelist(address[] addrs)
onlyOwner
public
{
}
}
contract StartersProxy is Whitelist{
using SafeMath for uint256;
uint256 public TX_PER_SIGNER_LIMIT = 5; //limit of metatx per signer
uint256 public META_BET = 1 finney; //wei, equal to 0.001 ETH
uint256 public DEBT_INCREASING_FACTOR = 3; //increasing factor (times) applied on the bet
struct Record {
uint256 nonce;
uint256 debt;
}
mapping(address => Record) signersBacklog;
event Received (address indexed sender, uint value);
event Forwarded (address signer, address destination, uint value, bytes data);
function() public payable {
}
constructor(address[] _senders) public {
}
function forwardPlay(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forwardWin(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forward(address signer, address destination, uint256 value, bytes data, bytes32 hash, bytes signature) internal {
require(<FILL_ME>)
//execute the transaction with all the given parameters
require(executeCall(destination, value, data));
emit Forwarded(signer, destination, value, data);
}
//borrowed from OpenZeppelin's ESDA stuff:
//https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/cryptography/ECDSA.sol
function recoverSigner(bytes32 _hash, bytes _signature) onlyWhitelisted public view returns (address){
}
// this originally was copied from GnosisSafe
// https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/GnosisSafe.sol
function executeCall(address to, uint256 value, bytes data) internal returns (bool success) {
}
function payDebt(address signer) public payable{
}
function debt(address signer) public view returns (uint256) {
}
function gamesLeft(address signer) public view returns (uint256) {
}
function withdraw(uint256 amountWei) onlyWhitelisted public {
}
function setMetaBet(uint256 _newMetaBet) onlyWhitelisted public {
}
function setTxLimit(uint256 _newTxLimit) onlyWhitelisted public {
}
function setDebtIncreasingFactor(uint256 _newFactor) onlyWhitelisted public {
}
}
| recoverSigner(hash,signature)==signer | 303,866 | recoverSigner(hash,signature)==signer |
null | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
}
/**
* @dev remove an address' access to this role
*/
function remove(Role storage role, address addr)
internal
{
}
/**
* @dev check if an address has this role
* // reverts
*/
function check(Role storage role, address addr)
view
internal
{
}
/**
* @dev check if an address has this role
* @return bool
*/
function has(Role storage role, address addr)
view
internal
returns (bool)
{
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract RBAC {
using Roles for Roles.Role;
mapping (string => Roles.Role) private roles;
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
/**
* @dev reverts if addr does not have role
* @param addr address
* @param roleName the name of the role
* // reverts
*/
function checkRole(address addr, string roleName)
view
public
{
}
/**
* @dev determine if addr has role
* @param addr address
* @param roleName the name of the role
* @return bool
*/
function hasRole(address addr, string roleName)
view
public
returns (bool)
{
}
/**
* @dev add a role to an address
* @param addr address
* @param roleName the name of the role
*/
function addRole(address addr, string roleName)
internal
{
}
/**
* @dev remove a role from an address
* @param addr address
* @param roleName the name of the role
*/
function removeRole(address addr, string roleName)
internal
{
}
/**
* @dev modifier to scope access to a single role (uses msg.sender as addr)
* @param roleName the name of the role
* // reverts
*/
modifier onlyRole(string roleName)
{
}
/**
* @dev modifier to scope access to a set of roles (uses msg.sender as addr)
* @param roleNames the names of the roles to scope access to
* // reverts
*
* @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
* see: https://github.com/ethereum/solidity/issues/2467
*/
// modifier onlyRoles(string[] roleNames) {
// bool hasAnyRole = false;
// for (uint8 i = 0; i < roleNames.length; i++) {
// if (hasRole(msg.sender, roleNames[i])) {
// hasAnyRole = true;
// break;
// }
// }
// require(hasAnyRole);
// _;
// }
}
contract Whitelist is Ownable, RBAC {
event WhitelistedAddressAdded(address addr);
event WhitelistedAddressRemoved(address addr);
string public constant ROLE_WHITELISTED = "whitelist";
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
/**
* @dev add an address to the whitelist
* @param addr address
* @return true if the address was added to the whitelist, false if the address was already in the whitelist
*/
function addAddressToWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev getter to determine if address is in whitelist
*/
function whitelist(address addr)
public
view
returns (bool)
{
}
/**
* @dev add addresses to the whitelist
* @param addrs addresses
* @return true if at least one address was added to the whitelist,
* false if all addresses were already in the whitelist
*/
function addAddressesToWhitelist(address[] addrs)
onlyOwner
public
{
}
/**
* @dev remove an address from the whitelist
* @param addr address
* @return true if the address was removed from the whitelist,
* false if the address wasn't in the whitelist in the first place
*/
function removeAddressFromWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev remove addresses from the whitelist
* @param addrs addresses
* @return true if at least one address was removed from the whitelist,
* false if all addresses weren't in the whitelist in the first place
*/
function removeAddressesFromWhitelist(address[] addrs)
onlyOwner
public
{
}
}
contract StartersProxy is Whitelist{
using SafeMath for uint256;
uint256 public TX_PER_SIGNER_LIMIT = 5; //limit of metatx per signer
uint256 public META_BET = 1 finney; //wei, equal to 0.001 ETH
uint256 public DEBT_INCREASING_FACTOR = 3; //increasing factor (times) applied on the bet
struct Record {
uint256 nonce;
uint256 debt;
}
mapping(address => Record) signersBacklog;
event Received (address indexed sender, uint value);
event Forwarded (address signer, address destination, uint value, bytes data);
function() public payable {
}
constructor(address[] _senders) public {
}
function forwardPlay(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forwardWin(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forward(address signer, address destination, uint256 value, bytes data, bytes32 hash, bytes signature) internal {
require(recoverSigner(hash, signature) == signer);
//execute the transaction with all the given parameters
require(<FILL_ME>)
emit Forwarded(signer, destination, value, data);
}
//borrowed from OpenZeppelin's ESDA stuff:
//https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/cryptography/ECDSA.sol
function recoverSigner(bytes32 _hash, bytes _signature) onlyWhitelisted public view returns (address){
}
// this originally was copied from GnosisSafe
// https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/GnosisSafe.sol
function executeCall(address to, uint256 value, bytes data) internal returns (bool success) {
}
function payDebt(address signer) public payable{
}
function debt(address signer) public view returns (uint256) {
}
function gamesLeft(address signer) public view returns (uint256) {
}
function withdraw(uint256 amountWei) onlyWhitelisted public {
}
function setMetaBet(uint256 _newMetaBet) onlyWhitelisted public {
}
function setTxLimit(uint256 _newTxLimit) onlyWhitelisted public {
}
function setDebtIncreasingFactor(uint256 _newFactor) onlyWhitelisted public {
}
}
| executeCall(destination,value,data) | 303,866 | executeCall(destination,value,data) |
"Address's debt is less than payed amount" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
}
/**
* @dev remove an address' access to this role
*/
function remove(Role storage role, address addr)
internal
{
}
/**
* @dev check if an address has this role
* // reverts
*/
function check(Role storage role, address addr)
view
internal
{
}
/**
* @dev check if an address has this role
* @return bool
*/
function has(Role storage role, address addr)
view
internal
returns (bool)
{
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract RBAC {
using Roles for Roles.Role;
mapping (string => Roles.Role) private roles;
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
/**
* @dev reverts if addr does not have role
* @param addr address
* @param roleName the name of the role
* // reverts
*/
function checkRole(address addr, string roleName)
view
public
{
}
/**
* @dev determine if addr has role
* @param addr address
* @param roleName the name of the role
* @return bool
*/
function hasRole(address addr, string roleName)
view
public
returns (bool)
{
}
/**
* @dev add a role to an address
* @param addr address
* @param roleName the name of the role
*/
function addRole(address addr, string roleName)
internal
{
}
/**
* @dev remove a role from an address
* @param addr address
* @param roleName the name of the role
*/
function removeRole(address addr, string roleName)
internal
{
}
/**
* @dev modifier to scope access to a single role (uses msg.sender as addr)
* @param roleName the name of the role
* // reverts
*/
modifier onlyRole(string roleName)
{
}
/**
* @dev modifier to scope access to a set of roles (uses msg.sender as addr)
* @param roleNames the names of the roles to scope access to
* // reverts
*
* @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
* see: https://github.com/ethereum/solidity/issues/2467
*/
// modifier onlyRoles(string[] roleNames) {
// bool hasAnyRole = false;
// for (uint8 i = 0; i < roleNames.length; i++) {
// if (hasRole(msg.sender, roleNames[i])) {
// hasAnyRole = true;
// break;
// }
// }
// require(hasAnyRole);
// _;
// }
}
contract Whitelist is Ownable, RBAC {
event WhitelistedAddressAdded(address addr);
event WhitelistedAddressRemoved(address addr);
string public constant ROLE_WHITELISTED = "whitelist";
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
/**
* @dev add an address to the whitelist
* @param addr address
* @return true if the address was added to the whitelist, false if the address was already in the whitelist
*/
function addAddressToWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev getter to determine if address is in whitelist
*/
function whitelist(address addr)
public
view
returns (bool)
{
}
/**
* @dev add addresses to the whitelist
* @param addrs addresses
* @return true if at least one address was added to the whitelist,
* false if all addresses were already in the whitelist
*/
function addAddressesToWhitelist(address[] addrs)
onlyOwner
public
{
}
/**
* @dev remove an address from the whitelist
* @param addr address
* @return true if the address was removed from the whitelist,
* false if the address wasn't in the whitelist in the first place
*/
function removeAddressFromWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev remove addresses from the whitelist
* @param addrs addresses
* @return true if at least one address was removed from the whitelist,
* false if all addresses weren't in the whitelist in the first place
*/
function removeAddressesFromWhitelist(address[] addrs)
onlyOwner
public
{
}
}
contract StartersProxy is Whitelist{
using SafeMath for uint256;
uint256 public TX_PER_SIGNER_LIMIT = 5; //limit of metatx per signer
uint256 public META_BET = 1 finney; //wei, equal to 0.001 ETH
uint256 public DEBT_INCREASING_FACTOR = 3; //increasing factor (times) applied on the bet
struct Record {
uint256 nonce;
uint256 debt;
}
mapping(address => Record) signersBacklog;
event Received (address indexed sender, uint value);
event Forwarded (address signer, address destination, uint value, bytes data);
function() public payable {
}
constructor(address[] _senders) public {
}
function forwardPlay(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forwardWin(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forward(address signer, address destination, uint256 value, bytes data, bytes32 hash, bytes signature) internal {
}
//borrowed from OpenZeppelin's ESDA stuff:
//https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/cryptography/ECDSA.sol
function recoverSigner(bytes32 _hash, bytes _signature) onlyWhitelisted public view returns (address){
}
// this originally was copied from GnosisSafe
// https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/GnosisSafe.sol
function executeCall(address to, uint256 value, bytes data) internal returns (bool success) {
}
function payDebt(address signer) public payable{
require(signersBacklog[signer].nonce > 0, "Provided address has no debt");
require(<FILL_ME>)
signersBacklog[signer].debt = signersBacklog[signer].debt.sub(msg.value);
}
function debt(address signer) public view returns (uint256) {
}
function gamesLeft(address signer) public view returns (uint256) {
}
function withdraw(uint256 amountWei) onlyWhitelisted public {
}
function setMetaBet(uint256 _newMetaBet) onlyWhitelisted public {
}
function setTxLimit(uint256 _newTxLimit) onlyWhitelisted public {
}
function setDebtIncreasingFactor(uint256 _newFactor) onlyWhitelisted public {
}
}
| signersBacklog[signer].debt>=msg.value,"Address's debt is less than payed amount" | 303,866 | signersBacklog[signer].debt>=msg.value |
"Purchase would exceed max available apes" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract CAGC is ERC721, Ownable, PaymentSplitter {
uint256 public constant MAX_TOKENS = 6969;
uint256 public constant TOKENS_PER_MINT = 20;
uint256 public mintPrice = 0.03 ether;
uint256 private totalMinted = 0;
uint256 private reservedTokens = 0;
string private _baseTokenURI;
bool public saleIsOpen = false;
mapping (address => bool) private _reserved;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
event MintChadApe (address indexed buyer, uint256 startWith, uint256 batch);
constructor(
address[] memory payees,
uint256[] memory shares,
string memory baseURI
) ERC721("Chad Ape Gym Club", "CAGC") PaymentSplitter(payees, shares) {
}
function mintChadApe(uint256 numberOfTokens) external payable {
require(saleIsOpen, "Sale is not active");
require(numberOfTokens <= TOKENS_PER_MINT, "Max apes per mint exceeded");
require(<FILL_ME>)
require(mintPrice * numberOfTokens <= msg.value, "Ether value sent is not correct");
emit MintChadApe(msg.sender, totalMinted+1, numberOfTokens);
for(uint256 i = 1; i <= numberOfTokens; i++) {
_safeMint(msg.sender, totalMinted + i);
}
totalMinted += numberOfTokens;
}
function reservedMint() external payable {
}
function giveaway(uint256 numberOfTokens, address mintAddress) external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function addToWhitelist(address _addr) external onlyOwner {
}
function batchWhitelist(address[] memory _addrs) external onlyOwner {
}
function removeFromWhitelist(address _addr) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function changePrice(uint256 _newPrice) external onlyOwner {
}
function flipSaleState() external onlyOwner {
}
function getReservedCount() external onlyOwner view returns (uint256) {
}
/**
* Override isApprovedForAll to auto-approve opensea proxy contract
*/
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
/**
* Change the OS proxy if ever needed.
*/
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
}
| totalMinted+numberOfTokens<=MAX_TOKENS-reservedTokens,"Purchase would exceed max available apes" | 303,971 | totalMinted+numberOfTokens<=MAX_TOKENS-reservedTokens |
"You don't have any reserved tokens left" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract CAGC is ERC721, Ownable, PaymentSplitter {
uint256 public constant MAX_TOKENS = 6969;
uint256 public constant TOKENS_PER_MINT = 20;
uint256 public mintPrice = 0.03 ether;
uint256 private totalMinted = 0;
uint256 private reservedTokens = 0;
string private _baseTokenURI;
bool public saleIsOpen = false;
mapping (address => bool) private _reserved;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
event MintChadApe (address indexed buyer, uint256 startWith, uint256 batch);
constructor(
address[] memory payees,
uint256[] memory shares,
string memory baseURI
) ERC721("Chad Ape Gym Club", "CAGC") PaymentSplitter(payees, shares) {
}
function mintChadApe(uint256 numberOfTokens) external payable {
}
function reservedMint() external payable {
require(saleIsOpen, "Sale is not active");
require(<FILL_ME>)
require(mintPrice <= msg.value, "Ether value sent is not correct");
emit MintChadApe(msg.sender, totalMinted + 1, 1);
_safeMint(msg.sender, totalMinted + 1);
totalMinted += 1;
reservedTokens -=1 ;
_reserved[msg.sender] = false;
}
function giveaway(uint256 numberOfTokens, address mintAddress) external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function addToWhitelist(address _addr) external onlyOwner {
}
function batchWhitelist(address[] memory _addrs) external onlyOwner {
}
function removeFromWhitelist(address _addr) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function changePrice(uint256 _newPrice) external onlyOwner {
}
function flipSaleState() external onlyOwner {
}
function getReservedCount() external onlyOwner view returns (uint256) {
}
/**
* Override isApprovedForAll to auto-approve opensea proxy contract
*/
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
/**
* Change the OS proxy if ever needed.
*/
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
}
| _reserved[msg.sender],"You don't have any reserved tokens left" | 303,971 | _reserved[msg.sender] |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
require(<FILL_ME>)
_;
}
modifier onlyReplaceRegulatorServicePermission() {
}
modifier onlyEditRightsPermission() {
}
modifier onlyRemoveWhitelistPermission() {
}
modifier onlyAddWhitelistPermission() {
}
modifier onlyMintablePermission() {
}
modifier onlyRecoveryTokensPermission() {
}
modifier onlyAttributesPermission() {
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| _isLocked[msg.sender]==false&&_lockup[msg.sender]<block.timestamp | 304,038 | _isLocked[msg.sender]==false&&_lockup[msg.sender]<block.timestamp |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
}
modifier onlyReplaceRegulatorServicePermission() {
require(<FILL_ME>)
_;
}
modifier onlyEditRightsPermission() {
}
modifier onlyRemoveWhitelistPermission() {
}
modifier onlyAddWhitelistPermission() {
}
modifier onlyMintablePermission() {
}
modifier onlyRecoveryTokensPermission() {
}
modifier onlyAttributesPermission() {
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| replaceRegulatorServicePermission[msg.sender]||isOwner() | 304,038 | replaceRegulatorServicePermission[msg.sender]||isOwner() |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
}
modifier onlyReplaceRegulatorServicePermission() {
}
modifier onlyEditRightsPermission() {
require(<FILL_ME>)
_;
}
modifier onlyRemoveWhitelistPermission() {
}
modifier onlyAddWhitelistPermission() {
}
modifier onlyMintablePermission() {
}
modifier onlyRecoveryTokensPermission() {
}
modifier onlyAttributesPermission() {
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| editRightsPermission[msg.sender]||isOwner() | 304,038 | editRightsPermission[msg.sender]||isOwner() |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
}
modifier onlyReplaceRegulatorServicePermission() {
}
modifier onlyEditRightsPermission() {
}
modifier onlyRemoveWhitelistPermission() {
require(<FILL_ME>)
_;
}
modifier onlyAddWhitelistPermission() {
}
modifier onlyMintablePermission() {
}
modifier onlyRecoveryTokensPermission() {
}
modifier onlyAttributesPermission() {
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| removeWhitelistPermission[msg.sender]||recoveryTokensPermission[msg.sender]||isOwner() | 304,038 | removeWhitelistPermission[msg.sender]||recoveryTokensPermission[msg.sender]||isOwner() |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
}
modifier onlyReplaceRegulatorServicePermission() {
}
modifier onlyEditRightsPermission() {
}
modifier onlyRemoveWhitelistPermission() {
}
modifier onlyAddWhitelistPermission() {
require(<FILL_ME>)
_;
}
modifier onlyMintablePermission() {
}
modifier onlyRecoveryTokensPermission() {
}
modifier onlyAttributesPermission() {
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| addWhitelistPermission[msg.sender]||recoveryTokensPermission[msg.sender]||isOwner() | 304,038 | addWhitelistPermission[msg.sender]||recoveryTokensPermission[msg.sender]||isOwner() |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
}
modifier onlyReplaceRegulatorServicePermission() {
}
modifier onlyEditRightsPermission() {
}
modifier onlyRemoveWhitelistPermission() {
}
modifier onlyAddWhitelistPermission() {
}
modifier onlyMintablePermission() {
require(<FILL_ME>)
_;
}
modifier onlyRecoveryTokensPermission() {
}
modifier onlyAttributesPermission() {
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| mintablePermission[msg.sender]||recoveryTokensPermission[msg.sender]||isOwner() | 304,038 | mintablePermission[msg.sender]||recoveryTokensPermission[msg.sender]||isOwner() |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
}
modifier onlyReplaceRegulatorServicePermission() {
}
modifier onlyEditRightsPermission() {
}
modifier onlyRemoveWhitelistPermission() {
}
modifier onlyAddWhitelistPermission() {
}
modifier onlyMintablePermission() {
}
modifier onlyRecoveryTokensPermission() {
require(<FILL_ME>)
_;
}
modifier onlyAttributesPermission() {
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| recoveryTokensPermission[msg.sender]||isOwner() | 304,038 | recoveryTokensPermission[msg.sender]||isOwner() |
null | pragma solidity 0.5.8;
import "./ERC20Whitelisted.sol";
contract PermissionService is ERC20Whitelisted {
mapping (address => bool) public mintablePermission;
mapping (address => bool) public addWhitelistPermission;
mapping (address => bool) public removeWhitelistPermission;
mapping (address => bool) public replaceRegulatorServicePermission;
mapping (address => bool) public editRightsPermission;
mapping (address => bool) public recoveryTokensPermission;
mapping (address => bool) public attributesPermission;
mapping (address => bool) internal _isLocked;
mapping (address => uint) internal _lockup;
mapping (address => bool) internal _isAdded;
address[] internal addressesWithPermissions;
modifier onlyUnlocked() {
}
modifier onlyReplaceRegulatorServicePermission() {
}
modifier onlyEditRightsPermission() {
}
modifier onlyRemoveWhitelistPermission() {
}
modifier onlyAddWhitelistPermission() {
}
modifier onlyMintablePermission() {
}
modifier onlyRecoveryTokensPermission() {
}
modifier onlyAttributesPermission() {
require(<FILL_ME>)
_;
}
function lockAddressFor(address account, uint time) public onlyEditRightsPermission {
}
function lockAddress(address account) public onlyEditRightsPermission {
}
function unlockAddress(address account) public onlyEditRightsPermission {
}
function isLocked(address account) public view returns(bool) {
}
function getTimeLockFor(address account) public view returns(uint) {
}
function addMintablePermission(address _address) public onlyEditRightsPermission {
}
function addAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function addReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function addEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function addRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function addAttributesPermission(address _address) public onlyEditRightsPermission {
}
function removeMintablePermission(address _address) public onlyEditRightsPermission {
}
function removeAddWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeRemoveWhitelistPermission(address _address) public onlyEditRightsPermission {
}
function removeReplaceRegulatorServicePermission(address _address) public onlyEditRightsPermission {
}
function removeEditRightsPermission(address _address) public onlyEditRightsPermission {
}
function removeRecoveryTokensPermission(address _address) public onlyEditRightsPermission {
}
function removeAttributesPermission(address _address) public onlyEditRightsPermission {
}
function getAddressesWithPermissions() public view returns(address[] memory) {
}
}
| attributesPermission[msg.sender]||isOwner() | 304,038 | attributesPermission[msg.sender]||isOwner() |
"DragonArena: a dragon with the given id has already joined another fight" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./structs/DragonInfo.sol";
import "./structs/FightInfo.sol";
import "./utils/Random.sol";
import "./LockableReceiver.sol";
import "./DragonToken.sol";
contract DragonArena is LockableReceiver {
using SafeMath for uint;
using Address for address payable;
mapping(uint => uint) private _fights;
mapping(uint => uint) private _dragonFights;
mapping(uint => uint) private _attackers;
uint private _fightPrice;
event JoinFight(address indexed originator, uint fightId, uint dragonId);
event FightFinished(address indexed operator, uint fightId, uint winnerId, bool technicalDefeat);
event FightCancelled(address indexed operator, uint fightId);
constructor(address accessControl, address dragonToken, uint weiFightPrice)
LockableReceiver(accessControl, dragonToken) {
}
function price() external view returns(uint) {
}
function attackerFight(uint attackerId) public view returns (uint) {
}
function fightOf(uint dragonId) public view returns (uint) {
}
function setPrice(uint newPrice) external onlyRole(CFO_ROLE) {
}
function getFightId(bytes calldata fightToken) public pure returns (uint) {
}
function fightInfo(uint fightId) external view returns (FightInfo.Details memory) {
}
function joinFight(uint dragonId, bytes calldata fightToken)
external payable
onlyHolder(dragonId) {
require(<FILL_ME>)
(uint value, FightInfo.Details memory fight) = FightInfo.readDetailsFromToken(fightToken);
require(fight.dragon1Id > 0 && fight.dragon2Id > 0
&& fight.dragon1Id != fight.dragon2Id
&& ((fight.fightType == FightInfo.Types.Regular && fight.betAmount == 0)
|| (fight.fightType == FightInfo.Types.Money && fight.betAmount > 0)), "DragonArena: bad fight token");
require(dragonId == fight.dragon1Id || dragonId == fight.dragon2Id,
"DragonArena: a dragon with the given id is not associated with this fight");
require(msg.value >= (_fightPrice + fight.betAmount), "DragonArena: incorrect amount sent to the contract");
uint fightId = getFightId(fightToken);
// if it's an attacker dragon and a dragon-defender hasn't joined the fight yet then revert the transaction
if (dragonId == fight.dragon1Id && fightOf(fight.dragon2Id) != fightId) {
revert("DragonArena: the dragon-defender must accept the fight first");
}
// if there is another record with the same dragon-attacker
if (dragonId == fight.dragon2Id && attackerFight(fight.dragon1Id) > 0) {
revert("DragonArena: there is another fight with the same dragon-attacker");
}
if (_fights[fightId] == 0) {
_fights[fightId] = value;
}
_attackers[fight.dragon1Id] = fightId;
_dragonFights[dragonId] = fightId;
emit JoinFight(_msgSender(), fightId, dragonId);
}
function startFight(uint fightId) external onlyRole(COO_ROLE) {
}
function cancelFight(uint fightId) external onlyRole(COO_ROLE) {
}
function withdraw(uint tokenId) public override virtual {
}
function _checkTechnicalDefeat(FightInfo.Details memory fight) internal view returns (uint, uint, bool) {
}
function _transferTrophy(uint winnerId, uint loserId, FightInfo.Details memory fight, bool technicalDefeat) internal {
}
function _randomFightResult(uint dragon1Id, uint dragon1Strength, uint dragon2Id, uint dragon2Strength, uint salt)
internal view returns (uint, uint) {
}
}
| fightOf(dragonId)==0,"DragonArena: a dragon with the given id has already joined another fight" | 304,111 | fightOf(dragonId)==0 |
"DragonArena: incorrect amount sent to the contract" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./structs/DragonInfo.sol";
import "./structs/FightInfo.sol";
import "./utils/Random.sol";
import "./LockableReceiver.sol";
import "./DragonToken.sol";
contract DragonArena is LockableReceiver {
using SafeMath for uint;
using Address for address payable;
mapping(uint => uint) private _fights;
mapping(uint => uint) private _dragonFights;
mapping(uint => uint) private _attackers;
uint private _fightPrice;
event JoinFight(address indexed originator, uint fightId, uint dragonId);
event FightFinished(address indexed operator, uint fightId, uint winnerId, bool technicalDefeat);
event FightCancelled(address indexed operator, uint fightId);
constructor(address accessControl, address dragonToken, uint weiFightPrice)
LockableReceiver(accessControl, dragonToken) {
}
function price() external view returns(uint) {
}
function attackerFight(uint attackerId) public view returns (uint) {
}
function fightOf(uint dragonId) public view returns (uint) {
}
function setPrice(uint newPrice) external onlyRole(CFO_ROLE) {
}
function getFightId(bytes calldata fightToken) public pure returns (uint) {
}
function fightInfo(uint fightId) external view returns (FightInfo.Details memory) {
}
function joinFight(uint dragonId, bytes calldata fightToken)
external payable
onlyHolder(dragonId) {
require(fightOf(dragonId) == 0, "DragonArena: a dragon with the given id has already joined another fight");
(uint value, FightInfo.Details memory fight) = FightInfo.readDetailsFromToken(fightToken);
require(fight.dragon1Id > 0 && fight.dragon2Id > 0
&& fight.dragon1Id != fight.dragon2Id
&& ((fight.fightType == FightInfo.Types.Regular && fight.betAmount == 0)
|| (fight.fightType == FightInfo.Types.Money && fight.betAmount > 0)), "DragonArena: bad fight token");
require(dragonId == fight.dragon1Id || dragonId == fight.dragon2Id,
"DragonArena: a dragon with the given id is not associated with this fight");
require(<FILL_ME>)
uint fightId = getFightId(fightToken);
// if it's an attacker dragon and a dragon-defender hasn't joined the fight yet then revert the transaction
if (dragonId == fight.dragon1Id && fightOf(fight.dragon2Id) != fightId) {
revert("DragonArena: the dragon-defender must accept the fight first");
}
// if there is another record with the same dragon-attacker
if (dragonId == fight.dragon2Id && attackerFight(fight.dragon1Id) > 0) {
revert("DragonArena: there is another fight with the same dragon-attacker");
}
if (_fights[fightId] == 0) {
_fights[fightId] = value;
}
_attackers[fight.dragon1Id] = fightId;
_dragonFights[dragonId] = fightId;
emit JoinFight(_msgSender(), fightId, dragonId);
}
function startFight(uint fightId) external onlyRole(COO_ROLE) {
}
function cancelFight(uint fightId) external onlyRole(COO_ROLE) {
}
function withdraw(uint tokenId) public override virtual {
}
function _checkTechnicalDefeat(FightInfo.Details memory fight) internal view returns (uint, uint, bool) {
}
function _transferTrophy(uint winnerId, uint loserId, FightInfo.Details memory fight, bool technicalDefeat) internal {
}
function _randomFightResult(uint dragon1Id, uint dragon1Strength, uint dragon2Id, uint dragon2Strength, uint salt)
internal view returns (uint, uint) {
}
}
| msg.value>=(_fightPrice+fight.betAmount),"DragonArena: incorrect amount sent to the contract" | 304,111 | msg.value>=(_fightPrice+fight.betAmount) |
"DragonArena: both the dragons must be locked on the contract before starting a fight" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./structs/DragonInfo.sol";
import "./structs/FightInfo.sol";
import "./utils/Random.sol";
import "./LockableReceiver.sol";
import "./DragonToken.sol";
contract DragonArena is LockableReceiver {
using SafeMath for uint;
using Address for address payable;
mapping(uint => uint) private _fights;
mapping(uint => uint) private _dragonFights;
mapping(uint => uint) private _attackers;
uint private _fightPrice;
event JoinFight(address indexed originator, uint fightId, uint dragonId);
event FightFinished(address indexed operator, uint fightId, uint winnerId, bool technicalDefeat);
event FightCancelled(address indexed operator, uint fightId);
constructor(address accessControl, address dragonToken, uint weiFightPrice)
LockableReceiver(accessControl, dragonToken) {
}
function price() external view returns(uint) {
}
function attackerFight(uint attackerId) public view returns (uint) {
}
function fightOf(uint dragonId) public view returns (uint) {
}
function setPrice(uint newPrice) external onlyRole(CFO_ROLE) {
}
function getFightId(bytes calldata fightToken) public pure returns (uint) {
}
function fightInfo(uint fightId) external view returns (FightInfo.Details memory) {
}
function joinFight(uint dragonId, bytes calldata fightToken)
external payable
onlyHolder(dragonId) {
}
function startFight(uint fightId) external onlyRole(COO_ROLE) {
uint fightValue = _fights[fightId];
require(fightValue > 0, "DragonArena: a fight with the given id doesn't exist");
FightInfo.Details memory fight = FightInfo.getDetails(fightValue);
require(<FILL_ME>)
DragonToken dragonToken = DragonToken(tokenContract());
//init the strengths before fighting
dragonToken.setStrength(fight.dragon1Id);
dragonToken.setStrength(fight.dragon2Id);
(uint winnerId, uint loserId, bool technicalDefeat) = _checkTechnicalDefeat(fight);
if (!technicalDefeat) {
DragonInfo.Details memory dd1 = dragonToken.dragonInfo(fight.dragon1Id);
DragonInfo.Details memory dd2 = dragonToken.dragonInfo(fight.dragon2Id);
(winnerId, loserId) =
_randomFightResult(fight.dragon1Id, dd1.strength, fight.dragon2Id, dd2.strength, fightId);
}
_transferTrophy(winnerId, loserId, fight, technicalDefeat);
delete _attackers[fight.dragon1Id];
delete _dragonFights[fight.dragon1Id];
delete _dragonFights[fight.dragon2Id];
delete _fights[fightId];
emit FightFinished(_msgSender(), fightId, winnerId, technicalDefeat);
}
function cancelFight(uint fightId) external onlyRole(COO_ROLE) {
}
function withdraw(uint tokenId) public override virtual {
}
function _checkTechnicalDefeat(FightInfo.Details memory fight) internal view returns (uint, uint, bool) {
}
function _transferTrophy(uint winnerId, uint loserId, FightInfo.Details memory fight, bool technicalDefeat) internal {
}
function _randomFightResult(uint dragon1Id, uint dragon1Strength, uint dragon2Id, uint dragon2Strength, uint salt)
internal view returns (uint, uint) {
}
}
| isLocked(fight.dragon1Id)&&isLocked(fight.dragon2Id),"DragonArena: both the dragons must be locked on the contract before starting a fight" | 304,111 | isLocked(fight.dragon1Id)&&isLocked(fight.dragon2Id) |
"DragonArena: unable to withdraw" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./structs/DragonInfo.sol";
import "./structs/FightInfo.sol";
import "./utils/Random.sol";
import "./LockableReceiver.sol";
import "./DragonToken.sol";
contract DragonArena is LockableReceiver {
using SafeMath for uint;
using Address for address payable;
mapping(uint => uint) private _fights;
mapping(uint => uint) private _dragonFights;
mapping(uint => uint) private _attackers;
uint private _fightPrice;
event JoinFight(address indexed originator, uint fightId, uint dragonId);
event FightFinished(address indexed operator, uint fightId, uint winnerId, bool technicalDefeat);
event FightCancelled(address indexed operator, uint fightId);
constructor(address accessControl, address dragonToken, uint weiFightPrice)
LockableReceiver(accessControl, dragonToken) {
}
function price() external view returns(uint) {
}
function attackerFight(uint attackerId) public view returns (uint) {
}
function fightOf(uint dragonId) public view returns (uint) {
}
function setPrice(uint newPrice) external onlyRole(CFO_ROLE) {
}
function getFightId(bytes calldata fightToken) public pure returns (uint) {
}
function fightInfo(uint fightId) external view returns (FightInfo.Details memory) {
}
function joinFight(uint dragonId, bytes calldata fightToken)
external payable
onlyHolder(dragonId) {
}
function startFight(uint fightId) external onlyRole(COO_ROLE) {
}
function cancelFight(uint fightId) external onlyRole(COO_ROLE) {
}
function withdraw(uint tokenId) public override virtual {
require(<FILL_ME>)
super.withdraw(tokenId);
}
function _checkTechnicalDefeat(FightInfo.Details memory fight) internal view returns (uint, uint, bool) {
}
function _transferTrophy(uint winnerId, uint loserId, FightInfo.Details memory fight, bool technicalDefeat) internal {
}
function _randomFightResult(uint dragon1Id, uint dragon1Strength, uint dragon2Id, uint dragon2Strength, uint salt)
internal view returns (uint, uint) {
}
}
| fightOf(tokenId)==0&&attackerFight(tokenId)==0,"DragonArena: unable to withdraw" | 304,111 | fightOf(tokenId)==0&&attackerFight(tokenId)==0 |
"FNDCollectionFactory: Caller does not have the Admin role" | /*
・
* ★
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
` .-:::::-.` `-::---...```
`-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo:
.--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy
`-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy
`------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy
.--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy
`-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy
.------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy
.--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy
`----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy
.------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy
`.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy
.--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo
.------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo
`````
*
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
* ゚。·*・。 ゚*
☆゚・。°*. ゚
・ ゚*。・゚★。
・ *゚。 *
・゚*。★・
☆∴。 *
・ 。
*/
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-solc-8/proxy/Clones.sol";
import "@openzeppelin/contracts-solc-8/utils/Address.sol";
import "@openzeppelin/contracts-solc-8/utils/Strings.sol";
import "./interfaces/solc8/ICollectionContractInitializer.sol";
import "./interfaces/solc8/IRoles.sol";
import "./interfaces/solc8/ICollectionFactory.sol";
import "./interfaces/solc8/IProxyCall.sol";
/**
* @title A factory to create NFT collections.
* @notice Call this factory to create and initialize a minimal proxy pointing to the NFT collection contract.
*/
contract FNDCollectionFactory is ICollectionFactory {
using Address for address;
using Address for address payable;
using Clones for address;
using Strings for uint256;
/**
* @notice The contract address which manages common roles.
* @dev Used by the collections for a shared operator definition.
*/
IRoles public rolesContract;
/**
* @notice The address of the template all new collections will leverage.
*/
address public implementation;
/**
* @notice The address of the proxy call contract implementation.
* @dev Used by the collections to safely call another contract with arbitrary call data.
*/
IProxyCall public proxyCallContract;
/**
* @notice The implementation version new collections will use.
* @dev This is auto-incremented each time the implementation is changed.
*/
uint256 public version;
event RolesContractUpdated(address indexed rolesContract);
event CollectionCreated(
address indexed collectionContract,
address indexed creator,
uint256 indexed version,
string name,
string symbol,
uint256 nonce
);
event ImplementationUpdated(address indexed implementation, uint256 indexed version);
event ProxyCallContractUpdated(address indexed proxyCallContract);
modifier onlyAdmin() {
require(<FILL_ME>)
_;
}
constructor(address _proxyCallContract, address _rolesContract) {
}
/**
* @notice Create a new collection contract.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
* @dev The nonce is required and must be unique for the msg.sender + implementation version,
* otherwise this call will revert.
*/
function createCollection(
string calldata name,
string calldata symbol,
uint256 nonce
) external returns (address) {
}
/**
* @notice Allows Foundation to change the admin role contract address.
*/
function adminUpdateRolesContract(address _rolesContract) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the collection implementation used for future collections.
* This call will auto-increment the version.
* Existing collections are not impacted.
*/
function adminUpdateImplementation(address _implementation) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the proxy call contract address.
*/
function adminUpdateProxyCallContract(address _proxyCallContract) external onlyAdmin {
}
/**
* @notice Returns the address of a collection given the current implementation version, creator, and nonce.
* This will return the same address whether the collection has already been created or not.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
*/
function predictCollectionAddress(address creator, uint256 nonce) external view returns (address) {
}
function _updateRolesContract(address _rolesContract) private {
}
/**
* @dev Updates the implementation address, increments the version, and initializes the template.
* Since the template is initialized when set, implementations cannot be re-used.
* To downgrade the implementation, deploy the same bytecode again and then update to that.
*/
function _updateImplementation(address _implementation) private {
}
function _updateProxyCallContract(address _proxyCallContract) private {
}
function _getSalt(address creator, uint256 nonce) private pure returns (bytes32) {
}
}
| rolesContract.isAdmin(msg.sender),"FNDCollectionFactory: Caller does not have the Admin role" | 304,163 | rolesContract.isAdmin(msg.sender) |
"FNDCollectionFactory: Symbol is required" | /*
・
* ★
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
` .-:::::-.` `-::---...```
`-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo:
.--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy
`-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy
`------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy
.--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy
`-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy
.------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy
.--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy
`----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy
.------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy
`.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy
.--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo
.------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo
`````
*
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
* ゚。·*・。 ゚*
☆゚・。°*. ゚
・ ゚*。・゚★。
・ *゚。 *
・゚*。★・
☆∴。 *
・ 。
*/
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-solc-8/proxy/Clones.sol";
import "@openzeppelin/contracts-solc-8/utils/Address.sol";
import "@openzeppelin/contracts-solc-8/utils/Strings.sol";
import "./interfaces/solc8/ICollectionContractInitializer.sol";
import "./interfaces/solc8/IRoles.sol";
import "./interfaces/solc8/ICollectionFactory.sol";
import "./interfaces/solc8/IProxyCall.sol";
/**
* @title A factory to create NFT collections.
* @notice Call this factory to create and initialize a minimal proxy pointing to the NFT collection contract.
*/
contract FNDCollectionFactory is ICollectionFactory {
using Address for address;
using Address for address payable;
using Clones for address;
using Strings for uint256;
/**
* @notice The contract address which manages common roles.
* @dev Used by the collections for a shared operator definition.
*/
IRoles public rolesContract;
/**
* @notice The address of the template all new collections will leverage.
*/
address public implementation;
/**
* @notice The address of the proxy call contract implementation.
* @dev Used by the collections to safely call another contract with arbitrary call data.
*/
IProxyCall public proxyCallContract;
/**
* @notice The implementation version new collections will use.
* @dev This is auto-incremented each time the implementation is changed.
*/
uint256 public version;
event RolesContractUpdated(address indexed rolesContract);
event CollectionCreated(
address indexed collectionContract,
address indexed creator,
uint256 indexed version,
string name,
string symbol,
uint256 nonce
);
event ImplementationUpdated(address indexed implementation, uint256 indexed version);
event ProxyCallContractUpdated(address indexed proxyCallContract);
modifier onlyAdmin() {
}
constructor(address _proxyCallContract, address _rolesContract) {
}
/**
* @notice Create a new collection contract.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
* @dev The nonce is required and must be unique for the msg.sender + implementation version,
* otherwise this call will revert.
*/
function createCollection(
string calldata name,
string calldata symbol,
uint256 nonce
) external returns (address) {
require(<FILL_ME>)
// This reverts if the NFT was previously created using this implementation version + msg.sender + nonce
address proxy = implementation.cloneDeterministic(_getSalt(msg.sender, nonce));
ICollectionContractInitializer(proxy).initialize(payable(msg.sender), name, symbol);
emit CollectionCreated(proxy, msg.sender, version, name, symbol, nonce);
// Returning the address created allows other contracts to integrate with this call
return address(proxy);
}
/**
* @notice Allows Foundation to change the admin role contract address.
*/
function adminUpdateRolesContract(address _rolesContract) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the collection implementation used for future collections.
* This call will auto-increment the version.
* Existing collections are not impacted.
*/
function adminUpdateImplementation(address _implementation) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the proxy call contract address.
*/
function adminUpdateProxyCallContract(address _proxyCallContract) external onlyAdmin {
}
/**
* @notice Returns the address of a collection given the current implementation version, creator, and nonce.
* This will return the same address whether the collection has already been created or not.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
*/
function predictCollectionAddress(address creator, uint256 nonce) external view returns (address) {
}
function _updateRolesContract(address _rolesContract) private {
}
/**
* @dev Updates the implementation address, increments the version, and initializes the template.
* Since the template is initialized when set, implementations cannot be re-used.
* To downgrade the implementation, deploy the same bytecode again and then update to that.
*/
function _updateImplementation(address _implementation) private {
}
function _updateProxyCallContract(address _proxyCallContract) private {
}
function _getSalt(address creator, uint256 nonce) private pure returns (bytes32) {
}
}
| bytes(symbol).length>0,"FNDCollectionFactory: Symbol is required" | 304,163 | bytes(symbol).length>0 |
"FNDCollectionFactory: RolesContract is not a contract" | /*
・
* ★
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
` .-:::::-.` `-::---...```
`-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo:
.--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy
`-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy
`------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy
.--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy
`-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy
.------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy
.--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy
`----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy
.------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy
`.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy
.--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo
.------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo
`````
*
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
* ゚。·*・。 ゚*
☆゚・。°*. ゚
・ ゚*。・゚★。
・ *゚。 *
・゚*。★・
☆∴。 *
・ 。
*/
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-solc-8/proxy/Clones.sol";
import "@openzeppelin/contracts-solc-8/utils/Address.sol";
import "@openzeppelin/contracts-solc-8/utils/Strings.sol";
import "./interfaces/solc8/ICollectionContractInitializer.sol";
import "./interfaces/solc8/IRoles.sol";
import "./interfaces/solc8/ICollectionFactory.sol";
import "./interfaces/solc8/IProxyCall.sol";
/**
* @title A factory to create NFT collections.
* @notice Call this factory to create and initialize a minimal proxy pointing to the NFT collection contract.
*/
contract FNDCollectionFactory is ICollectionFactory {
using Address for address;
using Address for address payable;
using Clones for address;
using Strings for uint256;
/**
* @notice The contract address which manages common roles.
* @dev Used by the collections for a shared operator definition.
*/
IRoles public rolesContract;
/**
* @notice The address of the template all new collections will leverage.
*/
address public implementation;
/**
* @notice The address of the proxy call contract implementation.
* @dev Used by the collections to safely call another contract with arbitrary call data.
*/
IProxyCall public proxyCallContract;
/**
* @notice The implementation version new collections will use.
* @dev This is auto-incremented each time the implementation is changed.
*/
uint256 public version;
event RolesContractUpdated(address indexed rolesContract);
event CollectionCreated(
address indexed collectionContract,
address indexed creator,
uint256 indexed version,
string name,
string symbol,
uint256 nonce
);
event ImplementationUpdated(address indexed implementation, uint256 indexed version);
event ProxyCallContractUpdated(address indexed proxyCallContract);
modifier onlyAdmin() {
}
constructor(address _proxyCallContract, address _rolesContract) {
}
/**
* @notice Create a new collection contract.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
* @dev The nonce is required and must be unique for the msg.sender + implementation version,
* otherwise this call will revert.
*/
function createCollection(
string calldata name,
string calldata symbol,
uint256 nonce
) external returns (address) {
}
/**
* @notice Allows Foundation to change the admin role contract address.
*/
function adminUpdateRolesContract(address _rolesContract) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the collection implementation used for future collections.
* This call will auto-increment the version.
* Existing collections are not impacted.
*/
function adminUpdateImplementation(address _implementation) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the proxy call contract address.
*/
function adminUpdateProxyCallContract(address _proxyCallContract) external onlyAdmin {
}
/**
* @notice Returns the address of a collection given the current implementation version, creator, and nonce.
* This will return the same address whether the collection has already been created or not.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
*/
function predictCollectionAddress(address creator, uint256 nonce) external view returns (address) {
}
function _updateRolesContract(address _rolesContract) private {
require(<FILL_ME>)
rolesContract = IRoles(_rolesContract);
emit RolesContractUpdated(_rolesContract);
}
/**
* @dev Updates the implementation address, increments the version, and initializes the template.
* Since the template is initialized when set, implementations cannot be re-used.
* To downgrade the implementation, deploy the same bytecode again and then update to that.
*/
function _updateImplementation(address _implementation) private {
}
function _updateProxyCallContract(address _proxyCallContract) private {
}
function _getSalt(address creator, uint256 nonce) private pure returns (bytes32) {
}
}
| _rolesContract.isContract(),"FNDCollectionFactory: RolesContract is not a contract" | 304,163 | _rolesContract.isContract() |
"FNDCollectionFactory: Implementation is not a contract" | /*
・
* ★
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
` .-:::::-.` `-::---...```
`-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo:
.--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy
`-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy
`------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy
.--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy
`-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy
.------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy
.--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy
`----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy
.------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy
`.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy
.--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo
.------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo
`````
*
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
* ゚。·*・。 ゚*
☆゚・。°*. ゚
・ ゚*。・゚★。
・ *゚。 *
・゚*。★・
☆∴。 *
・ 。
*/
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-solc-8/proxy/Clones.sol";
import "@openzeppelin/contracts-solc-8/utils/Address.sol";
import "@openzeppelin/contracts-solc-8/utils/Strings.sol";
import "./interfaces/solc8/ICollectionContractInitializer.sol";
import "./interfaces/solc8/IRoles.sol";
import "./interfaces/solc8/ICollectionFactory.sol";
import "./interfaces/solc8/IProxyCall.sol";
/**
* @title A factory to create NFT collections.
* @notice Call this factory to create and initialize a minimal proxy pointing to the NFT collection contract.
*/
contract FNDCollectionFactory is ICollectionFactory {
using Address for address;
using Address for address payable;
using Clones for address;
using Strings for uint256;
/**
* @notice The contract address which manages common roles.
* @dev Used by the collections for a shared operator definition.
*/
IRoles public rolesContract;
/**
* @notice The address of the template all new collections will leverage.
*/
address public implementation;
/**
* @notice The address of the proxy call contract implementation.
* @dev Used by the collections to safely call another contract with arbitrary call data.
*/
IProxyCall public proxyCallContract;
/**
* @notice The implementation version new collections will use.
* @dev This is auto-incremented each time the implementation is changed.
*/
uint256 public version;
event RolesContractUpdated(address indexed rolesContract);
event CollectionCreated(
address indexed collectionContract,
address indexed creator,
uint256 indexed version,
string name,
string symbol,
uint256 nonce
);
event ImplementationUpdated(address indexed implementation, uint256 indexed version);
event ProxyCallContractUpdated(address indexed proxyCallContract);
modifier onlyAdmin() {
}
constructor(address _proxyCallContract, address _rolesContract) {
}
/**
* @notice Create a new collection contract.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
* @dev The nonce is required and must be unique for the msg.sender + implementation version,
* otherwise this call will revert.
*/
function createCollection(
string calldata name,
string calldata symbol,
uint256 nonce
) external returns (address) {
}
/**
* @notice Allows Foundation to change the admin role contract address.
*/
function adminUpdateRolesContract(address _rolesContract) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the collection implementation used for future collections.
* This call will auto-increment the version.
* Existing collections are not impacted.
*/
function adminUpdateImplementation(address _implementation) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the proxy call contract address.
*/
function adminUpdateProxyCallContract(address _proxyCallContract) external onlyAdmin {
}
/**
* @notice Returns the address of a collection given the current implementation version, creator, and nonce.
* This will return the same address whether the collection has already been created or not.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
*/
function predictCollectionAddress(address creator, uint256 nonce) external view returns (address) {
}
function _updateRolesContract(address _rolesContract) private {
}
/**
* @dev Updates the implementation address, increments the version, and initializes the template.
* Since the template is initialized when set, implementations cannot be re-used.
* To downgrade the implementation, deploy the same bytecode again and then update to that.
*/
function _updateImplementation(address _implementation) private {
require(<FILL_ME>)
implementation = _implementation;
version++;
// The implementation is initialized when assigned so that others may not claim it as their own.
ICollectionContractInitializer(_implementation).initialize(
payable(address(rolesContract)),
string(abi.encodePacked("Foundation Collection Template v", version.toString())),
string(abi.encodePacked("FCTv", version.toString()))
);
emit ImplementationUpdated(_implementation, version);
}
function _updateProxyCallContract(address _proxyCallContract) private {
}
function _getSalt(address creator, uint256 nonce) private pure returns (bytes32) {
}
}
| _implementation.isContract(),"FNDCollectionFactory: Implementation is not a contract" | 304,163 | _implementation.isContract() |
"FNDCollectionFactory: Proxy call address is not a contract" | /*
・
* ★
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
` .-:::::-.` `-::---...```
`-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo:
.--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy
`-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy
`------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy
.--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy
`-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy
.------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy
.--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy
`----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy
.------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy
`.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy
.--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo
.------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo
`````
*
・ 。
・ ゚☆ 。
* ★ ゚・。 * 。
* ☆ 。・゚*.。
゚ *.。☆。★ ・
* ゚。·*・。 ゚*
☆゚・。°*. ゚
・ ゚*。・゚★。
・ *゚。 *
・゚*。★・
☆∴。 *
・ 。
*/
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-solc-8/proxy/Clones.sol";
import "@openzeppelin/contracts-solc-8/utils/Address.sol";
import "@openzeppelin/contracts-solc-8/utils/Strings.sol";
import "./interfaces/solc8/ICollectionContractInitializer.sol";
import "./interfaces/solc8/IRoles.sol";
import "./interfaces/solc8/ICollectionFactory.sol";
import "./interfaces/solc8/IProxyCall.sol";
/**
* @title A factory to create NFT collections.
* @notice Call this factory to create and initialize a minimal proxy pointing to the NFT collection contract.
*/
contract FNDCollectionFactory is ICollectionFactory {
using Address for address;
using Address for address payable;
using Clones for address;
using Strings for uint256;
/**
* @notice The contract address which manages common roles.
* @dev Used by the collections for a shared operator definition.
*/
IRoles public rolesContract;
/**
* @notice The address of the template all new collections will leverage.
*/
address public implementation;
/**
* @notice The address of the proxy call contract implementation.
* @dev Used by the collections to safely call another contract with arbitrary call data.
*/
IProxyCall public proxyCallContract;
/**
* @notice The implementation version new collections will use.
* @dev This is auto-incremented each time the implementation is changed.
*/
uint256 public version;
event RolesContractUpdated(address indexed rolesContract);
event CollectionCreated(
address indexed collectionContract,
address indexed creator,
uint256 indexed version,
string name,
string symbol,
uint256 nonce
);
event ImplementationUpdated(address indexed implementation, uint256 indexed version);
event ProxyCallContractUpdated(address indexed proxyCallContract);
modifier onlyAdmin() {
}
constructor(address _proxyCallContract, address _rolesContract) {
}
/**
* @notice Create a new collection contract.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
* @dev The nonce is required and must be unique for the msg.sender + implementation version,
* otherwise this call will revert.
*/
function createCollection(
string calldata name,
string calldata symbol,
uint256 nonce
) external returns (address) {
}
/**
* @notice Allows Foundation to change the admin role contract address.
*/
function adminUpdateRolesContract(address _rolesContract) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the collection implementation used for future collections.
* This call will auto-increment the version.
* Existing collections are not impacted.
*/
function adminUpdateImplementation(address _implementation) external onlyAdmin {
}
/**
* @notice Allows Foundation to change the proxy call contract address.
*/
function adminUpdateProxyCallContract(address _proxyCallContract) external onlyAdmin {
}
/**
* @notice Returns the address of a collection given the current implementation version, creator, and nonce.
* This will return the same address whether the collection has already been created or not.
* @param nonce An arbitrary value used to allow a creator to mint multiple collections.
*/
function predictCollectionAddress(address creator, uint256 nonce) external view returns (address) {
}
function _updateRolesContract(address _rolesContract) private {
}
/**
* @dev Updates the implementation address, increments the version, and initializes the template.
* Since the template is initialized when set, implementations cannot be re-used.
* To downgrade the implementation, deploy the same bytecode again and then update to that.
*/
function _updateImplementation(address _implementation) private {
}
function _updateProxyCallContract(address _proxyCallContract) private {
require(<FILL_ME>)
proxyCallContract = IProxyCall(_proxyCallContract);
emit ProxyCallContractUpdated(_proxyCallContract);
}
function _getSalt(address creator, uint256 nonce) private pure returns (bytes32) {
}
}
| _proxyCallContract.isContract(),"FNDCollectionFactory: Proxy call address is not a contract" | 304,163 | _proxyCallContract.isContract() |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
uint256 oneSplit = address(this).balance / 10;
uint256 fourSplit = oneSplit * 4;
require(<FILL_ME>)
require(payable(teamAddressTwo).send(fourSplit));
require(payable(teamAddressThree).send(oneSplit));
require(payable(teamAddressFour).send(address(this).balance));
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
}
function mintPresale() external payable nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| payable(teamAddressOne).send(fourSplit) | 304,167 | payable(teamAddressOne).send(fourSplit) |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
uint256 oneSplit = address(this).balance / 10;
uint256 fourSplit = oneSplit * 4;
require(payable(teamAddressOne).send(fourSplit));
require(<FILL_ME>)
require(payable(teamAddressThree).send(oneSplit));
require(payable(teamAddressFour).send(address(this).balance));
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
}
function mintPresale() external payable nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| payable(teamAddressTwo).send(fourSplit) | 304,167 | payable(teamAddressTwo).send(fourSplit) |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
uint256 oneSplit = address(this).balance / 10;
uint256 fourSplit = oneSplit * 4;
require(payable(teamAddressOne).send(fourSplit));
require(payable(teamAddressTwo).send(fourSplit));
require(<FILL_ME>)
require(payable(teamAddressFour).send(address(this).balance));
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
}
function mintPresale() external payable nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| payable(teamAddressThree).send(oneSplit) | 304,167 | payable(teamAddressThree).send(oneSplit) |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
uint256 oneSplit = address(this).balance / 10;
uint256 fourSplit = oneSplit * 4;
require(payable(teamAddressOne).send(fourSplit));
require(payable(teamAddressTwo).send(fourSplit));
require(payable(teamAddressThree).send(oneSplit));
require(<FILL_ME>)
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
}
function mintPresale() external payable nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| payable(teamAddressFour).send(address(this).balance) | 304,167 | payable(teamAddressFour).send(address(this).balance) |
"Sold out" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
require(saleIsActive, "Sale not active");
require(msg.value >= mintPrice, "More eth required");
require(<FILL_ME>)
require(!alreadyMinted[msg.sender], "Address has already minted");
require(balanceOf(msg.sender) < perWallet, "Per wallet limit exceeded");
alreadyMinted[msg.sender] = true;
_safeMint(msg.sender, nextTokenId());
}
function mintPresale() external payable nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| totalSupply()<totalTokens,"Sold out" | 304,167 | totalSupply()<totalTokens |
"Address has already minted" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
require(saleIsActive, "Sale not active");
require(msg.value >= mintPrice, "More eth required");
require(totalSupply() < totalTokens, "Sold out");
require(<FILL_ME>)
require(balanceOf(msg.sender) < perWallet, "Per wallet limit exceeded");
alreadyMinted[msg.sender] = true;
_safeMint(msg.sender, nextTokenId());
}
function mintPresale() external payable nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| !alreadyMinted[msg.sender],"Address has already minted" | 304,167 | !alreadyMinted[msg.sender] |
"Per wallet limit exceeded" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
require(saleIsActive, "Sale not active");
require(msg.value >= mintPrice, "More eth required");
require(totalSupply() < totalTokens, "Sold out");
require(!alreadyMinted[msg.sender], "Address has already minted");
require(<FILL_ME>)
alreadyMinted[msg.sender] = true;
_safeMint(msg.sender, nextTokenId());
}
function mintPresale() external payable nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| balanceOf(msg.sender)<perWallet,"Per wallet limit exceeded" | 304,167 | balanceOf(msg.sender)<perWallet |
"Not on presale list" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
}
function mintPresale() external payable nonReentrant {
require(preSaleIsActive, "Presale not active");
require(msg.value >= mintPrice, "More eth required");
require(totalSupply() < totalTokens, "Sold out");
require(<FILL_ME>)
require(!alreadyMintedPresale[msg.sender], "Address has already minted");
require(balanceOf(msg.sender) < perWallet, "Per wallet limit exceeded");
alreadyMintedPresale[msg.sender] = true;
_safeMint(msg.sender, nextTokenId());
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| presaleList[msg.sender]==true,"Not on presale list" | 304,167 | presaleList[msg.sender]==true |
"Address has already minted" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// dev by 4mat
// ██████ ███████ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ █████ ██ ██
// ██ ██ ██ ██ ██
// ██████ ███████ ████
//
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
//
// ██ ██ ███ ███ █████ ████████
// ██ ██ ████ ████ ██ ██ ██
// ███████ ██ ████ ██ ███████ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██
//
//
// █████ ███ ██ ██████
// ██ ██ ████ ██ ██ ██
// ███████ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ████ ██████
//
//
// ██████ ██████ ███ ██ ██████ █████ ██████
// ██ ██ ████ ██ ██ ██ ██ ██ ██ ██
// ██ ███ █████ ██ ██ ██ ██████ █████ ██████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██████ ██████ ██ ████ ██ ██ █████ ██ ██
//
contract Metanoia is ERC721Enumerable, ReentrancyGuard, Ownable {
uint256 public totalTokens = 333;
uint256 public vaultLimit = 20;
uint256 public vaultMinted = 0;
uint256 public mintPrice = 0.14 ether;
uint256 public perWallet = 1;
string baseTokenURI;
bool public tokenURIFrozen = false;
//map addys that have minted
mapping(address => bool) public alreadyMinted;
mapping(address => bool) public alreadyMintedPresale;
bool public saleIsActive = false;
bool public preSaleIsActive = false;
mapping(address => bool) private presaleList;
bool public contractPaused = false;
address public teamAddressOne = 0x0AC02BBd689e54BF8DD5694e341Bb1A25ceB34d6;
address public teamAddressTwo = 0xBc2E16F8058636334962D0C0E4e027238A09Ed82;
address public teamAddressThree = 0x8430ea031C8EDb2c4951F4f7BF28B92527078bc5;
address public teamAddressFour = 0x4bdeCc52e3bdd8d3b5403390c3F756d95f291101;
constructor(
) ERC721("Metanoia", "MTNOIA") {
}
function mintVault(uint256 _vaultMintQuantity, address _vaultMintAddress)
external
nonReentrant
onlyOwner {
}
function nextTokenId() internal view returns (uint256) {
}
function addToAllowList(address[] calldata addresses) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function circuitBreaker() public onlyOwner {
}
// If the contract is paused, stop the modified function
// Attach this modifier to all public functions
modifier checkIfPaused() {
}
function mint() external payable nonReentrant {
}
function mintPresale() external payable nonReentrant {
require(preSaleIsActive, "Presale not active");
require(msg.value >= mintPrice, "More eth required");
require(totalSupply() < totalTokens, "Sold out");
require(presaleList[msg.sender] == true, "Not on presale list");
require(<FILL_ME>)
require(balanceOf(msg.sender) < perWallet, "Per wallet limit exceeded");
alreadyMintedPresale[msg.sender] = true;
_safeMint(msg.sender, nextTokenId());
}
function _baseURI() internal view virtual override returns (string memory) {
}
function freezeBaseURI() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setVaultLimit(uint256 _newVaultLimit) public onlyOwner() {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setPerWallet(uint256 _newPerWallet) public onlyOwner() {
}
function checkBalance() public view returns (uint256){
}
}
| !alreadyMintedPresale[msg.sender],"Address has already minted" | 304,167 | !alreadyMintedPresale[msg.sender] |
"Token is already in pool" | //"SPDX-License-Identifier: MIT"
pragma solidity 0.8.6;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract LiquidityMining is Ownable {
using SafeERC20 for IERC20;
uint256 constant DECIMALS = 18;
uint256 constant UNITS = 10**DECIMALS;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewardDebtAtBlock; // the last block user stake
}
// Info of each pool.
struct PoolInfo {
IERC20 token; // Address of LP token contract.
uint256 tokenPerBlock; // tokens to distribute per block. There are aprox. 6500 blocks per day. 6500 * 1825 (5 years) = 11862500 total blocks. 600000000 token to be distributed in 11862500 = 50,579557428872497 token per block.
uint256 lastRewardBlock; // Last block number that token distribution occurs.
uint256 acctokenPerShare; // Accumulated tokens per share, times 1e18 (UNITS).
uint256 waitForWithdraw; // Spent tokens until now, even if they are not withdrawn.
}
IERC20 public tokenToken;
address public tokenLiquidityMiningWallet;
// The block number when token mining starts.
uint256 public START_BLOCK;
// Info of each pool.
PoolInfo[] public poolInfo;
// tokenToPoolId
mapping(address => uint256) public tokenToPoolId;
// Info of each user that stakes LP tokens. pid => user address => info
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
event Deposit(address indexed user, uint256 indexed poolId, uint256 amount);
event Withdraw(
address indexed user,
uint256 indexed poolId,
uint256 amount
);
event EmergencyWithdraw(
address indexed user,
uint256 indexed poolId,
uint256 amount
);
event SendTokenReward(
address indexed user,
uint256 indexed poolId,
uint256 amount
);
event TokenPerBlockSet(uint256 amount);
constructor(
address _tokenAddress,
address _tokenLiquidityMiningWallet,
uint256 _startBlock
) public {
}
/********************** PUBLIC ********************************/
// Add a new erc20 token to the pool. Can only be called by the owner.
function add(
uint256 _tokenPerBlock,
IERC20 _token,
bool _withUpdate
) external onlyOwner {
require(<FILL_ME>)
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > START_BLOCK
? block.number
: START_BLOCK;
tokenToPoolId[address(_token)] = poolInfo.length + 1;
poolInfo.push(
PoolInfo({
token: _token,
tokenPerBlock: _tokenPerBlock,
lastRewardBlock: lastRewardBlock,
acctokenPerShare: 0,
waitForWithdraw: 0
})
);
}
// Update the given pool's token allocation point. Can only be called by the owner.
function set(
uint256 _poolId,
uint256 _tokenPerBlock,
bool _withUpdate
) external onlyOwner {
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _poolId) public {
}
// Get rewards for a specific amount of tokenPerBlocks
function getPoolReward(
uint256 _from,
uint256 _to,
uint256 _tokenPerBlock,
uint256 _waitForWithdraw
) public view returns (uint256 rewards) {
}
function claimReward(uint256 _poolId) external {
}
// Deposit LP tokens to tokenStaking for token allocation.
function deposit(uint256 _poolId, uint256 _amount) external {
}
// Withdraw LP tokens from tokenStaking.
function withdraw(uint256 _poolId, uint256 _amount) external {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _poolId) external {
}
/********************** EXTERNAL ********************************/
// Return the number of added pools
function poolLength() external view returns (uint256) {
}
// View function to see pending tokens on frontend.
function pendingReward(uint256 _poolId, address _user)
external
view
returns (uint256)
{
}
/********************** INTERNAL ********************************/
function _harvest(uint256 _poolId) internal {
}
function changeRewardsWallet(address _address) external onlyOwner {
}
}
| tokenToPoolId[address(_token)]==0,"Token is already in pool" | 304,210 | tokenToPoolId[address(_token)]==0 |
"FryCook::add: not authorized" | pragma solidity 0.6.12;
// An interface for a future component of the CHKN system, allowing migration
// from one type of LP token to another. Migration moves liquidity from an exchange
// contract to another, e.g. for a swap version update. All users keep their
// staked liquidity and can deposit or withdraw the new type of token
// (kept in the same pool / pid) afterwards.
interface ICookMigrator {
// Perform LP token migration from UniswapV2 to ChickenFarm.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// ChickenFarm must mint EXACTLY the same amount of ChickenFarm LP tokens or
// else something bad will happen. Traditional UniswapV2 does not
// do that so be careful!
function migrate(IERC20 token) external returns (IERC20);
}
// FryCook works the fryer. They make some good chicken!
//
// Note that there is an EXECUTIVE_ROLE and the executive(s) wields tremendous
// power. The deployer will have executive power until initial setup is complete,
// then renounce that direct power in favor of Timelocked control so the community
// can see incoming executive orders (including role changes). Eventually, this
// setup will be replaced with community governance by CHKN token holders.
//
// Executives determine who holds other roles and set contract references
// (e.g. for migration). The other roles are:
//
// Head Chef: Designs the menu (can add and update lp token pools)
// Sous Chef: Tweaks recipes (can update lp token pool allocation points)
// Waitstaff: Carries orders and payments (can deposit / withdraw on behalf of stakers)
//
// It makes sense for an executive (individual or community) to also operate as the
// head chef, but nothing but a well-tested and audited smart contract should EVER be assigned
// to waitstaff. Waitstaff have full access to all staked tokens.
contract FryCook is AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. CHKNs to distribute per block.
uint256 lastRewardBlock; // Last block number that CHKNs distribution occurs.
uint256 totalScore; // Total score of all investors.
uint256 accChickenPerScore; // Accumulated CHKNs per score, times 1e12. See below.
// early bird point rewards (larger share of CHKN mints w/in the pool)
uint256 earlyBirdMinShares;
uint256 earlyBirdExtra;
uint256 earlyBirdGraceEndBlock;
uint256 earlyBirdHalvingBlocks;
}
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 score; // The staked "score" based on LP tokens and early bird bonus
uint256 earlyBirdMult; // Early bird bonus multiplier, scaled by EARLY_BIRD_PRECISION
bool earlyBird; // Does the score include an early bird bonus?
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of CHKNs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.score * pool.accChickenPerScore) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accChickenPerScore` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` and `score` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Access Control Roles. This is the FryCook, but there's other jobs in the kitchen.
bytes32 public constant EXECUTIVE_ROLE = keccak256("EXECUTIVE_ROLE"); // aka owner: determines other roles
bytes32 public constant HEAD_CHEF_ROLE = keccak256("HEAD_CHEF_ROLE"); // governance: token pool changes, control over agent list
bytes32 public constant SOUS_CHEF_ROLE = keccak256("SOUS_CHEF_ROLE"); // pool spiciness tweaks: can change allocation points for pools
bytes32 public constant WAITSTAFF_ROLE = keccak256("WAITSTAFF_ROLE"); // token agent(s): can make deposits / withdrawals on behalf of stakers
// The CHKN TOKEN!
ChickenToken public chicken;
uint256 public chickenCap;
// Dev address.
address public devaddr;
// Block number when bonus CHKN stage ends (staged decline to no bonus).
uint256 public bonusStage2Block;
uint256 public bonusStage3Block;
uint256 public bonusStage4Block;
uint256 public bonusEndBlock;
// CHKN tokens created per block.
uint256 public chickenPerBlock;
// Bonus muliplier for early chicken makers.
uint256 public constant BONUS_MULTIPLIER_STAGE_1 = 20;
uint256 public constant BONUS_MULTIPLIER_STAGE_2 = 15;
uint256 public constant BONUS_MULTIPLIER_STAGE_3 = 10;
uint256 public constant BONUS_MULTIPLIER_STAGE_4 = 5;
// Block number when dev share declines (staged decline to lowest share).
uint256 public devBonusStage2Block;
uint256 public devBonusStage3Block;
uint256 public devBonusStage4Block;
uint256 public devBonusEndBlock;
// Dev share divisor for each bonus stage.
uint256 public constant DEV_DIV_STAGE_1 = 10; // 10%
uint256 public constant DEV_DIV_STAGE_2 = 12; // 8.333..%
uint256 public constant DEV_DIV_STAGE_3 = 16; // 6.25%
uint256 public constant DEV_DIV_STAGE_4 = 25; // 4%
uint256 public constant DEV_DIV = 50; // 2%
// Precision values
uint256 public constant EARLY_BIRD_PRECISION = 1e12;
uint256 public constant ACC_CHICKEN_PRECISION = 1e12;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
ICookMigrator public migrator;
// Info of each pool.
PoolInfo[] public poolInfo;
mapping (address => uint256) public tokenPid;
mapping (address => bool) public hasToken;
// Info of each user that stakes LP tokens.
mapping (uint256 => mapping (address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when CHKN mining starts.
uint256 public startBlock;
event Deposit(address indexed staker, address indexed funder, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed staker, address indexed agent, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
ChickenToken _chicken,
address _devaddr,
uint256 _chickenPerBlock,
uint256 _startBlock,
uint256 _bonusEndBlock,
uint256 _devBonusEndBlock
) public {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by a manager.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
uint256 _earlyBirdMinShares,
uint256 _earlyBirdInitialBonus,
uint256 _earlyBirdGraceEndBlock,
uint256 _earlyBirdHalvingBlocks,
bool _withUpdate
) public {
require(<FILL_ME>)
require(!hasToken[address(_lpToken)], "FryCook::add: lpToken already added");
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
hasToken[address(_lpToken)] = true;
tokenPid[address(_lpToken)] = poolInfo.length;
poolInfo.push(PoolInfo({
lpToken: _lpToken,
allocPoint: _allocPoint,
earlyBirdMinShares: _earlyBirdMinShares,
earlyBirdExtra: _earlyBirdInitialBonus.sub(1), // provided as multiplier: 100x. Declines to 1x, so "99" extra.
earlyBirdGraceEndBlock: _earlyBirdGraceEndBlock,
earlyBirdHalvingBlocks: _earlyBirdHalvingBlocks,
lastRewardBlock: lastRewardBlock,
totalScore: 0,
accChickenPerScore: 0
}));
}
// Update the given pool's CHKN allocation point. Can only be called by a manager.
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public {
}
// Set the migrator contract. Can only be called by a manager.
function setMigrator(ICookMigrator _migrator) public {
}
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
}
// Return the number of blocks intersecting between the two ranges.
// Assumption: _from <= _to, _from2 <= _to2.
function getIntersection(uint256 _from, uint256 _to, uint256 _from2, uint256 _to2) public pure returns (uint256) {
}
// Return CHKN reward (mint) multiplier over the given range, _from to _to block.
// Multiply against chickenPerBlock to determine the total amount minted
// during that time (not including devaddr share). Ignores "startBlock".
// Assumption: _from <= _to. Otherwise get weird results.
function getMintMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// Returns the divisor to determine the developer's share of coins at the
// given block. For M coins minted, dev gets M.div(_val_). For a block range,
// undershoot by providing _to block (dev gets up to, not over, the bonus amount).
function getDevDivisor(uint256 _block) public view returns (uint256) {
}
// Returns the score multiplier for an early bird investor who qualifies
// at _block for _pid. The investment quantity and min threshold are not
// checked; qualification is a precondition.
// The output is scaled by EARLY_BIRD_PRECISION; e.g. a return value of
// 1.5 * EARLY_BIRD_PRECISION indicates a multiplier of 1.5x.
function getEarlyBirdMultiplier(uint256 _block, uint256 _pid) public view returns (uint256) {
}
// View function to see pending CHKNs on frontend.
function pendingChicken(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to FryCook for CHKN allocation. Deposit 0 to bump a pool update.
function deposit(uint256 _pid, uint256 _amount) public {
}
// Deposit LP tokens on behalf of another user.
function depositTo(uint256 _pid, uint256 _amount, address _staker) public {
}
// Handle deposits, whether agent-driven or user-initiated.
function _deposit(uint256 _pid, uint256 _amount, address _staker, address _funder) internal {
}
// Withdraw staked LP tokens from FryCook. Also transfers pending chicken.
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw a user's staked LP tokens as an agent. Also transfers pending
// chicken (to the staking user, NOT the agent).
function withdrawFrom(uint256 _pid, uint256 _amount, address _staker) public {
}
// Withdraw LP tokens from FryCook to the agent. Staked chicken
// goes to the _staker. We don't support deferred CHKN transfers; every time
// a deposit or withdrawal happens, pending CHKN must be transferred or
// the books aren't kept clean.
function _withdraw(uint256 _pid, uint256 _amount, address _staker, address _agent) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe chicken transfer function, just in case if rounding error causes pool to not have enough CHKNs.
function safeChickenTransfer(address _to, uint256 _amount) internal {
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
}
}
| hasRole(HEAD_CHEF_ROLE,msg.sender),"FryCook::add: not authorized" | 304,273 | hasRole(HEAD_CHEF_ROLE,msg.sender) |
"FryCook::add: lpToken already added" | pragma solidity 0.6.12;
// An interface for a future component of the CHKN system, allowing migration
// from one type of LP token to another. Migration moves liquidity from an exchange
// contract to another, e.g. for a swap version update. All users keep their
// staked liquidity and can deposit or withdraw the new type of token
// (kept in the same pool / pid) afterwards.
interface ICookMigrator {
// Perform LP token migration from UniswapV2 to ChickenFarm.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// ChickenFarm must mint EXACTLY the same amount of ChickenFarm LP tokens or
// else something bad will happen. Traditional UniswapV2 does not
// do that so be careful!
function migrate(IERC20 token) external returns (IERC20);
}
// FryCook works the fryer. They make some good chicken!
//
// Note that there is an EXECUTIVE_ROLE and the executive(s) wields tremendous
// power. The deployer will have executive power until initial setup is complete,
// then renounce that direct power in favor of Timelocked control so the community
// can see incoming executive orders (including role changes). Eventually, this
// setup will be replaced with community governance by CHKN token holders.
//
// Executives determine who holds other roles and set contract references
// (e.g. for migration). The other roles are:
//
// Head Chef: Designs the menu (can add and update lp token pools)
// Sous Chef: Tweaks recipes (can update lp token pool allocation points)
// Waitstaff: Carries orders and payments (can deposit / withdraw on behalf of stakers)
//
// It makes sense for an executive (individual or community) to also operate as the
// head chef, but nothing but a well-tested and audited smart contract should EVER be assigned
// to waitstaff. Waitstaff have full access to all staked tokens.
contract FryCook is AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. CHKNs to distribute per block.
uint256 lastRewardBlock; // Last block number that CHKNs distribution occurs.
uint256 totalScore; // Total score of all investors.
uint256 accChickenPerScore; // Accumulated CHKNs per score, times 1e12. See below.
// early bird point rewards (larger share of CHKN mints w/in the pool)
uint256 earlyBirdMinShares;
uint256 earlyBirdExtra;
uint256 earlyBirdGraceEndBlock;
uint256 earlyBirdHalvingBlocks;
}
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 score; // The staked "score" based on LP tokens and early bird bonus
uint256 earlyBirdMult; // Early bird bonus multiplier, scaled by EARLY_BIRD_PRECISION
bool earlyBird; // Does the score include an early bird bonus?
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of CHKNs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.score * pool.accChickenPerScore) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accChickenPerScore` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` and `score` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Access Control Roles. This is the FryCook, but there's other jobs in the kitchen.
bytes32 public constant EXECUTIVE_ROLE = keccak256("EXECUTIVE_ROLE"); // aka owner: determines other roles
bytes32 public constant HEAD_CHEF_ROLE = keccak256("HEAD_CHEF_ROLE"); // governance: token pool changes, control over agent list
bytes32 public constant SOUS_CHEF_ROLE = keccak256("SOUS_CHEF_ROLE"); // pool spiciness tweaks: can change allocation points for pools
bytes32 public constant WAITSTAFF_ROLE = keccak256("WAITSTAFF_ROLE"); // token agent(s): can make deposits / withdrawals on behalf of stakers
// The CHKN TOKEN!
ChickenToken public chicken;
uint256 public chickenCap;
// Dev address.
address public devaddr;
// Block number when bonus CHKN stage ends (staged decline to no bonus).
uint256 public bonusStage2Block;
uint256 public bonusStage3Block;
uint256 public bonusStage4Block;
uint256 public bonusEndBlock;
// CHKN tokens created per block.
uint256 public chickenPerBlock;
// Bonus muliplier for early chicken makers.
uint256 public constant BONUS_MULTIPLIER_STAGE_1 = 20;
uint256 public constant BONUS_MULTIPLIER_STAGE_2 = 15;
uint256 public constant BONUS_MULTIPLIER_STAGE_3 = 10;
uint256 public constant BONUS_MULTIPLIER_STAGE_4 = 5;
// Block number when dev share declines (staged decline to lowest share).
uint256 public devBonusStage2Block;
uint256 public devBonusStage3Block;
uint256 public devBonusStage4Block;
uint256 public devBonusEndBlock;
// Dev share divisor for each bonus stage.
uint256 public constant DEV_DIV_STAGE_1 = 10; // 10%
uint256 public constant DEV_DIV_STAGE_2 = 12; // 8.333..%
uint256 public constant DEV_DIV_STAGE_3 = 16; // 6.25%
uint256 public constant DEV_DIV_STAGE_4 = 25; // 4%
uint256 public constant DEV_DIV = 50; // 2%
// Precision values
uint256 public constant EARLY_BIRD_PRECISION = 1e12;
uint256 public constant ACC_CHICKEN_PRECISION = 1e12;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
ICookMigrator public migrator;
// Info of each pool.
PoolInfo[] public poolInfo;
mapping (address => uint256) public tokenPid;
mapping (address => bool) public hasToken;
// Info of each user that stakes LP tokens.
mapping (uint256 => mapping (address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when CHKN mining starts.
uint256 public startBlock;
event Deposit(address indexed staker, address indexed funder, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed staker, address indexed agent, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
ChickenToken _chicken,
address _devaddr,
uint256 _chickenPerBlock,
uint256 _startBlock,
uint256 _bonusEndBlock,
uint256 _devBonusEndBlock
) public {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by a manager.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
uint256 _earlyBirdMinShares,
uint256 _earlyBirdInitialBonus,
uint256 _earlyBirdGraceEndBlock,
uint256 _earlyBirdHalvingBlocks,
bool _withUpdate
) public {
require(hasRole(HEAD_CHEF_ROLE, msg.sender), "FryCook::add: not authorized");
require(<FILL_ME>)
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
hasToken[address(_lpToken)] = true;
tokenPid[address(_lpToken)] = poolInfo.length;
poolInfo.push(PoolInfo({
lpToken: _lpToken,
allocPoint: _allocPoint,
earlyBirdMinShares: _earlyBirdMinShares,
earlyBirdExtra: _earlyBirdInitialBonus.sub(1), // provided as multiplier: 100x. Declines to 1x, so "99" extra.
earlyBirdGraceEndBlock: _earlyBirdGraceEndBlock,
earlyBirdHalvingBlocks: _earlyBirdHalvingBlocks,
lastRewardBlock: lastRewardBlock,
totalScore: 0,
accChickenPerScore: 0
}));
}
// Update the given pool's CHKN allocation point. Can only be called by a manager.
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public {
}
// Set the migrator contract. Can only be called by a manager.
function setMigrator(ICookMigrator _migrator) public {
}
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
}
// Return the number of blocks intersecting between the two ranges.
// Assumption: _from <= _to, _from2 <= _to2.
function getIntersection(uint256 _from, uint256 _to, uint256 _from2, uint256 _to2) public pure returns (uint256) {
}
// Return CHKN reward (mint) multiplier over the given range, _from to _to block.
// Multiply against chickenPerBlock to determine the total amount minted
// during that time (not including devaddr share). Ignores "startBlock".
// Assumption: _from <= _to. Otherwise get weird results.
function getMintMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// Returns the divisor to determine the developer's share of coins at the
// given block. For M coins minted, dev gets M.div(_val_). For a block range,
// undershoot by providing _to block (dev gets up to, not over, the bonus amount).
function getDevDivisor(uint256 _block) public view returns (uint256) {
}
// Returns the score multiplier for an early bird investor who qualifies
// at _block for _pid. The investment quantity and min threshold are not
// checked; qualification is a precondition.
// The output is scaled by EARLY_BIRD_PRECISION; e.g. a return value of
// 1.5 * EARLY_BIRD_PRECISION indicates a multiplier of 1.5x.
function getEarlyBirdMultiplier(uint256 _block, uint256 _pid) public view returns (uint256) {
}
// View function to see pending CHKNs on frontend.
function pendingChicken(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to FryCook for CHKN allocation. Deposit 0 to bump a pool update.
function deposit(uint256 _pid, uint256 _amount) public {
}
// Deposit LP tokens on behalf of another user.
function depositTo(uint256 _pid, uint256 _amount, address _staker) public {
}
// Handle deposits, whether agent-driven or user-initiated.
function _deposit(uint256 _pid, uint256 _amount, address _staker, address _funder) internal {
}
// Withdraw staked LP tokens from FryCook. Also transfers pending chicken.
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw a user's staked LP tokens as an agent. Also transfers pending
// chicken (to the staking user, NOT the agent).
function withdrawFrom(uint256 _pid, uint256 _amount, address _staker) public {
}
// Withdraw LP tokens from FryCook to the agent. Staked chicken
// goes to the _staker. We don't support deferred CHKN transfers; every time
// a deposit or withdrawal happens, pending CHKN must be transferred or
// the books aren't kept clean.
function _withdraw(uint256 _pid, uint256 _amount, address _staker, address _agent) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe chicken transfer function, just in case if rounding error causes pool to not have enough CHKNs.
function safeChickenTransfer(address _to, uint256 _amount) internal {
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
}
}
| !hasToken[address(_lpToken)],"FryCook::add: lpToken already added" | 304,273 | !hasToken[address(_lpToken)] |
"FryCook::set: not authorized" | pragma solidity 0.6.12;
// An interface for a future component of the CHKN system, allowing migration
// from one type of LP token to another. Migration moves liquidity from an exchange
// contract to another, e.g. for a swap version update. All users keep their
// staked liquidity and can deposit or withdraw the new type of token
// (kept in the same pool / pid) afterwards.
interface ICookMigrator {
// Perform LP token migration from UniswapV2 to ChickenFarm.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// ChickenFarm must mint EXACTLY the same amount of ChickenFarm LP tokens or
// else something bad will happen. Traditional UniswapV2 does not
// do that so be careful!
function migrate(IERC20 token) external returns (IERC20);
}
// FryCook works the fryer. They make some good chicken!
//
// Note that there is an EXECUTIVE_ROLE and the executive(s) wields tremendous
// power. The deployer will have executive power until initial setup is complete,
// then renounce that direct power in favor of Timelocked control so the community
// can see incoming executive orders (including role changes). Eventually, this
// setup will be replaced with community governance by CHKN token holders.
//
// Executives determine who holds other roles and set contract references
// (e.g. for migration). The other roles are:
//
// Head Chef: Designs the menu (can add and update lp token pools)
// Sous Chef: Tweaks recipes (can update lp token pool allocation points)
// Waitstaff: Carries orders and payments (can deposit / withdraw on behalf of stakers)
//
// It makes sense for an executive (individual or community) to also operate as the
// head chef, but nothing but a well-tested and audited smart contract should EVER be assigned
// to waitstaff. Waitstaff have full access to all staked tokens.
contract FryCook is AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. CHKNs to distribute per block.
uint256 lastRewardBlock; // Last block number that CHKNs distribution occurs.
uint256 totalScore; // Total score of all investors.
uint256 accChickenPerScore; // Accumulated CHKNs per score, times 1e12. See below.
// early bird point rewards (larger share of CHKN mints w/in the pool)
uint256 earlyBirdMinShares;
uint256 earlyBirdExtra;
uint256 earlyBirdGraceEndBlock;
uint256 earlyBirdHalvingBlocks;
}
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 score; // The staked "score" based on LP tokens and early bird bonus
uint256 earlyBirdMult; // Early bird bonus multiplier, scaled by EARLY_BIRD_PRECISION
bool earlyBird; // Does the score include an early bird bonus?
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of CHKNs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.score * pool.accChickenPerScore) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accChickenPerScore` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` and `score` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Access Control Roles. This is the FryCook, but there's other jobs in the kitchen.
bytes32 public constant EXECUTIVE_ROLE = keccak256("EXECUTIVE_ROLE"); // aka owner: determines other roles
bytes32 public constant HEAD_CHEF_ROLE = keccak256("HEAD_CHEF_ROLE"); // governance: token pool changes, control over agent list
bytes32 public constant SOUS_CHEF_ROLE = keccak256("SOUS_CHEF_ROLE"); // pool spiciness tweaks: can change allocation points for pools
bytes32 public constant WAITSTAFF_ROLE = keccak256("WAITSTAFF_ROLE"); // token agent(s): can make deposits / withdrawals on behalf of stakers
// The CHKN TOKEN!
ChickenToken public chicken;
uint256 public chickenCap;
// Dev address.
address public devaddr;
// Block number when bonus CHKN stage ends (staged decline to no bonus).
uint256 public bonusStage2Block;
uint256 public bonusStage3Block;
uint256 public bonusStage4Block;
uint256 public bonusEndBlock;
// CHKN tokens created per block.
uint256 public chickenPerBlock;
// Bonus muliplier for early chicken makers.
uint256 public constant BONUS_MULTIPLIER_STAGE_1 = 20;
uint256 public constant BONUS_MULTIPLIER_STAGE_2 = 15;
uint256 public constant BONUS_MULTIPLIER_STAGE_3 = 10;
uint256 public constant BONUS_MULTIPLIER_STAGE_4 = 5;
// Block number when dev share declines (staged decline to lowest share).
uint256 public devBonusStage2Block;
uint256 public devBonusStage3Block;
uint256 public devBonusStage4Block;
uint256 public devBonusEndBlock;
// Dev share divisor for each bonus stage.
uint256 public constant DEV_DIV_STAGE_1 = 10; // 10%
uint256 public constant DEV_DIV_STAGE_2 = 12; // 8.333..%
uint256 public constant DEV_DIV_STAGE_3 = 16; // 6.25%
uint256 public constant DEV_DIV_STAGE_4 = 25; // 4%
uint256 public constant DEV_DIV = 50; // 2%
// Precision values
uint256 public constant EARLY_BIRD_PRECISION = 1e12;
uint256 public constant ACC_CHICKEN_PRECISION = 1e12;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
ICookMigrator public migrator;
// Info of each pool.
PoolInfo[] public poolInfo;
mapping (address => uint256) public tokenPid;
mapping (address => bool) public hasToken;
// Info of each user that stakes LP tokens.
mapping (uint256 => mapping (address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when CHKN mining starts.
uint256 public startBlock;
event Deposit(address indexed staker, address indexed funder, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed staker, address indexed agent, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
ChickenToken _chicken,
address _devaddr,
uint256 _chickenPerBlock,
uint256 _startBlock,
uint256 _bonusEndBlock,
uint256 _devBonusEndBlock
) public {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by a manager.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
uint256 _earlyBirdMinShares,
uint256 _earlyBirdInitialBonus,
uint256 _earlyBirdGraceEndBlock,
uint256 _earlyBirdHalvingBlocks,
bool _withUpdate
) public {
}
// Update the given pool's CHKN allocation point. Can only be called by a manager.
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public {
require(<FILL_ME>)
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
// Set the migrator contract. Can only be called by a manager.
function setMigrator(ICookMigrator _migrator) public {
}
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
}
// Return the number of blocks intersecting between the two ranges.
// Assumption: _from <= _to, _from2 <= _to2.
function getIntersection(uint256 _from, uint256 _to, uint256 _from2, uint256 _to2) public pure returns (uint256) {
}
// Return CHKN reward (mint) multiplier over the given range, _from to _to block.
// Multiply against chickenPerBlock to determine the total amount minted
// during that time (not including devaddr share). Ignores "startBlock".
// Assumption: _from <= _to. Otherwise get weird results.
function getMintMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// Returns the divisor to determine the developer's share of coins at the
// given block. For M coins minted, dev gets M.div(_val_). For a block range,
// undershoot by providing _to block (dev gets up to, not over, the bonus amount).
function getDevDivisor(uint256 _block) public view returns (uint256) {
}
// Returns the score multiplier for an early bird investor who qualifies
// at _block for _pid. The investment quantity and min threshold are not
// checked; qualification is a precondition.
// The output is scaled by EARLY_BIRD_PRECISION; e.g. a return value of
// 1.5 * EARLY_BIRD_PRECISION indicates a multiplier of 1.5x.
function getEarlyBirdMultiplier(uint256 _block, uint256 _pid) public view returns (uint256) {
}
// View function to see pending CHKNs on frontend.
function pendingChicken(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to FryCook for CHKN allocation. Deposit 0 to bump a pool update.
function deposit(uint256 _pid, uint256 _amount) public {
}
// Deposit LP tokens on behalf of another user.
function depositTo(uint256 _pid, uint256 _amount, address _staker) public {
}
// Handle deposits, whether agent-driven or user-initiated.
function _deposit(uint256 _pid, uint256 _amount, address _staker, address _funder) internal {
}
// Withdraw staked LP tokens from FryCook. Also transfers pending chicken.
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw a user's staked LP tokens as an agent. Also transfers pending
// chicken (to the staking user, NOT the agent).
function withdrawFrom(uint256 _pid, uint256 _amount, address _staker) public {
}
// Withdraw LP tokens from FryCook to the agent. Staked chicken
// goes to the _staker. We don't support deferred CHKN transfers; every time
// a deposit or withdrawal happens, pending CHKN must be transferred or
// the books aren't kept clean.
function _withdraw(uint256 _pid, uint256 _amount, address _staker, address _agent) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe chicken transfer function, just in case if rounding error causes pool to not have enough CHKNs.
function safeChickenTransfer(address _to, uint256 _amount) internal {
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
}
}
| hasRole(HEAD_CHEF_ROLE,msg.sender)||hasRole(SOUS_CHEF_ROLE,msg.sender),"FryCook::set: not authorized" | 304,273 | hasRole(HEAD_CHEF_ROLE,msg.sender)||hasRole(SOUS_CHEF_ROLE,msg.sender) |
"FryCook::setMigrator: not authorized" | pragma solidity 0.6.12;
// An interface for a future component of the CHKN system, allowing migration
// from one type of LP token to another. Migration moves liquidity from an exchange
// contract to another, e.g. for a swap version update. All users keep their
// staked liquidity and can deposit or withdraw the new type of token
// (kept in the same pool / pid) afterwards.
interface ICookMigrator {
// Perform LP token migration from UniswapV2 to ChickenFarm.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// ChickenFarm must mint EXACTLY the same amount of ChickenFarm LP tokens or
// else something bad will happen. Traditional UniswapV2 does not
// do that so be careful!
function migrate(IERC20 token) external returns (IERC20);
}
// FryCook works the fryer. They make some good chicken!
//
// Note that there is an EXECUTIVE_ROLE and the executive(s) wields tremendous
// power. The deployer will have executive power until initial setup is complete,
// then renounce that direct power in favor of Timelocked control so the community
// can see incoming executive orders (including role changes). Eventually, this
// setup will be replaced with community governance by CHKN token holders.
//
// Executives determine who holds other roles and set contract references
// (e.g. for migration). The other roles are:
//
// Head Chef: Designs the menu (can add and update lp token pools)
// Sous Chef: Tweaks recipes (can update lp token pool allocation points)
// Waitstaff: Carries orders and payments (can deposit / withdraw on behalf of stakers)
//
// It makes sense for an executive (individual or community) to also operate as the
// head chef, but nothing but a well-tested and audited smart contract should EVER be assigned
// to waitstaff. Waitstaff have full access to all staked tokens.
contract FryCook is AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. CHKNs to distribute per block.
uint256 lastRewardBlock; // Last block number that CHKNs distribution occurs.
uint256 totalScore; // Total score of all investors.
uint256 accChickenPerScore; // Accumulated CHKNs per score, times 1e12. See below.
// early bird point rewards (larger share of CHKN mints w/in the pool)
uint256 earlyBirdMinShares;
uint256 earlyBirdExtra;
uint256 earlyBirdGraceEndBlock;
uint256 earlyBirdHalvingBlocks;
}
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 score; // The staked "score" based on LP tokens and early bird bonus
uint256 earlyBirdMult; // Early bird bonus multiplier, scaled by EARLY_BIRD_PRECISION
bool earlyBird; // Does the score include an early bird bonus?
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of CHKNs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.score * pool.accChickenPerScore) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accChickenPerScore` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` and `score` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Access Control Roles. This is the FryCook, but there's other jobs in the kitchen.
bytes32 public constant EXECUTIVE_ROLE = keccak256("EXECUTIVE_ROLE"); // aka owner: determines other roles
bytes32 public constant HEAD_CHEF_ROLE = keccak256("HEAD_CHEF_ROLE"); // governance: token pool changes, control over agent list
bytes32 public constant SOUS_CHEF_ROLE = keccak256("SOUS_CHEF_ROLE"); // pool spiciness tweaks: can change allocation points for pools
bytes32 public constant WAITSTAFF_ROLE = keccak256("WAITSTAFF_ROLE"); // token agent(s): can make deposits / withdrawals on behalf of stakers
// The CHKN TOKEN!
ChickenToken public chicken;
uint256 public chickenCap;
// Dev address.
address public devaddr;
// Block number when bonus CHKN stage ends (staged decline to no bonus).
uint256 public bonusStage2Block;
uint256 public bonusStage3Block;
uint256 public bonusStage4Block;
uint256 public bonusEndBlock;
// CHKN tokens created per block.
uint256 public chickenPerBlock;
// Bonus muliplier for early chicken makers.
uint256 public constant BONUS_MULTIPLIER_STAGE_1 = 20;
uint256 public constant BONUS_MULTIPLIER_STAGE_2 = 15;
uint256 public constant BONUS_MULTIPLIER_STAGE_3 = 10;
uint256 public constant BONUS_MULTIPLIER_STAGE_4 = 5;
// Block number when dev share declines (staged decline to lowest share).
uint256 public devBonusStage2Block;
uint256 public devBonusStage3Block;
uint256 public devBonusStage4Block;
uint256 public devBonusEndBlock;
// Dev share divisor for each bonus stage.
uint256 public constant DEV_DIV_STAGE_1 = 10; // 10%
uint256 public constant DEV_DIV_STAGE_2 = 12; // 8.333..%
uint256 public constant DEV_DIV_STAGE_3 = 16; // 6.25%
uint256 public constant DEV_DIV_STAGE_4 = 25; // 4%
uint256 public constant DEV_DIV = 50; // 2%
// Precision values
uint256 public constant EARLY_BIRD_PRECISION = 1e12;
uint256 public constant ACC_CHICKEN_PRECISION = 1e12;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
ICookMigrator public migrator;
// Info of each pool.
PoolInfo[] public poolInfo;
mapping (address => uint256) public tokenPid;
mapping (address => bool) public hasToken;
// Info of each user that stakes LP tokens.
mapping (uint256 => mapping (address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when CHKN mining starts.
uint256 public startBlock;
event Deposit(address indexed staker, address indexed funder, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed staker, address indexed agent, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
ChickenToken _chicken,
address _devaddr,
uint256 _chickenPerBlock,
uint256 _startBlock,
uint256 _bonusEndBlock,
uint256 _devBonusEndBlock
) public {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by a manager.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
uint256 _earlyBirdMinShares,
uint256 _earlyBirdInitialBonus,
uint256 _earlyBirdGraceEndBlock,
uint256 _earlyBirdHalvingBlocks,
bool _withUpdate
) public {
}
// Update the given pool's CHKN allocation point. Can only be called by a manager.
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public {
}
// Set the migrator contract. Can only be called by a manager.
function setMigrator(ICookMigrator _migrator) public {
require(<FILL_ME>)
migrator = _migrator;
}
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
}
// Return the number of blocks intersecting between the two ranges.
// Assumption: _from <= _to, _from2 <= _to2.
function getIntersection(uint256 _from, uint256 _to, uint256 _from2, uint256 _to2) public pure returns (uint256) {
}
// Return CHKN reward (mint) multiplier over the given range, _from to _to block.
// Multiply against chickenPerBlock to determine the total amount minted
// during that time (not including devaddr share). Ignores "startBlock".
// Assumption: _from <= _to. Otherwise get weird results.
function getMintMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// Returns the divisor to determine the developer's share of coins at the
// given block. For M coins minted, dev gets M.div(_val_). For a block range,
// undershoot by providing _to block (dev gets up to, not over, the bonus amount).
function getDevDivisor(uint256 _block) public view returns (uint256) {
}
// Returns the score multiplier for an early bird investor who qualifies
// at _block for _pid. The investment quantity and min threshold are not
// checked; qualification is a precondition.
// The output is scaled by EARLY_BIRD_PRECISION; e.g. a return value of
// 1.5 * EARLY_BIRD_PRECISION indicates a multiplier of 1.5x.
function getEarlyBirdMultiplier(uint256 _block, uint256 _pid) public view returns (uint256) {
}
// View function to see pending CHKNs on frontend.
function pendingChicken(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to FryCook for CHKN allocation. Deposit 0 to bump a pool update.
function deposit(uint256 _pid, uint256 _amount) public {
}
// Deposit LP tokens on behalf of another user.
function depositTo(uint256 _pid, uint256 _amount, address _staker) public {
}
// Handle deposits, whether agent-driven or user-initiated.
function _deposit(uint256 _pid, uint256 _amount, address _staker, address _funder) internal {
}
// Withdraw staked LP tokens from FryCook. Also transfers pending chicken.
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw a user's staked LP tokens as an agent. Also transfers pending
// chicken (to the staking user, NOT the agent).
function withdrawFrom(uint256 _pid, uint256 _amount, address _staker) public {
}
// Withdraw LP tokens from FryCook to the agent. Staked chicken
// goes to the _staker. We don't support deferred CHKN transfers; every time
// a deposit or withdrawal happens, pending CHKN must be transferred or
// the books aren't kept clean.
function _withdraw(uint256 _pid, uint256 _amount, address _staker, address _agent) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe chicken transfer function, just in case if rounding error causes pool to not have enough CHKNs.
function safeChickenTransfer(address _to, uint256 _amount) internal {
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
}
}
| hasRole(EXECUTIVE_ROLE,msg.sender),"FryCook::setMigrator: not authorized" | 304,273 | hasRole(EXECUTIVE_ROLE,msg.sender) |
"FryCook::depositTo: not authorized" | pragma solidity 0.6.12;
// An interface for a future component of the CHKN system, allowing migration
// from one type of LP token to another. Migration moves liquidity from an exchange
// contract to another, e.g. for a swap version update. All users keep their
// staked liquidity and can deposit or withdraw the new type of token
// (kept in the same pool / pid) afterwards.
interface ICookMigrator {
// Perform LP token migration from UniswapV2 to ChickenFarm.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// ChickenFarm must mint EXACTLY the same amount of ChickenFarm LP tokens or
// else something bad will happen. Traditional UniswapV2 does not
// do that so be careful!
function migrate(IERC20 token) external returns (IERC20);
}
// FryCook works the fryer. They make some good chicken!
//
// Note that there is an EXECUTIVE_ROLE and the executive(s) wields tremendous
// power. The deployer will have executive power until initial setup is complete,
// then renounce that direct power in favor of Timelocked control so the community
// can see incoming executive orders (including role changes). Eventually, this
// setup will be replaced with community governance by CHKN token holders.
//
// Executives determine who holds other roles and set contract references
// (e.g. for migration). The other roles are:
//
// Head Chef: Designs the menu (can add and update lp token pools)
// Sous Chef: Tweaks recipes (can update lp token pool allocation points)
// Waitstaff: Carries orders and payments (can deposit / withdraw on behalf of stakers)
//
// It makes sense for an executive (individual or community) to also operate as the
// head chef, but nothing but a well-tested and audited smart contract should EVER be assigned
// to waitstaff. Waitstaff have full access to all staked tokens.
contract FryCook is AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. CHKNs to distribute per block.
uint256 lastRewardBlock; // Last block number that CHKNs distribution occurs.
uint256 totalScore; // Total score of all investors.
uint256 accChickenPerScore; // Accumulated CHKNs per score, times 1e12. See below.
// early bird point rewards (larger share of CHKN mints w/in the pool)
uint256 earlyBirdMinShares;
uint256 earlyBirdExtra;
uint256 earlyBirdGraceEndBlock;
uint256 earlyBirdHalvingBlocks;
}
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 score; // The staked "score" based on LP tokens and early bird bonus
uint256 earlyBirdMult; // Early bird bonus multiplier, scaled by EARLY_BIRD_PRECISION
bool earlyBird; // Does the score include an early bird bonus?
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of CHKNs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.score * pool.accChickenPerScore) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accChickenPerScore` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` and `score` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Access Control Roles. This is the FryCook, but there's other jobs in the kitchen.
bytes32 public constant EXECUTIVE_ROLE = keccak256("EXECUTIVE_ROLE"); // aka owner: determines other roles
bytes32 public constant HEAD_CHEF_ROLE = keccak256("HEAD_CHEF_ROLE"); // governance: token pool changes, control over agent list
bytes32 public constant SOUS_CHEF_ROLE = keccak256("SOUS_CHEF_ROLE"); // pool spiciness tweaks: can change allocation points for pools
bytes32 public constant WAITSTAFF_ROLE = keccak256("WAITSTAFF_ROLE"); // token agent(s): can make deposits / withdrawals on behalf of stakers
// The CHKN TOKEN!
ChickenToken public chicken;
uint256 public chickenCap;
// Dev address.
address public devaddr;
// Block number when bonus CHKN stage ends (staged decline to no bonus).
uint256 public bonusStage2Block;
uint256 public bonusStage3Block;
uint256 public bonusStage4Block;
uint256 public bonusEndBlock;
// CHKN tokens created per block.
uint256 public chickenPerBlock;
// Bonus muliplier for early chicken makers.
uint256 public constant BONUS_MULTIPLIER_STAGE_1 = 20;
uint256 public constant BONUS_MULTIPLIER_STAGE_2 = 15;
uint256 public constant BONUS_MULTIPLIER_STAGE_3 = 10;
uint256 public constant BONUS_MULTIPLIER_STAGE_4 = 5;
// Block number when dev share declines (staged decline to lowest share).
uint256 public devBonusStage2Block;
uint256 public devBonusStage3Block;
uint256 public devBonusStage4Block;
uint256 public devBonusEndBlock;
// Dev share divisor for each bonus stage.
uint256 public constant DEV_DIV_STAGE_1 = 10; // 10%
uint256 public constant DEV_DIV_STAGE_2 = 12; // 8.333..%
uint256 public constant DEV_DIV_STAGE_3 = 16; // 6.25%
uint256 public constant DEV_DIV_STAGE_4 = 25; // 4%
uint256 public constant DEV_DIV = 50; // 2%
// Precision values
uint256 public constant EARLY_BIRD_PRECISION = 1e12;
uint256 public constant ACC_CHICKEN_PRECISION = 1e12;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
ICookMigrator public migrator;
// Info of each pool.
PoolInfo[] public poolInfo;
mapping (address => uint256) public tokenPid;
mapping (address => bool) public hasToken;
// Info of each user that stakes LP tokens.
mapping (uint256 => mapping (address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when CHKN mining starts.
uint256 public startBlock;
event Deposit(address indexed staker, address indexed funder, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed staker, address indexed agent, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
ChickenToken _chicken,
address _devaddr,
uint256 _chickenPerBlock,
uint256 _startBlock,
uint256 _bonusEndBlock,
uint256 _devBonusEndBlock
) public {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by a manager.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
uint256 _earlyBirdMinShares,
uint256 _earlyBirdInitialBonus,
uint256 _earlyBirdGraceEndBlock,
uint256 _earlyBirdHalvingBlocks,
bool _withUpdate
) public {
}
// Update the given pool's CHKN allocation point. Can only be called by a manager.
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public {
}
// Set the migrator contract. Can only be called by a manager.
function setMigrator(ICookMigrator _migrator) public {
}
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
}
// Return the number of blocks intersecting between the two ranges.
// Assumption: _from <= _to, _from2 <= _to2.
function getIntersection(uint256 _from, uint256 _to, uint256 _from2, uint256 _to2) public pure returns (uint256) {
}
// Return CHKN reward (mint) multiplier over the given range, _from to _to block.
// Multiply against chickenPerBlock to determine the total amount minted
// during that time (not including devaddr share). Ignores "startBlock".
// Assumption: _from <= _to. Otherwise get weird results.
function getMintMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// Returns the divisor to determine the developer's share of coins at the
// given block. For M coins minted, dev gets M.div(_val_). For a block range,
// undershoot by providing _to block (dev gets up to, not over, the bonus amount).
function getDevDivisor(uint256 _block) public view returns (uint256) {
}
// Returns the score multiplier for an early bird investor who qualifies
// at _block for _pid. The investment quantity and min threshold are not
// checked; qualification is a precondition.
// The output is scaled by EARLY_BIRD_PRECISION; e.g. a return value of
// 1.5 * EARLY_BIRD_PRECISION indicates a multiplier of 1.5x.
function getEarlyBirdMultiplier(uint256 _block, uint256 _pid) public view returns (uint256) {
}
// View function to see pending CHKNs on frontend.
function pendingChicken(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to FryCook for CHKN allocation. Deposit 0 to bump a pool update.
function deposit(uint256 _pid, uint256 _amount) public {
}
// Deposit LP tokens on behalf of another user.
function depositTo(uint256 _pid, uint256 _amount, address _staker) public {
require(<FILL_ME>)
_deposit(_pid, _amount, _staker, msg.sender);
}
// Handle deposits, whether agent-driven or user-initiated.
function _deposit(uint256 _pid, uint256 _amount, address _staker, address _funder) internal {
}
// Withdraw staked LP tokens from FryCook. Also transfers pending chicken.
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw a user's staked LP tokens as an agent. Also transfers pending
// chicken (to the staking user, NOT the agent).
function withdrawFrom(uint256 _pid, uint256 _amount, address _staker) public {
}
// Withdraw LP tokens from FryCook to the agent. Staked chicken
// goes to the _staker. We don't support deferred CHKN transfers; every time
// a deposit or withdrawal happens, pending CHKN must be transferred or
// the books aren't kept clean.
function _withdraw(uint256 _pid, uint256 _amount, address _staker, address _agent) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe chicken transfer function, just in case if rounding error causes pool to not have enough CHKNs.
function safeChickenTransfer(address _to, uint256 _amount) internal {
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
}
}
| hasRole(WAITSTAFF_ROLE,msg.sender),"FryCook::depositTo: not authorized" | 304,273 | hasRole(WAITSTAFF_ROLE,msg.sender) |
"Not enough supply" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.4;
/****************************************
* @author: Squeebo *
* @team: Golden X *
****************************************/
import '../contracts/Blimpie/Delegated.sol';
import '../contracts/Polygon/MaticERC1155.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
contract OwnableDelegateProxy { }
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract AnimusRegnumMaterials is Delegated, MaticERC1155, PaymentSplitter{
struct Token{
uint burnPrice;
uint mintPrice;
uint balance;
uint maxWallet;
uint supply;
bool isBurnActive;
bool isMintActive;
string name;
string uri;
}
Token[] public tokens;
/** BEGIN: OS required **/
string public name = "Animus Regnum: Materials";
string public symbol = "AR:M";
mapping (uint => address) public creators;
//address private proxyRegistryAddress = 0xF57B2c51dED3A29e6891aba85459d600256Cf317; //rinkeby
address private proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; //mainnet
//address private proxyRegistryAddress = 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c; //mumbai
//address private proxyRegistryAddress = 0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101; //polygon
/** END: OS required **/
address[] private payees = [
0x608D6C1f1bD9a99565a7C2ED41B5E8e1A2599284,
0x42e98CdB46444c96B8fDc93Da2fcfd9a77FA9575,
0xBd855c639584686315cb5bdfC7190057BC2a2A08,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private splits = [
85,
5,
5,
5
];
constructor()
Delegated()
MaticERC1155(name, "")
PaymentSplitter( payees, splits ){
}
function exists(uint id) external view returns (bool) {
}
/** BEGIN: OS required **/
//external
function create( address initialOwner, uint supply, string calldata uri_, bytes calldata data_ )
external onlyDelegates returns (uint) {
}
function tokenSupply( uint id ) external view returns( uint ){
}
function totalSupply(uint id) external view returns (uint) {
}
//public
//@see proxyRegistryAddress
function isApprovedForAll( address _owner, address _operator ) public virtual override view returns (bool isOperator) {
}
function uri(uint id) public override view returns (string memory){
}
/** END: OS required **/
//external
fallback() external payable {}
function mint( uint id, uint quantity ) external payable{
require( id < tokens.length, "Specified token (id) does not exist" );
Token storage token = tokens[id];
require( token.isMintActive, "Sale is not active" );
require(<FILL_ME>)
require( msg.value >= token.mintPrice * quantity, "Ether sent is not correct" );
_mint( _msgSender(), id, quantity, "" );
token.balance += quantity;
}
function mintBatch( uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable{
}
//delegated
function burn( address account, uint id, uint quantity ) external payable onlyDelegates{
}
function burnBatch( address account, uint[] calldata ids, uint[] calldata quantities) external payable onlyDelegates{
}
function mintTo( address[] calldata accounts, uint[] calldata ids, uint[] calldata quantities ) external payable onlyDelegates {
}
function mintBatchTo( address account, uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable onlyDelegates{
}
//delegated
function setToken(uint id, string memory name_, string calldata uri_,
uint maxWallet, uint supply,
bool isBurnActive, uint burnPrice,
bool isMintActive, uint mintPrice ) public onlyDelegates{
}
function setActive(uint id, bool isBurnActive, bool isMintActive) public onlyDelegates{
}
function setPrice(uint id, uint burnPrice, uint mintPrice) public onlyDelegates{
}
function setSupply(uint id, uint maxWallet, uint supply) public onlyDelegates{
}
function setURI(uint id, string calldata uri_) external onlyDelegates{
}
//internal
function _msgSender() internal virtual override(Context,MaticERC1155) view returns (address sender){
}
}
| token.balance+quantity<=token.supply,"Not enough supply" | 304,320 | token.balance+quantity<=token.supply |
"Specified token (id) does not exist" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.4;
/****************************************
* @author: Squeebo *
* @team: Golden X *
****************************************/
import '../contracts/Blimpie/Delegated.sol';
import '../contracts/Polygon/MaticERC1155.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
contract OwnableDelegateProxy { }
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract AnimusRegnumMaterials is Delegated, MaticERC1155, PaymentSplitter{
struct Token{
uint burnPrice;
uint mintPrice;
uint balance;
uint maxWallet;
uint supply;
bool isBurnActive;
bool isMintActive;
string name;
string uri;
}
Token[] public tokens;
/** BEGIN: OS required **/
string public name = "Animus Regnum: Materials";
string public symbol = "AR:M";
mapping (uint => address) public creators;
//address private proxyRegistryAddress = 0xF57B2c51dED3A29e6891aba85459d600256Cf317; //rinkeby
address private proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; //mainnet
//address private proxyRegistryAddress = 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c; //mumbai
//address private proxyRegistryAddress = 0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101; //polygon
/** END: OS required **/
address[] private payees = [
0x608D6C1f1bD9a99565a7C2ED41B5E8e1A2599284,
0x42e98CdB46444c96B8fDc93Da2fcfd9a77FA9575,
0xBd855c639584686315cb5bdfC7190057BC2a2A08,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private splits = [
85,
5,
5,
5
];
constructor()
Delegated()
MaticERC1155(name, "")
PaymentSplitter( payees, splits ){
}
function exists(uint id) external view returns (bool) {
}
/** BEGIN: OS required **/
//external
function create( address initialOwner, uint supply, string calldata uri_, bytes calldata data_ )
external onlyDelegates returns (uint) {
}
function tokenSupply( uint id ) external view returns( uint ){
}
function totalSupply(uint id) external view returns (uint) {
}
//public
//@see proxyRegistryAddress
function isApprovedForAll( address _owner, address _operator ) public virtual override view returns (bool isOperator) {
}
function uri(uint id) public override view returns (string memory){
}
/** END: OS required **/
//external
fallback() external payable {}
function mint( uint id, uint quantity ) external payable{
}
function mintBatch( uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable{
uint totalRequired;
for(uint i; i < ids.length; ++i){
require(<FILL_ME>)
uint quantity = quantities[i];
Token storage token = tokens[ids[i]];
require( token.isMintActive, "Sale is not active" );
require( token.balance + quantity <= token.supply, "Not enough supply" );
require( balanceOf( _msgSender(), ids[i] ) + quantity < token.maxWallet, "Don't be greedy" );
require( msg.value >= token.mintPrice * quantity, "Ether sent is not correct" );
totalRequired += ( token.mintPrice * quantity );
token.balance += quantity;
}
require( msg.value >= totalRequired, "Ether sent is not correct" );
_mintBatch( _msgSender(), ids, quantities, data );
}
//delegated
function burn( address account, uint id, uint quantity ) external payable onlyDelegates{
}
function burnBatch( address account, uint[] calldata ids, uint[] calldata quantities) external payable onlyDelegates{
}
function mintTo( address[] calldata accounts, uint[] calldata ids, uint[] calldata quantities ) external payable onlyDelegates {
}
function mintBatchTo( address account, uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable onlyDelegates{
}
//delegated
function setToken(uint id, string memory name_, string calldata uri_,
uint maxWallet, uint supply,
bool isBurnActive, uint burnPrice,
bool isMintActive, uint mintPrice ) public onlyDelegates{
}
function setActive(uint id, bool isBurnActive, bool isMintActive) public onlyDelegates{
}
function setPrice(uint id, uint burnPrice, uint mintPrice) public onlyDelegates{
}
function setSupply(uint id, uint maxWallet, uint supply) public onlyDelegates{
}
function setURI(uint id, string calldata uri_) external onlyDelegates{
}
//internal
function _msgSender() internal virtual override(Context,MaticERC1155) view returns (address sender){
}
}
| ids[i]<tokens.length,"Specified token (id) does not exist" | 304,320 | ids[i]<tokens.length |
"Don't be greedy" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.4;
/****************************************
* @author: Squeebo *
* @team: Golden X *
****************************************/
import '../contracts/Blimpie/Delegated.sol';
import '../contracts/Polygon/MaticERC1155.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
contract OwnableDelegateProxy { }
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract AnimusRegnumMaterials is Delegated, MaticERC1155, PaymentSplitter{
struct Token{
uint burnPrice;
uint mintPrice;
uint balance;
uint maxWallet;
uint supply;
bool isBurnActive;
bool isMintActive;
string name;
string uri;
}
Token[] public tokens;
/** BEGIN: OS required **/
string public name = "Animus Regnum: Materials";
string public symbol = "AR:M";
mapping (uint => address) public creators;
//address private proxyRegistryAddress = 0xF57B2c51dED3A29e6891aba85459d600256Cf317; //rinkeby
address private proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; //mainnet
//address private proxyRegistryAddress = 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c; //mumbai
//address private proxyRegistryAddress = 0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101; //polygon
/** END: OS required **/
address[] private payees = [
0x608D6C1f1bD9a99565a7C2ED41B5E8e1A2599284,
0x42e98CdB46444c96B8fDc93Da2fcfd9a77FA9575,
0xBd855c639584686315cb5bdfC7190057BC2a2A08,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private splits = [
85,
5,
5,
5
];
constructor()
Delegated()
MaticERC1155(name, "")
PaymentSplitter( payees, splits ){
}
function exists(uint id) external view returns (bool) {
}
/** BEGIN: OS required **/
//external
function create( address initialOwner, uint supply, string calldata uri_, bytes calldata data_ )
external onlyDelegates returns (uint) {
}
function tokenSupply( uint id ) external view returns( uint ){
}
function totalSupply(uint id) external view returns (uint) {
}
//public
//@see proxyRegistryAddress
function isApprovedForAll( address _owner, address _operator ) public virtual override view returns (bool isOperator) {
}
function uri(uint id) public override view returns (string memory){
}
/** END: OS required **/
//external
fallback() external payable {}
function mint( uint id, uint quantity ) external payable{
}
function mintBatch( uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable{
uint totalRequired;
for(uint i; i < ids.length; ++i){
require( ids[i] < tokens.length, "Specified token (id) does not exist" );
uint quantity = quantities[i];
Token storage token = tokens[ids[i]];
require( token.isMintActive, "Sale is not active" );
require( token.balance + quantity <= token.supply, "Not enough supply" );
require(<FILL_ME>)
require( msg.value >= token.mintPrice * quantity, "Ether sent is not correct" );
totalRequired += ( token.mintPrice * quantity );
token.balance += quantity;
}
require( msg.value >= totalRequired, "Ether sent is not correct" );
_mintBatch( _msgSender(), ids, quantities, data );
}
//delegated
function burn( address account, uint id, uint quantity ) external payable onlyDelegates{
}
function burnBatch( address account, uint[] calldata ids, uint[] calldata quantities) external payable onlyDelegates{
}
function mintTo( address[] calldata accounts, uint[] calldata ids, uint[] calldata quantities ) external payable onlyDelegates {
}
function mintBatchTo( address account, uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable onlyDelegates{
}
//delegated
function setToken(uint id, string memory name_, string calldata uri_,
uint maxWallet, uint supply,
bool isBurnActive, uint burnPrice,
bool isMintActive, uint mintPrice ) public onlyDelegates{
}
function setActive(uint id, bool isBurnActive, bool isMintActive) public onlyDelegates{
}
function setPrice(uint id, uint burnPrice, uint mintPrice) public onlyDelegates{
}
function setSupply(uint id, uint maxWallet, uint supply) public onlyDelegates{
}
function setURI(uint id, string calldata uri_) external onlyDelegates{
}
//internal
function _msgSender() internal virtual override(Context,MaticERC1155) view returns (address sender){
}
}
| balanceOf(_msgSender(),ids[i])+quantity<token.maxWallet,"Don't be greedy" | 304,320 | balanceOf(_msgSender(),ids[i])+quantity<token.maxWallet |
"Not enough supply" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.4;
/****************************************
* @author: Squeebo *
* @team: Golden X *
****************************************/
import '../contracts/Blimpie/Delegated.sol';
import '../contracts/Polygon/MaticERC1155.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
contract OwnableDelegateProxy { }
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract AnimusRegnumMaterials is Delegated, MaticERC1155, PaymentSplitter{
struct Token{
uint burnPrice;
uint mintPrice;
uint balance;
uint maxWallet;
uint supply;
bool isBurnActive;
bool isMintActive;
string name;
string uri;
}
Token[] public tokens;
/** BEGIN: OS required **/
string public name = "Animus Regnum: Materials";
string public symbol = "AR:M";
mapping (uint => address) public creators;
//address private proxyRegistryAddress = 0xF57B2c51dED3A29e6891aba85459d600256Cf317; //rinkeby
address private proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; //mainnet
//address private proxyRegistryAddress = 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c; //mumbai
//address private proxyRegistryAddress = 0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101; //polygon
/** END: OS required **/
address[] private payees = [
0x608D6C1f1bD9a99565a7C2ED41B5E8e1A2599284,
0x42e98CdB46444c96B8fDc93Da2fcfd9a77FA9575,
0xBd855c639584686315cb5bdfC7190057BC2a2A08,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private splits = [
85,
5,
5,
5
];
constructor()
Delegated()
MaticERC1155(name, "")
PaymentSplitter( payees, splits ){
}
function exists(uint id) external view returns (bool) {
}
/** BEGIN: OS required **/
//external
function create( address initialOwner, uint supply, string calldata uri_, bytes calldata data_ )
external onlyDelegates returns (uint) {
}
function tokenSupply( uint id ) external view returns( uint ){
}
function totalSupply(uint id) external view returns (uint) {
}
//public
//@see proxyRegistryAddress
function isApprovedForAll( address _owner, address _operator ) public virtual override view returns (bool isOperator) {
}
function uri(uint id) public override view returns (string memory){
}
/** END: OS required **/
//external
fallback() external payable {}
function mint( uint id, uint quantity ) external payable{
}
function mintBatch( uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable{
}
//delegated
function burn( address account, uint id, uint quantity ) external payable onlyDelegates{
}
function burnBatch( address account, uint[] calldata ids, uint[] calldata quantities) external payable onlyDelegates{
}
function mintTo( address[] calldata accounts, uint[] calldata ids, uint[] calldata quantities ) external payable onlyDelegates {
require( accounts.length == ids.length, "Must provide equal accounts and ids" );
require( ids.length == quantities.length, "Must provide equal ids and quantities");
for(uint i; i < ids.length; ++i ){
require( ids[i] < tokens.length, "Specified token (id) does not exist" );
Token storage token = tokens[ids[i]];
require(<FILL_ME>)
token.balance += quantities[i];
_mint( accounts[i], ids[i], quantities[i], "" );
}
}
function mintBatchTo( address account, uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable onlyDelegates{
}
//delegated
function setToken(uint id, string memory name_, string calldata uri_,
uint maxWallet, uint supply,
bool isBurnActive, uint burnPrice,
bool isMintActive, uint mintPrice ) public onlyDelegates{
}
function setActive(uint id, bool isBurnActive, bool isMintActive) public onlyDelegates{
}
function setPrice(uint id, uint burnPrice, uint mintPrice) public onlyDelegates{
}
function setSupply(uint id, uint maxWallet, uint supply) public onlyDelegates{
}
function setURI(uint id, string calldata uri_) external onlyDelegates{
}
//internal
function _msgSender() internal virtual override(Context,MaticERC1155) view returns (address sender){
}
}
| token.balance+quantities[i]<=token.supply,"Not enough supply" | 304,320 | token.balance+quantities[i]<=token.supply |
"New value matches old" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.4;
/****************************************
* @author: Squeebo *
* @team: Golden X *
****************************************/
import '../contracts/Blimpie/Delegated.sol';
import '../contracts/Polygon/MaticERC1155.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
contract OwnableDelegateProxy { }
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract AnimusRegnumMaterials is Delegated, MaticERC1155, PaymentSplitter{
struct Token{
uint burnPrice;
uint mintPrice;
uint balance;
uint maxWallet;
uint supply;
bool isBurnActive;
bool isMintActive;
string name;
string uri;
}
Token[] public tokens;
/** BEGIN: OS required **/
string public name = "Animus Regnum: Materials";
string public symbol = "AR:M";
mapping (uint => address) public creators;
//address private proxyRegistryAddress = 0xF57B2c51dED3A29e6891aba85459d600256Cf317; //rinkeby
address private proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; //mainnet
//address private proxyRegistryAddress = 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c; //mumbai
//address private proxyRegistryAddress = 0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101; //polygon
/** END: OS required **/
address[] private payees = [
0x608D6C1f1bD9a99565a7C2ED41B5E8e1A2599284,
0x42e98CdB46444c96B8fDc93Da2fcfd9a77FA9575,
0xBd855c639584686315cb5bdfC7190057BC2a2A08,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private splits = [
85,
5,
5,
5
];
constructor()
Delegated()
MaticERC1155(name, "")
PaymentSplitter( payees, splits ){
}
function exists(uint id) external view returns (bool) {
}
/** BEGIN: OS required **/
//external
function create( address initialOwner, uint supply, string calldata uri_, bytes calldata data_ )
external onlyDelegates returns (uint) {
}
function tokenSupply( uint id ) external view returns( uint ){
}
function totalSupply(uint id) external view returns (uint) {
}
//public
//@see proxyRegistryAddress
function isApprovedForAll( address _owner, address _operator ) public virtual override view returns (bool isOperator) {
}
function uri(uint id) public override view returns (string memory){
}
/** END: OS required **/
//external
fallback() external payable {}
function mint( uint id, uint quantity ) external payable{
}
function mintBatch( uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable{
}
//delegated
function burn( address account, uint id, uint quantity ) external payable onlyDelegates{
}
function burnBatch( address account, uint[] calldata ids, uint[] calldata quantities) external payable onlyDelegates{
}
function mintTo( address[] calldata accounts, uint[] calldata ids, uint[] calldata quantities ) external payable onlyDelegates {
}
function mintBatchTo( address account, uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable onlyDelegates{
}
//delegated
function setToken(uint id, string memory name_, string calldata uri_,
uint maxWallet, uint supply,
bool isBurnActive, uint burnPrice,
bool isMintActive, uint mintPrice ) public onlyDelegates{
}
function setActive(uint id, bool isBurnActive, bool isMintActive) public onlyDelegates{
require( id < tokens.length, "Specified token (id) does not exist" );
require(<FILL_ME>)
tokens[id].isBurnActive = isBurnActive;
tokens[id].isMintActive = isMintActive;
}
function setPrice(uint id, uint burnPrice, uint mintPrice) public onlyDelegates{
}
function setSupply(uint id, uint maxWallet, uint supply) public onlyDelegates{
}
function setURI(uint id, string calldata uri_) external onlyDelegates{
}
//internal
function _msgSender() internal virtual override(Context,MaticERC1155) view returns (address sender){
}
}
| tokens[id].isBurnActive!=isBurnActive||tokens[id].isMintActive!=isMintActive,"New value matches old" | 304,320 | tokens[id].isBurnActive!=isBurnActive||tokens[id].isMintActive!=isMintActive |
"New value matches old" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.4;
/****************************************
* @author: Squeebo *
* @team: Golden X *
****************************************/
import '../contracts/Blimpie/Delegated.sol';
import '../contracts/Polygon/MaticERC1155.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
contract OwnableDelegateProxy { }
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract AnimusRegnumMaterials is Delegated, MaticERC1155, PaymentSplitter{
struct Token{
uint burnPrice;
uint mintPrice;
uint balance;
uint maxWallet;
uint supply;
bool isBurnActive;
bool isMintActive;
string name;
string uri;
}
Token[] public tokens;
/** BEGIN: OS required **/
string public name = "Animus Regnum: Materials";
string public symbol = "AR:M";
mapping (uint => address) public creators;
//address private proxyRegistryAddress = 0xF57B2c51dED3A29e6891aba85459d600256Cf317; //rinkeby
address private proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; //mainnet
//address private proxyRegistryAddress = 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c; //mumbai
//address private proxyRegistryAddress = 0x207Fa8Df3a17D96Ca7EA4f2893fcdCb78a304101; //polygon
/** END: OS required **/
address[] private payees = [
0x608D6C1f1bD9a99565a7C2ED41B5E8e1A2599284,
0x42e98CdB46444c96B8fDc93Da2fcfd9a77FA9575,
0xBd855c639584686315cb5bdfC7190057BC2a2A08,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private splits = [
85,
5,
5,
5
];
constructor()
Delegated()
MaticERC1155(name, "")
PaymentSplitter( payees, splits ){
}
function exists(uint id) external view returns (bool) {
}
/** BEGIN: OS required **/
//external
function create( address initialOwner, uint supply, string calldata uri_, bytes calldata data_ )
external onlyDelegates returns (uint) {
}
function tokenSupply( uint id ) external view returns( uint ){
}
function totalSupply(uint id) external view returns (uint) {
}
//public
//@see proxyRegistryAddress
function isApprovedForAll( address _owner, address _operator ) public virtual override view returns (bool isOperator) {
}
function uri(uint id) public override view returns (string memory){
}
/** END: OS required **/
//external
fallback() external payable {}
function mint( uint id, uint quantity ) external payable{
}
function mintBatch( uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable{
}
//delegated
function burn( address account, uint id, uint quantity ) external payable onlyDelegates{
}
function burnBatch( address account, uint[] calldata ids, uint[] calldata quantities) external payable onlyDelegates{
}
function mintTo( address[] calldata accounts, uint[] calldata ids, uint[] calldata quantities ) external payable onlyDelegates {
}
function mintBatchTo( address account, uint[] calldata ids, uint[] calldata quantities, bytes calldata data) external payable onlyDelegates{
}
//delegated
function setToken(uint id, string memory name_, string calldata uri_,
uint maxWallet, uint supply,
bool isBurnActive, uint burnPrice,
bool isMintActive, uint mintPrice ) public onlyDelegates{
}
function setActive(uint id, bool isBurnActive, bool isMintActive) public onlyDelegates{
}
function setPrice(uint id, uint burnPrice, uint mintPrice) public onlyDelegates{
require( id < tokens.length, "Specified token (id) does not exist" );
require(<FILL_ME>)
tokens[id].burnPrice = burnPrice;
tokens[id].mintPrice = mintPrice;
}
function setSupply(uint id, uint maxWallet, uint supply) public onlyDelegates{
}
function setURI(uint id, string calldata uri_) external onlyDelegates{
}
//internal
function _msgSender() internal virtual override(Context,MaticERC1155) view returns (address sender){
}
}
| tokens[id].burnPrice!=burnPrice||tokens[id].mintPrice!=mintPrice,"New value matches old" | 304,320 | tokens[id].burnPrice!=burnPrice||tokens[id].mintPrice!=mintPrice |
"can't perform melt" | /**
*Submitted for verification at Etherscan.io on 2019-08-27
*/
pragma solidity ^0.5.11;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract AccountFrozenBalances {
using SafeMath for uint256;
mapping (address => uint256) private frozen_balances;
function _frozen_add(address _account, uint256 _amount) internal returns (bool) {
}
function _frozen_sub(address _account, uint256 _amount) internal returns (bool) {
}
function _frozen_balanceOf(address _account) public view returns (uint) {
}
}
contract Ownable {
address private _owner;
address public pendingOwner;
modifier onlyOwner() {
}
modifier onlyPendingOwner() {
}
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function claimOwnership() public onlyPendingOwner {
}
}
contract Whitelisted {
address private _whitelistadmin;
address public pendingWhiteListAdmin;
mapping (address => bool) private _whitelisted;
modifier onlyWhitelistAdmin() {
}
modifier onlyPendingWhitelistAdmin() {
}
event WhitelistAdminTransferred(address indexed previousAdmin, address indexed newAdmin);
constructor () internal {
}
function whitelistadmin() public view returns (address){
}
function addWhitelisted(address account) public onlyWhitelistAdmin {
}
function removeWhitelisted(address account) public onlyWhitelistAdmin {
}
function isWhitelisted(address account) public view returns (bool) {
}
function transferWhitelistAdmin(address newAdmin) public onlyWhitelistAdmin {
}
function claimWhitelistAdmin() public onlyPendingWhitelistAdmin {
}
}
contract Burnable {
bool private _burnallow;
address private _burner;
address public pendingBurner;
modifier whenBurn() {
}
modifier onlyBurner() {
}
modifier onlyPendingBurner() {
}
event BurnerTransferred(address indexed previousBurner, address indexed newBurner);
constructor () internal {
}
function burnallow() public view returns (bool) {
}
function burner() public view returns (address) {
}
function burnTrigger() public onlyBurner {
}
function transferWhitelistAdmin(address newBurner) public onlyBurner {
}
function claimBurner() public onlyPendingBurner {
}
}
contract Meltable {
mapping (address => bool) private _melters;
address private _melteradmin;
address public pendingMelterAdmin;
modifier onlyMelterAdmin() {
}
modifier onlyMelter() {
require(<FILL_ME>)
_;
}
modifier onlyPendingMelterAdmin() {
}
event MelterTransferred(address indexed previousMelter, address indexed newMelter);
constructor () internal {
}
function melteradmin() public view returns (address) {
}
function addToMelters(address account) public onlyMelterAdmin {
}
function removeFromMelters(address account) public onlyMelterAdmin {
}
function transferMelterAdmin(address newMelter) public onlyMelterAdmin {
}
function claimMelterAdmin() public onlyPendingMelterAdmin {
}
}
contract Mintable {
mapping (address => bool) private _minters;
address private _minteradmin;
address public pendingMinterAdmin;
modifier onlyMinterAdmin() {
}
modifier onlyMinter() {
}
modifier onlyPendingMinterAdmin() {
}
event MinterTransferred(address indexed previousMinter, address indexed newMinter);
constructor () internal {
}
function minteradmin() public view returns (address) {
}
function addToMinters(address account) public onlyMinterAdmin {
}
function removeFromMinters(address account) public onlyMinterAdmin {
}
function transferMinterAdmin(address newMinter) public onlyMinterAdmin {
}
function claimMinterAdmin() public onlyPendingMinterAdmin {
}
}
contract Pausable {
bool private _paused;
address private _pauser;
address public pendingPauser;
modifier onlyPauser() {
}
modifier onlyPendingPauser() {
}
event PauserTransferred(address indexed previousPauser, address indexed newPauser);
constructor () internal {
}
function paused() public view returns (bool) {
}
function pauser() public view returns (address) {
}
function pauseTrigger() public onlyPauser {
}
function transferPauser(address newPauser) public onlyPauser {
}
function claimPauser() public onlyPendingPauser {
}
}
contract TokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes memory _extraData) public;
}
contract KoinProToken is AccountFrozenBalances, Ownable, Whitelisted, Burnable, Pausable, Mintable, Meltable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
modifier canTransfer() {
}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Freeze(address indexed from, uint256 amount);
event Melt(address indexed from, uint256 amount);
event MintFrozen(address indexed to, uint256 amount);
event FrozenTransfer(address indexed from, address indexed to, uint256 value);
constructor (string memory _name, string memory _symbol, uint8 _decimals, uint256 _total) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public canTransfer returns (bool) {
}
function allowance(address _owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
/* Approve and then communicate the approved contract in a single tx */
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public canTransfer returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function mint(address account, uint256 amount) public onlyMinter returns (bool) {
}
function burn(uint256 amount) public whenBurn {
}
function burnFrom(address account, uint256 amount) public whenBurn {
}
function destroy(address account, uint256 amount) public onlyOwner {
}
function destroyFrozen(address account, uint256 amount) public onlyOwner {
}
function mintBatchToken(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function transferFrozenToken(address from, address to, uint256 amount) public onlyOwner returns (bool) {
}
function freezeTokens(address account, uint256 amount) public onlyOwner returns (bool) {
}
function meltTokens(address account, uint256 amount) public onlyMelter returns (bool) {
}
function mintFrozenTokens(address account, uint256 amount) public onlyMinter returns (bool) {
}
function mintBatchFrozenTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function meltBatchTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMelter returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address _owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
function _freeze(address account, uint256 amount) internal {
}
function _mintfrozen(address account, uint256 amount) internal {
}
function _melt(address account, uint256 amount) internal {
}
function _burnFrozen(address account, uint256 amount) internal {
}
}
| _melters[msg.sender]==true,"can't perform melt" | 304,399 | _melters[msg.sender]==true |
"can't perform mint" | /**
*Submitted for verification at Etherscan.io on 2019-08-27
*/
pragma solidity ^0.5.11;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract AccountFrozenBalances {
using SafeMath for uint256;
mapping (address => uint256) private frozen_balances;
function _frozen_add(address _account, uint256 _amount) internal returns (bool) {
}
function _frozen_sub(address _account, uint256 _amount) internal returns (bool) {
}
function _frozen_balanceOf(address _account) public view returns (uint) {
}
}
contract Ownable {
address private _owner;
address public pendingOwner;
modifier onlyOwner() {
}
modifier onlyPendingOwner() {
}
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function claimOwnership() public onlyPendingOwner {
}
}
contract Whitelisted {
address private _whitelistadmin;
address public pendingWhiteListAdmin;
mapping (address => bool) private _whitelisted;
modifier onlyWhitelistAdmin() {
}
modifier onlyPendingWhitelistAdmin() {
}
event WhitelistAdminTransferred(address indexed previousAdmin, address indexed newAdmin);
constructor () internal {
}
function whitelistadmin() public view returns (address){
}
function addWhitelisted(address account) public onlyWhitelistAdmin {
}
function removeWhitelisted(address account) public onlyWhitelistAdmin {
}
function isWhitelisted(address account) public view returns (bool) {
}
function transferWhitelistAdmin(address newAdmin) public onlyWhitelistAdmin {
}
function claimWhitelistAdmin() public onlyPendingWhitelistAdmin {
}
}
contract Burnable {
bool private _burnallow;
address private _burner;
address public pendingBurner;
modifier whenBurn() {
}
modifier onlyBurner() {
}
modifier onlyPendingBurner() {
}
event BurnerTransferred(address indexed previousBurner, address indexed newBurner);
constructor () internal {
}
function burnallow() public view returns (bool) {
}
function burner() public view returns (address) {
}
function burnTrigger() public onlyBurner {
}
function transferWhitelistAdmin(address newBurner) public onlyBurner {
}
function claimBurner() public onlyPendingBurner {
}
}
contract Meltable {
mapping (address => bool) private _melters;
address private _melteradmin;
address public pendingMelterAdmin;
modifier onlyMelterAdmin() {
}
modifier onlyMelter() {
}
modifier onlyPendingMelterAdmin() {
}
event MelterTransferred(address indexed previousMelter, address indexed newMelter);
constructor () internal {
}
function melteradmin() public view returns (address) {
}
function addToMelters(address account) public onlyMelterAdmin {
}
function removeFromMelters(address account) public onlyMelterAdmin {
}
function transferMelterAdmin(address newMelter) public onlyMelterAdmin {
}
function claimMelterAdmin() public onlyPendingMelterAdmin {
}
}
contract Mintable {
mapping (address => bool) private _minters;
address private _minteradmin;
address public pendingMinterAdmin;
modifier onlyMinterAdmin() {
}
modifier onlyMinter() {
require(<FILL_ME>)
_;
}
modifier onlyPendingMinterAdmin() {
}
event MinterTransferred(address indexed previousMinter, address indexed newMinter);
constructor () internal {
}
function minteradmin() public view returns (address) {
}
function addToMinters(address account) public onlyMinterAdmin {
}
function removeFromMinters(address account) public onlyMinterAdmin {
}
function transferMinterAdmin(address newMinter) public onlyMinterAdmin {
}
function claimMinterAdmin() public onlyPendingMinterAdmin {
}
}
contract Pausable {
bool private _paused;
address private _pauser;
address public pendingPauser;
modifier onlyPauser() {
}
modifier onlyPendingPauser() {
}
event PauserTransferred(address indexed previousPauser, address indexed newPauser);
constructor () internal {
}
function paused() public view returns (bool) {
}
function pauser() public view returns (address) {
}
function pauseTrigger() public onlyPauser {
}
function transferPauser(address newPauser) public onlyPauser {
}
function claimPauser() public onlyPendingPauser {
}
}
contract TokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes memory _extraData) public;
}
contract KoinProToken is AccountFrozenBalances, Ownable, Whitelisted, Burnable, Pausable, Mintable, Meltable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
modifier canTransfer() {
}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Freeze(address indexed from, uint256 amount);
event Melt(address indexed from, uint256 amount);
event MintFrozen(address indexed to, uint256 amount);
event FrozenTransfer(address indexed from, address indexed to, uint256 value);
constructor (string memory _name, string memory _symbol, uint8 _decimals, uint256 _total) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public canTransfer returns (bool) {
}
function allowance(address _owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
/* Approve and then communicate the approved contract in a single tx */
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public canTransfer returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function mint(address account, uint256 amount) public onlyMinter returns (bool) {
}
function burn(uint256 amount) public whenBurn {
}
function burnFrom(address account, uint256 amount) public whenBurn {
}
function destroy(address account, uint256 amount) public onlyOwner {
}
function destroyFrozen(address account, uint256 amount) public onlyOwner {
}
function mintBatchToken(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function transferFrozenToken(address from, address to, uint256 amount) public onlyOwner returns (bool) {
}
function freezeTokens(address account, uint256 amount) public onlyOwner returns (bool) {
}
function meltTokens(address account, uint256 amount) public onlyMelter returns (bool) {
}
function mintFrozenTokens(address account, uint256 amount) public onlyMinter returns (bool) {
}
function mintBatchFrozenTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function meltBatchTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMelter returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address _owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
function _freeze(address account, uint256 amount) internal {
}
function _mintfrozen(address account, uint256 amount) internal {
}
function _melt(address account, uint256 amount) internal {
}
function _burnFrozen(address account, uint256 amount) internal {
}
}
| _minters[msg.sender]==true,"can't perform mint" | 304,399 | _minters[msg.sender]==true |
"YFBTC:: cap exceeded" | pragma solidity 0.6.12;
// YFBitcoin with Governance.
contract YFBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable {
uint256 public transferFee = 1;
uint256 public devFee = 300;
address public devAddress;
uint256 public cap;
constructor(uint256 _cap, address _devAddress) public {
}
function setTransferFee(uint256 _fee) public onlyOwner {
}
function setDevAddress(address _devAddress) public onlyOwner {
}
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
}
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
// Copied and modified from YAM code:
// https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol
// https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol
// Which is copied and modified from COMPOUND:
// https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol
mapping(address => address) internal _delegates;
/// @notice A checkpoint for marking number of votes from a given block
struct Checkpoint {
uint32 fromBlock;
uint256 votes;
}
/// @notice A record of votes checkpoints for each account, by index
mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;
/// @notice The number of checkpoints for each account
mapping(address => uint32) public numCheckpoints;
/// @notice The EIP-712 typehash for the contract's domain
bytes32 public constant DOMAIN_TYPEHASH = keccak256(
"EIP712Domain(string name,uint256 chainId,address verifyingContract)"
);
/// @notice The EIP-712 typehash for the delegation struct used by the contract
bytes32 public constant DELEGATION_TYPEHASH = keccak256(
"Delegation(address delegatee,uint256 nonce,uint256 expiry)"
);
/// @notice A record of states for signing / validating signatures
mapping(address => uint256) public nonces;
/// @notice An event thats emitted when an account changes its delegate
event DelegateChanged(
address indexed delegator,
address indexed fromDelegate,
address indexed toDelegate
);
/// @notice An event thats emitted when a delegate account's vote balance changes
event DelegateVotesChanged(
address indexed delegate,
uint256 previousBalance,
uint256 newBalance
);
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegator The address to get delegatee for
*/
function delegates(address delegator) external view returns (address) {
}
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/
function delegate(address delegatee) external {
}
/**
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateBySig(
address delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) external {
}
/**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/
function getCurrentVotes(address account) external view returns (uint256) {
}
/**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
* @return The number of votes the account had as of the given block
*/
function getPriorVotes(address account, uint256 blockNumber)
external
view
returns (uint256)
{
}
function _delegate(address delegator, address delegatee) internal {
}
function _moveDelegates(
address srcRep,
address dstRep,
uint256 amount
) internal {
}
function _writeCheckpoint(
address delegatee,
uint32 nCheckpoints,
uint256 oldVotes,
uint256 newVotes
) internal {
}
function safe32(uint256 n, string memory errorMessage)
internal
pure
returns (uint32)
{
}
function getChainId() internal pure returns (uint256) {
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*
* Requirements:
*
* - minted tokens must not cause the total supply to go over the cap.
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
super._beforeTokenTransfer(from, to, amount);
if (from == address(0)) {
// When minting tokens
require(<FILL_ME>)
}
}
}
| totalSupply().add(amount)<=cap,"YFBTC:: cap exceeded" | 304,411 | totalSupply().add(amount)<=cap |
null | pragma solidity ^0.4.23;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract WhitelistInterface {
function checkWhitelist(address _whiteListAddress) public view returns(bool);
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @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) public returns (bool) {
}
/**
* @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.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @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
*/
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 transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint _subtractedValue
)
public
returns (bool)
{
}
}
/**
* @title DetailedERC20 token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
constructor(string _name, string _symbol, uint8 _decimals) public {
}
}
/**
* @title Math
* @dev Assorted math operations
*/
library Math {
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title TuurntToken
* @dev The TuurntToken contract contains the information about
* Tuurnt token.
*/
contract TuurntToken is StandardToken, DetailedERC20 {
using SafeMath for uint256;
// distribution variables
uint256 public tokenAllocToTeam;
uint256 public tokenAllocToCrowdsale;
uint256 public tokenAllocToCompany;
// addresses
address public crowdsaleAddress;
address public teamAddress;
address public companyAddress;
/**
* @dev The TuurntToken constructor set the orginal crowdsaleAddress,teamAddress and companyAddress and allocate the
* tokens to them.
* @param _crowdsaleAddress The address of crowsale contract
* @param _teamAddress The address of team
* @param _companyAddress The address of company
*/
constructor(address _crowdsaleAddress, address _teamAddress, address _companyAddress, string _name, string _symbol, uint8 _decimals) public
DetailedERC20(_name, _symbol, _decimals)
{
}
}
contract TuurntAirdrop is Ownable {
using SafeMath for uint256;
TuurntToken public token;
WhitelistInterface public whitelist;
mapping(address=>bool) public userAddress;
uint256 public totalDropAmount;
uint256 public dropAmount = 100 * 10 ** 18;
/**
* @dev TuurntAirdrop constructor set the whitelist contract address.
* @param _whitelist Whitelist contract address
*/
constructor(address _whitelist) public{
}
/**
* @dev Set the token contract address.
* @param _tokenAddress token contract address
*/
function setTokenAddress(address _tokenAddress) onlyOwner public {
}
/**
* @dev User can withdraw there airdrop tokens if address exist in the whitelist.
*/
function airdropToken() external{
require(<FILL_ME>)
require(userAddress[msg.sender] == false);
totalDropAmount = totalDropAmount.add(dropAmount);
userAddress[msg.sender] = true;
require(token.transfer(msg.sender,dropAmount));
}
/**
* @dev Founder can withdraw the remaining tokens of airdrop contract.
* @param _addr Address where the remaining tokens will go.
*/
function withdrawToken(address _addr) onlyOwner external{
}
}
| whitelist.checkWhitelist(msg.sender) | 304,420 | whitelist.checkWhitelist(msg.sender) |
null | pragma solidity ^0.4.23;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract WhitelistInterface {
function checkWhitelist(address _whiteListAddress) public view returns(bool);
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @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) public returns (bool) {
}
/**
* @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.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @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
*/
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 transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint _subtractedValue
)
public
returns (bool)
{
}
}
/**
* @title DetailedERC20 token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
constructor(string _name, string _symbol, uint8 _decimals) public {
}
}
/**
* @title Math
* @dev Assorted math operations
*/
library Math {
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title TuurntToken
* @dev The TuurntToken contract contains the information about
* Tuurnt token.
*/
contract TuurntToken is StandardToken, DetailedERC20 {
using SafeMath for uint256;
// distribution variables
uint256 public tokenAllocToTeam;
uint256 public tokenAllocToCrowdsale;
uint256 public tokenAllocToCompany;
// addresses
address public crowdsaleAddress;
address public teamAddress;
address public companyAddress;
/**
* @dev The TuurntToken constructor set the orginal crowdsaleAddress,teamAddress and companyAddress and allocate the
* tokens to them.
* @param _crowdsaleAddress The address of crowsale contract
* @param _teamAddress The address of team
* @param _companyAddress The address of company
*/
constructor(address _crowdsaleAddress, address _teamAddress, address _companyAddress, string _name, string _symbol, uint8 _decimals) public
DetailedERC20(_name, _symbol, _decimals)
{
}
}
contract TuurntAirdrop is Ownable {
using SafeMath for uint256;
TuurntToken public token;
WhitelistInterface public whitelist;
mapping(address=>bool) public userAddress;
uint256 public totalDropAmount;
uint256 public dropAmount = 100 * 10 ** 18;
/**
* @dev TuurntAirdrop constructor set the whitelist contract address.
* @param _whitelist Whitelist contract address
*/
constructor(address _whitelist) public{
}
/**
* @dev Set the token contract address.
* @param _tokenAddress token contract address
*/
function setTokenAddress(address _tokenAddress) onlyOwner public {
}
/**
* @dev User can withdraw there airdrop tokens if address exist in the whitelist.
*/
function airdropToken() external{
require(whitelist.checkWhitelist(msg.sender));
require(<FILL_ME>)
totalDropAmount = totalDropAmount.add(dropAmount);
userAddress[msg.sender] = true;
require(token.transfer(msg.sender,dropAmount));
}
/**
* @dev Founder can withdraw the remaining tokens of airdrop contract.
* @param _addr Address where the remaining tokens will go.
*/
function withdrawToken(address _addr) onlyOwner external{
}
}
| userAddress[msg.sender]==false | 304,420 | userAddress[msg.sender]==false |
null | pragma solidity ^0.4.23;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract WhitelistInterface {
function checkWhitelist(address _whiteListAddress) public view returns(bool);
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @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) public returns (bool) {
}
/**
* @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.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @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
*/
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 transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint _subtractedValue
)
public
returns (bool)
{
}
}
/**
* @title DetailedERC20 token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
constructor(string _name, string _symbol, uint8 _decimals) public {
}
}
/**
* @title Math
* @dev Assorted math operations
*/
library Math {
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title TuurntToken
* @dev The TuurntToken contract contains the information about
* Tuurnt token.
*/
contract TuurntToken is StandardToken, DetailedERC20 {
using SafeMath for uint256;
// distribution variables
uint256 public tokenAllocToTeam;
uint256 public tokenAllocToCrowdsale;
uint256 public tokenAllocToCompany;
// addresses
address public crowdsaleAddress;
address public teamAddress;
address public companyAddress;
/**
* @dev The TuurntToken constructor set the orginal crowdsaleAddress,teamAddress and companyAddress and allocate the
* tokens to them.
* @param _crowdsaleAddress The address of crowsale contract
* @param _teamAddress The address of team
* @param _companyAddress The address of company
*/
constructor(address _crowdsaleAddress, address _teamAddress, address _companyAddress, string _name, string _symbol, uint8 _decimals) public
DetailedERC20(_name, _symbol, _decimals)
{
}
}
contract TuurntAirdrop is Ownable {
using SafeMath for uint256;
TuurntToken public token;
WhitelistInterface public whitelist;
mapping(address=>bool) public userAddress;
uint256 public totalDropAmount;
uint256 public dropAmount = 100 * 10 ** 18;
/**
* @dev TuurntAirdrop constructor set the whitelist contract address.
* @param _whitelist Whitelist contract address
*/
constructor(address _whitelist) public{
}
/**
* @dev Set the token contract address.
* @param _tokenAddress token contract address
*/
function setTokenAddress(address _tokenAddress) onlyOwner public {
}
/**
* @dev User can withdraw there airdrop tokens if address exist in the whitelist.
*/
function airdropToken() external{
require(whitelist.checkWhitelist(msg.sender));
require(userAddress[msg.sender] == false);
totalDropAmount = totalDropAmount.add(dropAmount);
userAddress[msg.sender] = true;
require(<FILL_ME>)
}
/**
* @dev Founder can withdraw the remaining tokens of airdrop contract.
* @param _addr Address where the remaining tokens will go.
*/
function withdrawToken(address _addr) onlyOwner external{
}
}
| token.transfer(msg.sender,dropAmount) | 304,420 | token.transfer(msg.sender,dropAmount) |
null | pragma solidity ^0.4.23;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract WhitelistInterface {
function checkWhitelist(address _whiteListAddress) public view returns(bool);
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @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) public returns (bool) {
}
/**
* @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.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @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
*/
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 transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint _subtractedValue
)
public
returns (bool)
{
}
}
/**
* @title DetailedERC20 token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
constructor(string _name, string _symbol, uint8 _decimals) public {
}
}
/**
* @title Math
* @dev Assorted math operations
*/
library Math {
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title TuurntToken
* @dev The TuurntToken contract contains the information about
* Tuurnt token.
*/
contract TuurntToken is StandardToken, DetailedERC20 {
using SafeMath for uint256;
// distribution variables
uint256 public tokenAllocToTeam;
uint256 public tokenAllocToCrowdsale;
uint256 public tokenAllocToCompany;
// addresses
address public crowdsaleAddress;
address public teamAddress;
address public companyAddress;
/**
* @dev The TuurntToken constructor set the orginal crowdsaleAddress,teamAddress and companyAddress and allocate the
* tokens to them.
* @param _crowdsaleAddress The address of crowsale contract
* @param _teamAddress The address of team
* @param _companyAddress The address of company
*/
constructor(address _crowdsaleAddress, address _teamAddress, address _companyAddress, string _name, string _symbol, uint8 _decimals) public
DetailedERC20(_name, _symbol, _decimals)
{
}
}
contract TuurntAirdrop is Ownable {
using SafeMath for uint256;
TuurntToken public token;
WhitelistInterface public whitelist;
mapping(address=>bool) public userAddress;
uint256 public totalDropAmount;
uint256 public dropAmount = 100 * 10 ** 18;
/**
* @dev TuurntAirdrop constructor set the whitelist contract address.
* @param _whitelist Whitelist contract address
*/
constructor(address _whitelist) public{
}
/**
* @dev Set the token contract address.
* @param _tokenAddress token contract address
*/
function setTokenAddress(address _tokenAddress) onlyOwner public {
}
/**
* @dev User can withdraw there airdrop tokens if address exist in the whitelist.
*/
function airdropToken() external{
}
/**
* @dev Founder can withdraw the remaining tokens of airdrop contract.
* @param _addr Address where the remaining tokens will go.
*/
function withdrawToken(address _addr) onlyOwner external{
require(_addr != address(0));
uint256 amount = token.balanceOf(this);
require(<FILL_ME>)
}
}
| token.transfer(_addr,amount) | 304,420 | token.transfer(_addr,amount) |
null | pragma solidity 0.4.26;
/**
* @dev BancorX Helper
*
*/
contract BancorXHelper is ContractRegistryClient {
constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {
}
/**
* @dev converts any other token to BNT in the bancor network
* by following a predefined conversion path and transfers the resulting
* tokens to BancorX.
* note that the contract should already have been given allowance for the source token (if not ETH)
*
* @param _path conversion path, see conversion path format above
* @param _amount amount to convert from (in the initial source token)
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _toBlockchain blockchain BNT will be issued on
* @param _to address/account on _toBlockchain to send the BNT to
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
* @param _affiliateAccount affiliate account
* @param _affiliateFee affiliate fee in PPM
*
* @return the amount of BNT received from this conversion
*/
function xConvert(
IERC20Token[] _path,
uint256 _amount,
uint256 _minReturn,
bytes32 _toBlockchain,
bytes32 _to,
uint256 _conversionId,
address _affiliateAccount,
uint256 _affiliateFee
)
public
payable
returns (uint256)
{
IBancorX bancorX = IBancorX(addressOf(BANCOR_X));
IBancorNetwork bancorNetwork = IBancorNetwork(addressOf(BANCOR_NETWORK));
IERC20Token targetToken = _path[_path.length - 1];
// verify that the destination token is BNT
require(targetToken == addressOf(BNT_TOKEN));
// we need to transfer the source tokens from the caller to the BancorNetwork contract,
// so it can execute the conversion on behalf of the caller
// not ETH, transfer the tokens directly to the BancorNetwork contract
if (msg.value == 0)
require(<FILL_ME>)
// execute the conversion and pass on the ETH with the call
uint256 result = bancorNetwork.convertFor2.value(msg.value)(_path, _amount, _minReturn, this, _affiliateAccount, _affiliateFee);
// grant BancorX allowance
ensureAllowance(targetToken, bancorX, result);
// transfer the resulting amount to BancorX
IBancorX(bancorX).xTransfer(_toBlockchain, _to, result, _conversionId);
return result;
}
/**
* @dev allows a user to convert BNT that was sent from another blockchain into any other
* token on the Bancor Network without specifying the amount of BNT to be converted, but
* rather by providing the xTransferId which allows us to get the amount from BancorX.
*
* @param _path conversion path, see conversion path format in the BancorNetwork contract
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
*
* @return tokens issued in return
*/
function completeXConversion(IERC20Token[] _path, uint256 _minReturn, uint256 _conversionId) public returns (uint256) {
}
/**
* @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.
* Note that we use the non standard erc-20 interface in which `approve` has no return value so that
* this function will work for both standard and non standard tokens
*
* @param _token token to check the allowance in
* @param _spender approved address
* @param _value allowance amount
*/
function ensureAllowance(IERC20Token _token, address _spender, uint256 _value) private {
}
}
| _path[0].transferFrom(msg.sender,bancorNetwork,_amount) | 304,441 | _path[0].transferFrom(msg.sender,bancorNetwork,_amount) |
null | pragma solidity 0.4.26;
/**
* @dev BancorX Helper
*
*/
contract BancorXHelper is ContractRegistryClient {
constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {
}
/**
* @dev converts any other token to BNT in the bancor network
* by following a predefined conversion path and transfers the resulting
* tokens to BancorX.
* note that the contract should already have been given allowance for the source token (if not ETH)
*
* @param _path conversion path, see conversion path format above
* @param _amount amount to convert from (in the initial source token)
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _toBlockchain blockchain BNT will be issued on
* @param _to address/account on _toBlockchain to send the BNT to
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
* @param _affiliateAccount affiliate account
* @param _affiliateFee affiliate fee in PPM
*
* @return the amount of BNT received from this conversion
*/
function xConvert(
IERC20Token[] _path,
uint256 _amount,
uint256 _minReturn,
bytes32 _toBlockchain,
bytes32 _to,
uint256 _conversionId,
address _affiliateAccount,
uint256 _affiliateFee
)
public
payable
returns (uint256)
{
}
/**
* @dev allows a user to convert BNT that was sent from another blockchain into any other
* token on the Bancor Network without specifying the amount of BNT to be converted, but
* rather by providing the xTransferId which allows us to get the amount from BancorX.
*
* @param _path conversion path, see conversion path format in the BancorNetwork contract
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
*
* @return tokens issued in return
*/
function completeXConversion(IERC20Token[] _path, uint256 _minReturn, uint256 _conversionId) public returns (uint256) {
IBancorX bancorX = IBancorX(addressOf(BANCOR_X));
IBancorNetwork bancorNetwork = IBancorNetwork(addressOf(BANCOR_NETWORK));
// verify that the source token is BNT
require(<FILL_ME>)
// get conversion amount from BancorX contract
uint256 amount = bancorX.getXTransferAmount(_conversionId, msg.sender);
// transfer the tokens directly to the BancorNetwork contract
require(_path[0].transferFrom(msg.sender, bancorNetwork, amount));
// execute the conversion and transfer the result back to the sender
return bancorNetwork.convertFor2(_path, amount, _minReturn, msg.sender, address(0), 0);
}
/**
* @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.
* Note that we use the non standard erc-20 interface in which `approve` has no return value so that
* this function will work for both standard and non standard tokens
*
* @param _token token to check the allowance in
* @param _spender approved address
* @param _value allowance amount
*/
function ensureAllowance(IERC20Token _token, address _spender, uint256 _value) private {
}
}
| _path[0]==addressOf(BNT_TOKEN) | 304,441 | _path[0]==addressOf(BNT_TOKEN) |
null | pragma solidity 0.4.26;
/**
* @dev BancorX Helper
*
*/
contract BancorXHelper is ContractRegistryClient {
constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {
}
/**
* @dev converts any other token to BNT in the bancor network
* by following a predefined conversion path and transfers the resulting
* tokens to BancorX.
* note that the contract should already have been given allowance for the source token (if not ETH)
*
* @param _path conversion path, see conversion path format above
* @param _amount amount to convert from (in the initial source token)
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _toBlockchain blockchain BNT will be issued on
* @param _to address/account on _toBlockchain to send the BNT to
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
* @param _affiliateAccount affiliate account
* @param _affiliateFee affiliate fee in PPM
*
* @return the amount of BNT received from this conversion
*/
function xConvert(
IERC20Token[] _path,
uint256 _amount,
uint256 _minReturn,
bytes32 _toBlockchain,
bytes32 _to,
uint256 _conversionId,
address _affiliateAccount,
uint256 _affiliateFee
)
public
payable
returns (uint256)
{
}
/**
* @dev allows a user to convert BNT that was sent from another blockchain into any other
* token on the Bancor Network without specifying the amount of BNT to be converted, but
* rather by providing the xTransferId which allows us to get the amount from BancorX.
*
* @param _path conversion path, see conversion path format in the BancorNetwork contract
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
*
* @return tokens issued in return
*/
function completeXConversion(IERC20Token[] _path, uint256 _minReturn, uint256 _conversionId) public returns (uint256) {
IBancorX bancorX = IBancorX(addressOf(BANCOR_X));
IBancorNetwork bancorNetwork = IBancorNetwork(addressOf(BANCOR_NETWORK));
// verify that the source token is BNT
require(_path[0] == addressOf(BNT_TOKEN));
// get conversion amount from BancorX contract
uint256 amount = bancorX.getXTransferAmount(_conversionId, msg.sender);
// transfer the tokens directly to the BancorNetwork contract
require(<FILL_ME>)
// execute the conversion and transfer the result back to the sender
return bancorNetwork.convertFor2(_path, amount, _minReturn, msg.sender, address(0), 0);
}
/**
* @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.
* Note that we use the non standard erc-20 interface in which `approve` has no return value so that
* this function will work for both standard and non standard tokens
*
* @param _token token to check the allowance in
* @param _spender approved address
* @param _value allowance amount
*/
function ensureAllowance(IERC20Token _token, address _spender, uint256 _value) private {
}
}
| _path[0].transferFrom(msg.sender,bancorNetwork,amount) | 304,441 | _path[0].transferFrom(msg.sender,bancorNetwork,amount) |
null | pragma solidity 0.4.26;
/**
* @dev BancorX Helper
*
*/
contract BancorXHelper is ContractRegistryClient {
constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {
}
/**
* @dev converts any other token to BNT in the bancor network
* by following a predefined conversion path and transfers the resulting
* tokens to BancorX.
* note that the contract should already have been given allowance for the source token (if not ETH)
*
* @param _path conversion path, see conversion path format above
* @param _amount amount to convert from (in the initial source token)
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _toBlockchain blockchain BNT will be issued on
* @param _to address/account on _toBlockchain to send the BNT to
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
* @param _affiliateAccount affiliate account
* @param _affiliateFee affiliate fee in PPM
*
* @return the amount of BNT received from this conversion
*/
function xConvert(
IERC20Token[] _path,
uint256 _amount,
uint256 _minReturn,
bytes32 _toBlockchain,
bytes32 _to,
uint256 _conversionId,
address _affiliateAccount,
uint256 _affiliateFee
)
public
payable
returns (uint256)
{
}
/**
* @dev allows a user to convert BNT that was sent from another blockchain into any other
* token on the Bancor Network without specifying the amount of BNT to be converted, but
* rather by providing the xTransferId which allows us to get the amount from BancorX.
*
* @param _path conversion path, see conversion path format in the BancorNetwork contract
* @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero
* @param _conversionId pre-determined unique (if non zero) id which refers to this transaction
*
* @return tokens issued in return
*/
function completeXConversion(IERC20Token[] _path, uint256 _minReturn, uint256 _conversionId) public returns (uint256) {
}
/**
* @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.
* Note that we use the non standard erc-20 interface in which `approve` has no return value so that
* this function will work for both standard and non standard tokens
*
* @param _token token to check the allowance in
* @param _spender approved address
* @param _value allowance amount
*/
function ensureAllowance(IERC20Token _token, address _spender, uint256 _value) private {
uint256 allowance = _token.allowance(this, _spender);
if (allowance < _value) {
if (allowance > 0)
require(<FILL_ME>)
require(_token.approve(_spender, _value));
}
}
}
| _token.approve(_spender,0) | 304,441 | _token.approve(_spender,0) |
"Minting would exceed max reserved NFTs" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
require(whitelisted[msg.sender], "You are not whitelisted");
require(<FILL_ME>)
require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply");
require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET_PRESALE, "Purchase exceeds max allowed per wallet");
require(RESERVE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect");
for (uint256 i = 0; i < amountOfNFTs; i++) {
uint256 tokenId = totalSupply();
reservedClaimed += 1;
_safeMint(msg.sender, tokenId);
}
emit ReserveSaleMint(msg.sender, amountOfNFTs);
}
function mintNFT(uint256 amountOfNFTs) external payable {
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| reservedClaimed+amountOfNFTs<=RESERVED_NFT,"Minting would exceed max reserved NFTs" | 304,448 | reservedClaimed+amountOfNFTs<=RESERVED_NFT |
"Minting would exceed max supply" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
require(whitelisted[msg.sender], "You are not whitelisted");
require(reservedClaimed + amountOfNFTs <= RESERVED_NFT, "Minting would exceed max reserved NFTs");
require(<FILL_ME>)
require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET_PRESALE, "Purchase exceeds max allowed per wallet");
require(RESERVE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect");
for (uint256 i = 0; i < amountOfNFTs; i++) {
uint256 tokenId = totalSupply();
reservedClaimed += 1;
_safeMint(msg.sender, tokenId);
}
emit ReserveSaleMint(msg.sender, amountOfNFTs);
}
function mintNFT(uint256 amountOfNFTs) external payable {
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| totalSupply()+amountOfNFTs<=MAX_NFT_SUPPLY,"Minting would exceed max supply" | 304,448 | totalSupply()+amountOfNFTs<=MAX_NFT_SUPPLY |
"Purchase exceeds max allowed per wallet" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
require(whitelisted[msg.sender], "You are not whitelisted");
require(reservedClaimed + amountOfNFTs <= RESERVED_NFT, "Minting would exceed max reserved NFTs");
require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply");
require(<FILL_ME>)
require(RESERVE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect");
for (uint256 i = 0; i < amountOfNFTs; i++) {
uint256 tokenId = totalSupply();
reservedClaimed += 1;
_safeMint(msg.sender, tokenId);
}
emit ReserveSaleMint(msg.sender, amountOfNFTs);
}
function mintNFT(uint256 amountOfNFTs) external payable {
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| balanceOf(msg.sender)+amountOfNFTs<=MAX_NFT_WALLET_PRESALE,"Purchase exceeds max allowed per wallet" | 304,448 | balanceOf(msg.sender)+amountOfNFTs<=MAX_NFT_WALLET_PRESALE |
"ETH amount is incorrect" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
require(whitelisted[msg.sender], "You are not whitelisted");
require(reservedClaimed + amountOfNFTs <= RESERVED_NFT, "Minting would exceed max reserved NFTs");
require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply");
require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET_PRESALE, "Purchase exceeds max allowed per wallet");
require(<FILL_ME>)
for (uint256 i = 0; i < amountOfNFTs; i++) {
uint256 tokenId = totalSupply();
reservedClaimed += 1;
_safeMint(msg.sender, tokenId);
}
emit ReserveSaleMint(msg.sender, amountOfNFTs);
}
function mintNFT(uint256 amountOfNFTs) external payable {
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| RESERVE_PRICE*amountOfNFTs==msg.value,"ETH amount is incorrect" | 304,448 | RESERVE_PRICE*amountOfNFTs==msg.value |
"Final sale has not started" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
}
function mintNFT(uint256 amountOfNFTs) external payable {
require(<FILL_ME>)
require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply");
require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET, "Purchase exceeds max allowed per wallet");
require(NFT_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect");
for (uint256 i = 0; i < amountOfNFTs; i++) {
uint256 tokenId = totalSupply();
_safeMint(msg.sender, tokenId);
}
emit FinalSaleMint(msg.sender, amountOfNFTs);
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| hasFinalSaleStarted(),"Final sale has not started" | 304,448 | hasFinalSaleStarted() |
"Purchase exceeds max allowed per wallet" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
}
function mintNFT(uint256 amountOfNFTs) external payable {
require(hasFinalSaleStarted(), "Final sale has not started");
require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply");
require(<FILL_ME>)
require(NFT_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect");
for (uint256 i = 0; i < amountOfNFTs; i++) {
uint256 tokenId = totalSupply();
_safeMint(msg.sender, tokenId);
}
emit FinalSaleMint(msg.sender, amountOfNFTs);
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| balanceOf(msg.sender)+amountOfNFTs<=MAX_NFT_WALLET,"Purchase exceeds max allowed per wallet" | 304,448 | balanceOf(msg.sender)+amountOfNFTs<=MAX_NFT_WALLET |
"ETH amount is incorrect" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
}
function mintNFT(uint256 amountOfNFTs) external payable {
require(hasFinalSaleStarted(), "Final sale has not started");
require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply");
require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET, "Purchase exceeds max allowed per wallet");
require(<FILL_ME>)
for (uint256 i = 0; i < amountOfNFTs; i++) {
uint256 tokenId = totalSupply();
_safeMint(msg.sender, tokenId);
}
emit FinalSaleMint(msg.sender, amountOfNFTs);
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| NFT_PRICE*amountOfNFTs==msg.value,"ETH amount is incorrect" | 304,448 | NFT_PRICE*amountOfNFTs==msg.value |
"Not a valid new name" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
}
function mintNFT(uint256 amountOfNFTs) external payable {
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
address owner = ownerOf(tokenId);
require(_msgSender() == owner, "ERC721: caller is not the owner");
require(<FILL_ME>)
require(sha256(bytes(newName)) != sha256(bytes(_tokenName[tokenId])), "New name is same as the current one");
require(isNameReserved(newName) == false, "Name already reserved");
IERC20(_tokenAddress).transferFrom(msg.sender, address(this), NAME_CHANGE_PRICE);
// If already named, dereserve old name
if (bytes(_tokenName[tokenId]).length > 0) {
toggleReserveName(_tokenName[tokenId], false);
}
toggleReserveName(newName, true);
_tokenName[tokenId] = newName;
IERC20(_tokenAddress).burn(NAME_CHANGE_PRICE);
emit NameChange(tokenId, newName);
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| validateName(newName)==true,"Not a valid new name" | 304,448 | validateName(newName)==true |
"New name is same as the current one" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
}
function mintNFT(uint256 amountOfNFTs) external payable {
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
address owner = ownerOf(tokenId);
require(_msgSender() == owner, "ERC721: caller is not the owner");
require(validateName(newName) == true, "Not a valid new name");
require(<FILL_ME>)
require(isNameReserved(newName) == false, "Name already reserved");
IERC20(_tokenAddress).transferFrom(msg.sender, address(this), NAME_CHANGE_PRICE);
// If already named, dereserve old name
if (bytes(_tokenName[tokenId]).length > 0) {
toggleReserveName(_tokenName[tokenId], false);
}
toggleReserveName(newName, true);
_tokenName[tokenId] = newName;
IERC20(_tokenAddress).burn(NAME_CHANGE_PRICE);
emit NameChange(tokenId, newName);
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| sha256(bytes(newName))!=sha256(bytes(_tokenName[tokenId])),"New name is same as the current one" | 304,448 | sha256(bytes(newName))!=sha256(bytes(_tokenName[tokenId])) |
"Name already reserved" | pragma solidity ^0.8.0;
/**
* @title MetaKnights contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract MetaKnights is ERC721Enumerable, Ownable {
uint256 public MAX_NFT_SUPPLY = 9999;
uint256 public RESERVED_NFT = 1500;
uint256 public RESERVE_PRICE = 0.045 ether;
uint256 public NFT_PRICE = 0.06 ether;
uint256 public MAX_NFT_WALLET_PRESALE = 3;
uint256 public MAX_NFT_WALLET = 10;
uint256 public reservedClaimed;
uint256 public publicSaleStartTimestamp;
uint256 public constant NAME_CHANGE_PRICE = 150 * (10 ** 18);
string public baseTokenURI;
// Name change token address
address private _tokenAddress;
mapping(address => bool) private whitelisted;
mapping (uint256 => string) private _tokenName;
mapping (string => bool) private _nameReserved;
event NameChange (uint256 indexed NFTIndex, string newName);
event BaseURIChanged(string baseURI);
event ReserveSaleMint(address minter, uint256 amountOfNFTs);
event FinalSaleMint(address minter, uint256 amountOfNFTs);
constructor(uint256 _publicSaleStartTimestamp, address tokenAddress) ERC721("MetaKnights", "Meta Token") {
}
/**
* @dev Returns name of the NFT at index.
*/
function tokenNameByIndex(uint256 index) public view returns (string memory) {
}
/**
* @dev Returns if the name has been reserved.
*/
function isNameReserved(string memory nameString) public view returns (bool) {
}
function addToWhitelist(address[] calldata addresses) external onlyOwner {
}
function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
}
function checkIfWhitelisted(address addr) external view returns (bool) {
}
function reserveMINT(uint256 amountOfNFTs) external payable {
}
function mintNFT(uint256 amountOfNFTs) external payable {
}
/**
* @dev Changes the name for MetaKnights tokenId
*/
function changeName(uint256 tokenId, string memory newName) external {
address owner = ownerOf(tokenId);
require(_msgSender() == owner, "ERC721: caller is not the owner");
require(validateName(newName) == true, "Not a valid new name");
require(sha256(bytes(newName)) != sha256(bytes(_tokenName[tokenId])), "New name is same as the current one");
require(<FILL_ME>)
IERC20(_tokenAddress).transferFrom(msg.sender, address(this), NAME_CHANGE_PRICE);
// If already named, dereserve old name
if (bytes(_tokenName[tokenId]).length > 0) {
toggleReserveName(_tokenName[tokenId], false);
}
toggleReserveName(newName, true);
_tokenName[tokenId] = newName;
IERC20(_tokenAddress).burn(NAME_CHANGE_PRICE);
emit NameChange(tokenId, newName);
}
function hasFinalSaleStarted() public view returns(bool){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMAX_NFTS_WALLET_PRESALE(uint256 _amount) external onlyOwner {
}
function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner {
}
function setNFT_PRICE(uint256 _amount) external onlyOwner {
}
function setRESERVE_PRICE(uint256 _amount) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdrawAll() public onlyOwner {
}
/**
* @dev Reserves the name if isReserve is set to true, de-reserves if set to false
*/
function toggleReserveName(string memory str, bool isReserve) internal {
}
/**
* @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space)
*/
function validateName(string memory str) public pure returns (bool){
}
/**
* @dev Converts the string to lowercase
*/
function toLower(string memory str) public pure returns (string memory){
}
}
| isNameReserved(newName)==false,"Name already reserved" | 304,448 | isNameReserved(newName)==false |
null | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./ERC721.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
contract CryptoGamblers is ERC721, Ownable
{
using Strings for string;
using SafeMath for uint;
// Max tokens supply
uint public constant maxSupply = 777;
//_tokenPropertiesString[tokenID-1] = propertiesString
string[maxSupply] private tokenPropertiesString;
// The IPFS hash of token's metadata
string public metadataHash = "";
// Variables used for RNG
uint private nextBlockNumber = 0;
bytes32 private secretHash = 0;
uint private _rngSeed = 0;
uint private seedExpiry = 0;
bool private rngSemaphore = false;
// Events
event SeedInit(address _from, uint _totalSupply, uint _seedExpiry, uint __rngSeed);
event SeedReset(address _from, uint _totalSupply, uint _seedExpiry);
event LotteryFromTo(address indexed _from, address _winner, uint _value, uint _firstTokenId, uint _lastTokenId, string _userInput, uint indexed _luckyNumber);
event LotteryProperties(address indexed _from, address _winner, uint _value, string _propertiesString, string _userInput, uint indexed _luckyNumber);
constructor() ERC721("CryptoGamblers", "GMBLR")
{
}
function mint(string memory properties) public onlyOwner
{
require(totalSupply() < maxSupply, "Exceeds max supply");
require(seedExpiry > totalSupply(), "_rngSeed expired");
require(rngSemaphore == false, "secret is not revealed");
uint newTokenId = totalSupply().add(1);
if(newTokenId != maxSupply)
{
properties = generateRandomProperties();
}
else
{
// the special one
require(<FILL_ME>)
}
_mint(owner(), newTokenId);
tokenPropertiesString[newTokenId-1] = properties;
}
function setMetadataHash(string memory hash) public onlyOwner
{
}
// public getters
function propertiesOf(uint tokenId) public view returns (string memory)
{
}
function getGamblersByProperties(string memory properties) public view returns(uint[] memory, uint)
{
}
// RNG functions ownerOnly
// probability sheet : https://ipfs.io/ipfs/QmPTm2MvYTHjoSQZSJY5SErGaEL3soje7QpcaqFntwkGno
function generateRandomProperties() internal returns(string memory)
{
}
function sendSecretHash(bytes32 _secretHash, uint count) public onlyOwner
{
}
function initRng(string memory secret) public onlyOwner
{
}
function resetRng() public onlyOwner
{
}
function randomSeed() internal returns (uint)
{
}
// RNG functions public
function randomUint(uint seed, uint modulo) internal pure returns (uint)
{
}
// Lottery functions, Off chain randomness : seed = Hash(userSeed + blockhash(currBlockNumber-7))
function tipRandomGambler(uint firstTokenId, uint lastTokenId, string memory userSeed) public payable
{
}
function tipRandomGambler(string memory userSeed) public payable
{
}
function tipRandomGambler(string memory properties, string memory userSeed) public payable
{
}
// Binary search
function upperBound(uint[] memory arr, uint value) internal pure returns(uint)
{
}
}
| properties.strMatch("??????????????") | 304,468 | properties.strMatch("??????????????") |
null | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./ERC721.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
contract CryptoGamblers is ERC721, Ownable
{
using Strings for string;
using SafeMath for uint;
// Max tokens supply
uint public constant maxSupply = 777;
//_tokenPropertiesString[tokenID-1] = propertiesString
string[maxSupply] private tokenPropertiesString;
// The IPFS hash of token's metadata
string public metadataHash = "";
// Variables used for RNG
uint private nextBlockNumber = 0;
bytes32 private secretHash = 0;
uint private _rngSeed = 0;
uint private seedExpiry = 0;
bool private rngSemaphore = false;
// Events
event SeedInit(address _from, uint _totalSupply, uint _seedExpiry, uint __rngSeed);
event SeedReset(address _from, uint _totalSupply, uint _seedExpiry);
event LotteryFromTo(address indexed _from, address _winner, uint _value, uint _firstTokenId, uint _lastTokenId, string _userInput, uint indexed _luckyNumber);
event LotteryProperties(address indexed _from, address _winner, uint _value, string _propertiesString, string _userInput, uint indexed _luckyNumber);
constructor() ERC721("CryptoGamblers", "GMBLR")
{
}
function mint(string memory properties) public onlyOwner
{
}
function setMetadataHash(string memory hash) public onlyOwner
{
// modifications are not allowed
require(<FILL_ME>)
metadataHash = hash;
}
// public getters
function propertiesOf(uint tokenId) public view returns (string memory)
{
}
function getGamblersByProperties(string memory properties) public view returns(uint[] memory, uint)
{
}
// RNG functions ownerOnly
// probability sheet : https://ipfs.io/ipfs/QmPTm2MvYTHjoSQZSJY5SErGaEL3soje7QpcaqFntwkGno
function generateRandomProperties() internal returns(string memory)
{
}
function sendSecretHash(bytes32 _secretHash, uint count) public onlyOwner
{
}
function initRng(string memory secret) public onlyOwner
{
}
function resetRng() public onlyOwner
{
}
function randomSeed() internal returns (uint)
{
}
// RNG functions public
function randomUint(uint seed, uint modulo) internal pure returns (uint)
{
}
// Lottery functions, Off chain randomness : seed = Hash(userSeed + blockhash(currBlockNumber-7))
function tipRandomGambler(uint firstTokenId, uint lastTokenId, string memory userSeed) public payable
{
}
function tipRandomGambler(string memory userSeed) public payable
{
}
function tipRandomGambler(string memory properties, string memory userSeed) public payable
{
}
// Binary search
function upperBound(uint[] memory arr, uint value) internal pure returns(uint)
{
}
}
| bytes(metadataHash).length==0&&totalSupply()==maxSupply | 304,468 | bytes(metadataHash).length==0&&totalSupply()==maxSupply |
"wrong secret" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./ERC721.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
contract CryptoGamblers is ERC721, Ownable
{
using Strings for string;
using SafeMath for uint;
// Max tokens supply
uint public constant maxSupply = 777;
//_tokenPropertiesString[tokenID-1] = propertiesString
string[maxSupply] private tokenPropertiesString;
// The IPFS hash of token's metadata
string public metadataHash = "";
// Variables used for RNG
uint private nextBlockNumber = 0;
bytes32 private secretHash = 0;
uint private _rngSeed = 0;
uint private seedExpiry = 0;
bool private rngSemaphore = false;
// Events
event SeedInit(address _from, uint _totalSupply, uint _seedExpiry, uint __rngSeed);
event SeedReset(address _from, uint _totalSupply, uint _seedExpiry);
event LotteryFromTo(address indexed _from, address _winner, uint _value, uint _firstTokenId, uint _lastTokenId, string _userInput, uint indexed _luckyNumber);
event LotteryProperties(address indexed _from, address _winner, uint _value, string _propertiesString, string _userInput, uint indexed _luckyNumber);
constructor() ERC721("CryptoGamblers", "GMBLR")
{
}
function mint(string memory properties) public onlyOwner
{
}
function setMetadataHash(string memory hash) public onlyOwner
{
}
// public getters
function propertiesOf(uint tokenId) public view returns (string memory)
{
}
function getGamblersByProperties(string memory properties) public view returns(uint[] memory, uint)
{
}
// RNG functions ownerOnly
// probability sheet : https://ipfs.io/ipfs/QmPTm2MvYTHjoSQZSJY5SErGaEL3soje7QpcaqFntwkGno
function generateRandomProperties() internal returns(string memory)
{
}
function sendSecretHash(bytes32 _secretHash, uint count) public onlyOwner
{
}
function initRng(string memory secret) public onlyOwner
{
require(rngSemaphore == true && block.number >= nextBlockNumber);
require(<FILL_ME>)
_rngSeed = uint(keccak256(abi.encodePacked(secret, blockhash(nextBlockNumber))));
rngSemaphore = false;
emit SeedInit(msg.sender, totalSupply(), seedExpiry, _rngSeed);
}
function resetRng() public onlyOwner
{
}
function randomSeed() internal returns (uint)
{
}
// RNG functions public
function randomUint(uint seed, uint modulo) internal pure returns (uint)
{
}
// Lottery functions, Off chain randomness : seed = Hash(userSeed + blockhash(currBlockNumber-7))
function tipRandomGambler(uint firstTokenId, uint lastTokenId, string memory userSeed) public payable
{
}
function tipRandomGambler(string memory userSeed) public payable
{
}
function tipRandomGambler(string memory properties, string memory userSeed) public payable
{
}
// Binary search
function upperBound(uint[] memory arr, uint value) internal pure returns(uint)
{
}
}
| keccak256(abi.encodePacked(secret))==secretHash,"wrong secret" | 304,468 | keccak256(abi.encodePacked(secret))==secretHash |
"Nest:Vote:BAN(contract)" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import "./lib/SafeMath.sol";
import "./lib/AddressPayable.sol";
import "./iface/INestMining.sol";
import "./iface/INestPool.sol";
import "./lib/SafeERC20.sol";
import "./lib/ReentrancyGuard.sol";
import './lib/TransferHelper.sol';
// import "hardhat/console.sol";
/// @title NestVote
/// @author Inf Loop - <[email protected]>
/// @author Paradox - <[email protected]>
contract NestVote is ReentrancyGuard {
using SafeMath for uint256;
/* ========== STATE ============== */
uint32 public voteDuration = 7 days;
uint32 public acceptance = 51;
uint256 public proposalStaking = 100_000 * 1e18;
struct Proposal {
string description;
uint32 state; // 0: proposed | 1: accepted | 2: rejected
uint32 startTime;
uint32 endTime;
uint64 voters;
uint128 stakedNestAmount;
address contractAddr;
address proposer;
address executor;
}
Proposal[] public proposalList;
mapping(uint256 => mapping(address => uint256)) public stakedNestAmount;
address private C_NestToken;
address private C_NestPool;
address private C_NestDAO;
address private C_NestMining;
address public governance;
uint8 public flag;
uint8 constant NESTVOTE_FLAG_UNINITIALIZED = 0;
uint8 constant NESTVOTE_FLAG_INITIALIZED = 1;
/* ========== EVENTS ========== */
event NIPSubmitted(address proposer, uint256 id);
event NIPVoted(address voter, uint256 id, uint256 amount);
event NIPWithdraw(address voter, uint256 id, uint256 blnc);
event NIPRevoke(address voter, uint256 id, uint256 amount);
event NIPExecute(address executor, uint256 id);
/* ========== CONSTRUCTOR ========== */
receive() external payable {}
// NOTE: to support open-zeppelin/upgrades, leave it blank
constructor() public
{ }
// NOTE: can only be executed once
function initialize(address NestPool) external
{
}
/* ========== MODIFIERS ========== */
modifier onlyGovernance()
{
}
modifier noContract()
{
require(<FILL_ME>)
_;
}
/* ========== GOVERNANCE ========== */
function loadGovernance() external
{
}
function setGovernance(address _gov) external onlyGovernance
{
}
function loadContracts() public onlyGovernance
{
}
function releaseGovTo(address gov) public onlyGovernance
{
}
function setParams(uint32 voteDuration_, uint32 acceptance_, uint256 proposalStaking_)
public onlyGovernance
{
}
/* ========== VOTE ========== */
function propose(address contract_, string memory description) external
{
}
function vote(uint256 id, uint256 amount) external noContract
{
}
function withdraw(uint256 id) external noContract
{
}
function revoke(uint256 id, uint256 amount) external noContract
{
}
function execute(uint256 id) external
{
}
function stakedNestNum(uint256 id) public view returns (uint256)
{
}
function numberOfVoters(uint256 id) public view returns (uint256)
{
}
}
| address(msg.sender)==address(tx.origin),"Nest:Vote:BAN(contract)" | 304,544 | address(msg.sender)==address(tx.origin) |
"Nest:Vote:!time" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import "./lib/SafeMath.sol";
import "./lib/AddressPayable.sol";
import "./iface/INestMining.sol";
import "./iface/INestPool.sol";
import "./lib/SafeERC20.sol";
import "./lib/ReentrancyGuard.sol";
import './lib/TransferHelper.sol';
// import "hardhat/console.sol";
/// @title NestVote
/// @author Inf Loop - <[email protected]>
/// @author Paradox - <[email protected]>
contract NestVote is ReentrancyGuard {
using SafeMath for uint256;
/* ========== STATE ============== */
uint32 public voteDuration = 7 days;
uint32 public acceptance = 51;
uint256 public proposalStaking = 100_000 * 1e18;
struct Proposal {
string description;
uint32 state; // 0: proposed | 1: accepted | 2: rejected
uint32 startTime;
uint32 endTime;
uint64 voters;
uint128 stakedNestAmount;
address contractAddr;
address proposer;
address executor;
}
Proposal[] public proposalList;
mapping(uint256 => mapping(address => uint256)) public stakedNestAmount;
address private C_NestToken;
address private C_NestPool;
address private C_NestDAO;
address private C_NestMining;
address public governance;
uint8 public flag;
uint8 constant NESTVOTE_FLAG_UNINITIALIZED = 0;
uint8 constant NESTVOTE_FLAG_INITIALIZED = 1;
/* ========== EVENTS ========== */
event NIPSubmitted(address proposer, uint256 id);
event NIPVoted(address voter, uint256 id, uint256 amount);
event NIPWithdraw(address voter, uint256 id, uint256 blnc);
event NIPRevoke(address voter, uint256 id, uint256 amount);
event NIPExecute(address executor, uint256 id);
/* ========== CONSTRUCTOR ========== */
receive() external payable {}
// NOTE: to support open-zeppelin/upgrades, leave it blank
constructor() public
{ }
// NOTE: can only be executed once
function initialize(address NestPool) external
{
}
/* ========== MODIFIERS ========== */
modifier onlyGovernance()
{
}
modifier noContract()
{
}
/* ========== GOVERNANCE ========== */
function loadGovernance() external
{
}
function setGovernance(address _gov) external onlyGovernance
{
}
function loadContracts() public onlyGovernance
{
}
function releaseGovTo(address gov) public onlyGovernance
{
}
function setParams(uint32 voteDuration_, uint32 acceptance_, uint256 proposalStaking_)
public onlyGovernance
{
}
/* ========== VOTE ========== */
function propose(address contract_, string memory description) external
{
}
function vote(uint256 id, uint256 amount) external noContract
{
}
function withdraw(uint256 id) external noContract
{
}
function revoke(uint256 id, uint256 amount) external noContract
{
Proposal memory p = proposalList[id];
require(<FILL_ME>)
uint256 blnc = stakedNestAmount[id][address(msg.sender)];
require(blnc >= amount, "Nest:Vote:!amount");
if (blnc == amount) {
p.voters = uint64(uint256(p.voters).sub(1));
}
p.stakedNestAmount = uint128(uint256(p.stakedNestAmount).sub(amount));
stakedNestAmount[id][address(msg.sender)] = blnc.sub(amount);
proposalList[id] = p;
ERC20(C_NestToken).transfer(address(msg.sender), amount);
emit NIPRevoke(msg.sender, id, amount);
}
function execute(uint256 id) external
{
}
function stakedNestNum(uint256 id) public view returns (uint256)
{
}
function numberOfVoters(uint256 id) public view returns (uint256)
{
}
}
| uint256(block.timestamp)<=uint256(p.endTime),"Nest:Vote:!time" | 304,544 | uint256(block.timestamp)<=uint256(p.endTime) |
"Token must be stakable by you!" | // contracts/Shoots.sol
// SPDX-License-Identifier: MIT
// ~Forked from Cheeth~
pragma solidity ^0.8.0;
import "./ERC20Burnable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./IERC721Enumerable.sol";
contract Shoots is ERC20Burnable, Ownable {
using SafeMath for uint256;
uint256 public MAX_WALLET_STAKED = 10;
uint256 public EMISSIONS_RATE = 1157407000000000;
uint256 public CLAIM_END_TIME = 1641013200;
address nullAddress = 0x0000000000000000000000000000000000000000;
address public pandaAddress;
//Mapping of panda to timestamp
mapping(uint256 => uint256) internal tokenIdToTimeStamp;
//Mapping of panda to staker
mapping(uint256 => address) internal tokenIdToStaker;
//Mapping of staker to panda
mapping(address => uint256[]) internal stakerToTokenIds;
constructor() ERC20("Bamboo Shoots", "SHOOTS") {}
function setPandaAddress(address _pandaAddress) public onlyOwner {
}
function getTokensStaked(address staker)
public
view
returns (uint256[] memory)
{
}
function remove(address staker, uint256 index) internal {
}
function removeTokenIdFromStaker(address staker, uint256 tokenId) internal {
}
function stakeByIds(uint256[] memory tokenIds) public {
require(
stakerToTokenIds[msg.sender].length + tokenIds.length <=
MAX_WALLET_STAKED,
"Must have less than 10 pandas staked!"
);
for (uint256 i = 0; i < tokenIds.length; i++) {
require(<FILL_ME>)
IERC721(pandaAddress).transferFrom(
msg.sender,
address(this),
tokenIds[i]
);
stakerToTokenIds[msg.sender].push(tokenIds[i]);
tokenIdToTimeStamp[tokenIds[i]] = block.timestamp;
tokenIdToStaker[tokenIds[i]] = msg.sender;
}
}
function unstakeAll() public {
}
function unstakeByIds(uint256[] memory tokenIds) public {
}
function claimByTokenId(uint256 tokenId) public {
}
function claimAll() public {
}
function getAllRewards(address staker) public view returns (uint256) {
}
function getRewardsByTokenId(uint256 tokenId)
public
view
returns (uint256)
{
}
function getStaker(uint256 tokenId) public view returns (address) {
}
}
| IERC721(pandaAddress).ownerOf(tokenIds[i])==msg.sender&&tokenIdToStaker[tokenIds[i]]==nullAddress,"Token must be stakable by you!" | 304,611 | IERC721(pandaAddress).ownerOf(tokenIds[i])==msg.sender&&tokenIdToStaker[tokenIds[i]]==nullAddress |
null | pragma solidity ^0.4.17;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
address public mintMaster;
uint256 totalSTACoin_ = 12*10**8*10**18;
//2*10**8*10**18 Crowdsale
uint256 totalSupply_=2*10**8*10**18;
//1*10**8*10**18 Belong to Founder
uint256 totalFounder=1*10**8*10**18;
//9*10**8*10**18 Belong to Founder
uint256 totalIpfsMint=9*10**8*10**18;
//67500000 Crowdsale distribution
uint256 crowdsaleDist_;
uint256 mintNums_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
function totalSTACoin() public view returns (uint256) {
}
function totalMintNums() public view returns (uint256) {
}
function totalCrowdSale() public view returns (uint256) {
}
function addCrowdSale(uint256 _value) public {
}
/**
* @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) public returns (bool) {
}
function transferSub(address _to, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @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
*/
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 transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @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
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @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.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/**
* @title Pausable token
* @dev StandardToken modified with pausable transfers.
**/
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
/**
* @dev STA token ERC20 contract
* Based on references from OpenZeppelin: https://github.com/OpenZeppelin/zeppelin-solidity
*/
contract STAB is MintableToken, PausableToken {
string public constant version = "1.0";
string public constant name = "STACX Crypto Platform";
string public constant symbol = "STACX";
uint8 public constant decimals = 18;
event MintMasterTransferred(address indexed previousMaster, address indexed newMaster);
modifier onlyMintMasterOrOwner() {
}
constructor() public {
}
function transferMintMaster(address newMaster) onlyOwner public {
}
function mintToAddresses(address[] addresses, uint256 amount) public onlyMintMasterOrOwner canMint {
for (uint i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
}
}
function mintToAddressesAndAmounts(address[] addresses, uint256[] amounts) public onlyMintMasterOrOwner canMint {
}
/**
* @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.
*/
function mint(address _to, uint256 _amount) onlyMintMasterOrOwner canMint public returns (bool) {
}
}
| mint(addresses[i],amount) | 304,645 | mint(addresses[i],amount) |
null | pragma solidity ^0.4.17;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
address public mintMaster;
uint256 totalSTACoin_ = 12*10**8*10**18;
//2*10**8*10**18 Crowdsale
uint256 totalSupply_=2*10**8*10**18;
//1*10**8*10**18 Belong to Founder
uint256 totalFounder=1*10**8*10**18;
//9*10**8*10**18 Belong to Founder
uint256 totalIpfsMint=9*10**8*10**18;
//67500000 Crowdsale distribution
uint256 crowdsaleDist_;
uint256 mintNums_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
function totalSTACoin() public view returns (uint256) {
}
function totalMintNums() public view returns (uint256) {
}
function totalCrowdSale() public view returns (uint256) {
}
function addCrowdSale(uint256 _value) public {
}
/**
* @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) public returns (bool) {
}
function transferSub(address _to, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @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
*/
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 transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @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.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @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
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @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.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/**
* @title Pausable token
* @dev StandardToken modified with pausable transfers.
**/
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
/**
* @dev STA token ERC20 contract
* Based on references from OpenZeppelin: https://github.com/OpenZeppelin/zeppelin-solidity
*/
contract STAB is MintableToken, PausableToken {
string public constant version = "1.0";
string public constant name = "STACX Crypto Platform";
string public constant symbol = "STACX";
uint8 public constant decimals = 18;
event MintMasterTransferred(address indexed previousMaster, address indexed newMaster);
modifier onlyMintMasterOrOwner() {
}
constructor() public {
}
function transferMintMaster(address newMaster) onlyOwner public {
}
function mintToAddresses(address[] addresses, uint256 amount) public onlyMintMasterOrOwner canMint {
}
function mintToAddressesAndAmounts(address[] addresses, uint256[] amounts) public onlyMintMasterOrOwner canMint {
require(addresses.length == amounts.length);
for (uint i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
}
}
/**
* @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.
*/
function mint(address _to, uint256 _amount) onlyMintMasterOrOwner canMint public returns (bool) {
}
}
| mint(addresses[i],amounts[i]) | 304,645 | mint(addresses[i],amounts[i]) |
null | pragma solidity >=0.4.22 <0.6.0;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/// Buy OurERC20 don't miss the oportunity
contract OurERC20 {
using SafeMath for uint256;
string _name;
string _symbol;
mapping (address => uint256) _balances;
uint256 _totalSupply;
uint8 private _decimals;
event Transfer(address indexed from, address indexed to, uint tokens);
constructor() public {
}
function decimals() public view returns(uint8) {
}
function totalSupply() public view returns (uint256) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function mint(uint256 amount) public payable {
}
function burn(uint256 amount) public {
require(<FILL_ME>)
_balances[msg.sender] = _balances[msg.sender].sub(amount);
msg.sender.transfer(amount.mul(0.006 ether));
_totalSupply = _totalSupply - amount;
}
function transfer(address _to, uint256 value) public returns (bool success) {
}
}
| _balances[msg.sender]==amount | 304,659 | _balances[msg.sender]==amount |
"The number of requested tokens would surpass the limit of tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Openzeppelin
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./ReentrancyGuard.sol";
// ___ ___ __
// | _ |_ | |_ _ /__ _ _. _|_
// | (_) |_) \/ | | | (/_ \_| (_) (_| |_
// /
// Toby The Goat (TTG)
// Website: https://tobythegoat.io
// (_(
// /_/'_____/)
// " | |
// |""""""|
contract TobyTheGoat is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
// total tokens
uint256 public constant MAX_TOKENS = 9999;
// maximum tokens for giveaways
uint256 public constant MAX_GIVEAWAY_TOKENS = 200;
uint256 public constant TOKEN_PRICE = 60000000000000000; //0.06ETH
// enables or disables the public sale
bool public isStarted = false;
// keeps track of tokens minted for giveaways
uint256 public countMintedGiveawayTokens = 0;
// keeps track of tokens minted
uint256 public countMintedTokens = 0;
string private _baseTokenURI;
// random nonce/seed
uint256 internal nonce = 0;
// used to randomize the mint
uint256[MAX_TOKENS] internal tokenIdx;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
constructor(string memory baseURI) ERC721("Toby The Goat", "TTG") {
}
// get tokens owned by the provided address
function tokensOfOwner(address _owner) external view returns (uint256[] memory) {
}
// generates a random index for minting
function randomIndex() internal returns (uint256) {
}
// public method for minting tokens
function mint(uint256 numTokens) external payable nonReentrant {
// check if the public sale is active
require(isStarted, "Minting is paused or has not started");
// check if there are tokens available
require(totalSupply() < MAX_TOKENS, "All tokens have been minted");
// check if the number of requested tokens is between the limits
require(numTokens > 0 && numTokens <= 10, "The number of tokens must be between 1 and 10");
// check if the number of requested tokens does not surpass the limit of tokens
require(<FILL_ME>)
// check if enough eth has been provided for the minting
require(msg.value >= TOKEN_PRICE.mul(numTokens), "Not enough ETH for transaction");
// mint the tokens with random indexes
for (uint256 i = 0; i < numTokens; i++) {
countMintedTokens++;
mintWithRandomTokenId(msg.sender);
}
}
// method used for minting tokens for giveaways
function mintGiveaway(uint256 numTokens) public onlyOwner {
}
// mints tokens with random indexes
function mintWithRandomTokenId(address _to) private {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// returns the URI of a token that is minted
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function _setBaseURI(string memory baseURI) internal virtual {
}
function _baseURI() internal view override returns (string memory) {
}
// Administrative zone
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startMint() public onlyOwner {
}
function pauseMint() public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| totalSupply().add(numTokens)<=MAX_TOKENS.sub(MAX_GIVEAWAY_TOKENS.sub(countMintedGiveawayTokens)),"The number of requested tokens would surpass the limit of tokens" | 304,767 | totalSupply().add(numTokens)<=MAX_TOKENS.sub(MAX_GIVEAWAY_TOKENS.sub(countMintedGiveawayTokens)) |
"200 tokens max" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Openzeppelin
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./ReentrancyGuard.sol";
// ___ ___ __
// | _ |_ | |_ _ /__ _ _. _|_
// | (_) |_) \/ | | | (/_ \_| (_) (_| |_
// /
// Toby The Goat (TTG)
// Website: https://tobythegoat.io
// (_(
// /_/'_____/)
// " | |
// |""""""|
contract TobyTheGoat is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint8;
using SafeMath for uint256;
// total tokens
uint256 public constant MAX_TOKENS = 9999;
// maximum tokens for giveaways
uint256 public constant MAX_GIVEAWAY_TOKENS = 200;
uint256 public constant TOKEN_PRICE = 60000000000000000; //0.06ETH
// enables or disables the public sale
bool public isStarted = false;
// keeps track of tokens minted for giveaways
uint256 public countMintedGiveawayTokens = 0;
// keeps track of tokens minted
uint256 public countMintedTokens = 0;
string private _baseTokenURI;
// random nonce/seed
uint256 internal nonce = 0;
// used to randomize the mint
uint256[MAX_TOKENS] internal tokenIdx;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
constructor(string memory baseURI) ERC721("Toby The Goat", "TTG") {
}
// get tokens owned by the provided address
function tokensOfOwner(address _owner) external view returns (uint256[] memory) {
}
// generates a random index for minting
function randomIndex() internal returns (uint256) {
}
// public method for minting tokens
function mint(uint256 numTokens) external payable nonReentrant {
}
// method used for minting tokens for giveaways
function mintGiveaway(uint256 numTokens) public onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < numTokens; i++) {
countMintedGiveawayTokens++;
mintWithRandomTokenId(owner());
}
}
// mints tokens with random indexes
function mintWithRandomTokenId(address _to) private {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// returns the URI of a token that is minted
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function _setBaseURI(string memory baseURI) internal virtual {
}
function _baseURI() internal view override returns (string memory) {
}
// Administrative zone
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startMint() public onlyOwner {
}
function pauseMint() public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| countMintedGiveawayTokens.add(numTokens)<=MAX_GIVEAWAY_TOKENS,"200 tokens max" | 304,767 | countMintedGiveawayTokens.add(numTokens)<=MAX_GIVEAWAY_TOKENS |
"Unauthorized" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract PenPenInu is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _feeAddr1 = 1;
uint256 private _feeAddr2 = 10;
address payable private _feeAddrWallet1 = payable(0x9aBc998b9a819EDa39Eb503Bf9Ca6821284F3154);
address payable private _feeAddrWallet2 = payable(0x9aBc998b9a819EDa39Eb503Bf9Ca6821284F3154);
string private constant _name = "PenPen Inu";
string private constant _symbol = "PENPEN";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private _maxTxAmount = _tTotal;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function setFeeAmountOne(uint256 fee) external {
require(<FILL_ME>)
_feeAddr1 = fee;
}
function setFeeAmountTwo(uint256 fee) external {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _isBuy(address _sender) private view returns (bool) {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function manualswap() external {
}
function manualsend() external {
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| _msgSender()==_feeAddrWallet2,"Unauthorized" | 304,826 | _msgSender()==_feeAddrWallet2 |
"Account is not an judge registrant" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
contract BaseWorldMarketplace is Ownable {
enum OrderStatus {
UNDEFINED,
PAID,
PAYMENT_RELEASED,
BUYER_REFUNDED,
IN_DISPUTE,
RESOLVED_BUYER_REFUNDED,
RESOLVED_PAYMENT_RELEASED
}
struct Order {
uint256 id;
uint256 listingId;
uint256 total;
uint256 indisputableTime;
bytes acceptMessage;
bytes refundMessage;
bytes resolutionMessage;
address seller;
address buyer;
OrderStatus status;
}
mapping(uint256 => mapping(uint256 => Order)) public listingOrders;
mapping(address => bool) public isJudgeRegistrant;
mapping(address => bool) public isJudge;
mapping(address => bool) public isMerchantRegistrant;
mapping(address => bool) public isMerchant;
function setJudgeRegistrant(address _account, bool value) external onlyOwner {
}
function setJudge(address _account, bool value) external {
require(<FILL_ME>)
isJudge[_account] = value;
}
function setMerchantRegistrant(address _account, bool value) external onlyOwner {
}
function setMerchant(address _account, bool value) external {
}
}
| isJudgeRegistrant[msg.sender],"Account is not an judge registrant" | 304,890 | isJudgeRegistrant[msg.sender] |
"Account is not a merchant registrant" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
contract BaseWorldMarketplace is Ownable {
enum OrderStatus {
UNDEFINED,
PAID,
PAYMENT_RELEASED,
BUYER_REFUNDED,
IN_DISPUTE,
RESOLVED_BUYER_REFUNDED,
RESOLVED_PAYMENT_RELEASED
}
struct Order {
uint256 id;
uint256 listingId;
uint256 total;
uint256 indisputableTime;
bytes acceptMessage;
bytes refundMessage;
bytes resolutionMessage;
address seller;
address buyer;
OrderStatus status;
}
mapping(uint256 => mapping(uint256 => Order)) public listingOrders;
mapping(address => bool) public isJudgeRegistrant;
mapping(address => bool) public isJudge;
mapping(address => bool) public isMerchantRegistrant;
mapping(address => bool) public isMerchant;
function setJudgeRegistrant(address _account, bool value) external onlyOwner {
}
function setJudge(address _account, bool value) external {
}
function setMerchantRegistrant(address _account, bool value) external onlyOwner {
}
function setMerchant(address _account, bool value) external {
require(<FILL_ME>)
isMerchant[_account] = value;
}
}
| isMerchantRegistrant[msg.sender],"Account is not a merchant registrant" | 304,890 | isMerchantRegistrant[msg.sender] |
"Airdrop: insufficient balance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @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}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
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() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @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.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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 Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @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.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @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
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` 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.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Airdrop is Ownable {
function send(address token, address[] memory accounts, uint amount) public onlyOwner {
require(accounts.length > 0, "Airdrop: no destination");
require(amount > 0, "Airdrop: no airdrop amount");
IERC20 erc20 = IERC20(token);
uint balance = erc20.balanceOf(address(this));
require(<FILL_ME>)
uint256 i = 0;
while (i < accounts.length) {
erc20.transfer(accounts[i], amount);
i++;
}
}
}
| amount*accounts.length<=balance,"Airdrop: insufficient balance" | 305,019 | amount*accounts.length<=balance |
null | pragma solidity ^0.4.23;
contract Ownable {
address public owner;
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function withdraw() public onlyOwner{
}
}
contract SimpleERC721{
function ownerOf(uint256 _tokenId) external view returns (address owner);
function transferFrom(address _from, address _to, uint256 _tokenId) external;
function transfer(address _to, uint256 _tokenId) external;
}
contract Solitaire is Ownable {
event NewAsset(uint256 index,address nft, uint256 token, address owner, string url,string memo);
struct Asset{
address nft;
uint256 tokenId;
address owner;
string url;
string memo;
}
uint256 public fee = 5 finney;
Asset[] queue;
function init(address _nft,uint256 _id,address _owner,string _url,string _memo) public onlyOwner{
}
function refund(address _nft,uint256 _id,address _owner) public onlyOwner{
require(_owner != address(0));
SimpleERC721 se = SimpleERC721(_nft);
require(<FILL_ME>)
se.transfer(_owner,_id);
}
function setfee(uint256 _fee) public onlyOwner{
}
function totalAssets() public view returns(uint256){
}
function getAsset(uint256 _index) public view returns(address _nft,uint256 _id,address _owner,string _url,string _memo){
}
function addLayer(address _nft,uint256 _id,string _url,string _memo) public payable{
}
}
| se.ownerOf(_id)==address(this) | 305,175 | se.ownerOf(_id)==address(this) |
null | pragma solidity ^0.4.23;
contract Ownable {
address public owner;
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function withdraw() public onlyOwner{
}
}
contract SimpleERC721{
function ownerOf(uint256 _tokenId) external view returns (address owner);
function transferFrom(address _from, address _to, uint256 _tokenId) external;
function transfer(address _to, uint256 _tokenId) external;
}
contract Solitaire is Ownable {
event NewAsset(uint256 index,address nft, uint256 token, address owner, string url,string memo);
struct Asset{
address nft;
uint256 tokenId;
address owner;
string url;
string memo;
}
uint256 public fee = 5 finney;
Asset[] queue;
function init(address _nft,uint256 _id,address _owner,string _url,string _memo) public onlyOwner{
}
function refund(address _nft,uint256 _id,address _owner) public onlyOwner{
}
function setfee(uint256 _fee) public onlyOwner{
}
function totalAssets() public view returns(uint256){
}
function getAsset(uint256 _index) public view returns(address _nft,uint256 _id,address _owner,string _url,string _memo){
}
function addLayer(address _nft,uint256 _id,string _url,string _memo) public payable{
require(msg.value >=fee);
require(_nft != address(0));
SimpleERC721 se = SimpleERC721(_nft);
require(<FILL_ME>)
se.transferFrom(msg.sender,address(this),_id);
// double check
require(se.ownerOf(_id) == address(this));
Asset memory last = queue[queue.length -1];
SimpleERC721 lastse = SimpleERC721(last.nft);
lastse.transfer(msg.sender,last.tokenId);
Asset memory newasset = Asset({
nft: _nft,
tokenId: _id,
owner: msg.sender,
url: _url,
memo: _memo
});
uint256 index = queue.push(newasset) - 1;
emit NewAsset(index,_nft, _id, msg.sender,_url,_memo);
}
}
| se.ownerOf(_id)==msg.sender | 305,175 | se.ownerOf(_id)==msg.sender |
"Only authorized accounts may trigger calls." | pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
interface ReserveTraderV1Interface {
// events
event AddedAccount(address account);
event RemovedAccount(address account);
event CallTradeReserve(bytes data, bool ok, bytes returnData);
event Call(address target, uint256 amount, bytes data, bool ok, bytes returnData);
// callable by accounts
function callTradeReserve(
bytes calldata data
) external returns (bool ok, bytes memory returnData);
// only callable by owner
function addAccount(address account) external;
function removeAccount(address account) external;
function callAny(
address payable target, uint256 amount, bytes calldata data
) external returns (bool ok, bytes memory returnData);
// view functions
function getAccounts() external view returns (address[] memory);
function getTradeReserve() external view returns (address tradeReserve);
}
contract TwoStepOwnable {
address private _owner;
address private _newPotentialOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initialize contract by setting transaction submitter as initial owner.
*/
constructor() internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows a new account (`newOwner`) to accept ownership.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Cancel a transfer of ownership to a new account.
* Can only be called by the current owner.
*/
function cancelOwnershipTransfer() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to the caller.
* Can only be called by a new potential owner set by the current owner.
*/
function acceptOwnership() public {
}
}
contract ReserveTraderV1Staging is ReserveTraderV1Interface, TwoStepOwnable {
// Track all authorized accounts.
address[] private _accounts;
// Indexes start at 1, as 0 signifies non-inclusion
mapping (address => uint256) private _accountIndexes;
address private immutable _TRADE_RESERVE;
constructor(address tradeReserve, address[] memory initialAccounts) public {
}
function addAccount(address account) external override onlyOwner {
}
function removeAccount(address account) external override onlyOwner {
}
function callTradeReserve(
bytes calldata data
) external override returns (bool ok, bytes memory returnData) {
require(<FILL_ME>)
// Call the Trade Serve and supply the specified amount and data.
(ok, returnData) = _TRADE_RESERVE.call(data);
if (!ok) {
assembly {
revert(add(returnData, 32), returndatasize())
}
}
emit CallTradeReserve(data, ok, returnData);
}
function callAny(
address payable target, uint256 amount, bytes calldata data
) external override onlyOwner returns (bool ok, bytes memory returnData) {
}
function getAccounts() external view override returns (address[] memory) {
}
function getTradeReserve() external view override returns (address tradeReserve) {
}
function _addAccount(address account) internal {
}
function _removeAccount(address account) internal {
}
}
| _accountIndexes[msg.sender]!=0,"Only authorized accounts may trigger calls." | 305,231 | _accountIndexes[msg.sender]!=0 |
"Account matching the provided account already exists." | pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
interface ReserveTraderV1Interface {
// events
event AddedAccount(address account);
event RemovedAccount(address account);
event CallTradeReserve(bytes data, bool ok, bytes returnData);
event Call(address target, uint256 amount, bytes data, bool ok, bytes returnData);
// callable by accounts
function callTradeReserve(
bytes calldata data
) external returns (bool ok, bytes memory returnData);
// only callable by owner
function addAccount(address account) external;
function removeAccount(address account) external;
function callAny(
address payable target, uint256 amount, bytes calldata data
) external returns (bool ok, bytes memory returnData);
// view functions
function getAccounts() external view returns (address[] memory);
function getTradeReserve() external view returns (address tradeReserve);
}
contract TwoStepOwnable {
address private _owner;
address private _newPotentialOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initialize contract by setting transaction submitter as initial owner.
*/
constructor() internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows a new account (`newOwner`) to accept ownership.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Cancel a transfer of ownership to a new account.
* Can only be called by the current owner.
*/
function cancelOwnershipTransfer() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to the caller.
* Can only be called by a new potential owner set by the current owner.
*/
function acceptOwnership() public {
}
}
contract ReserveTraderV1Staging is ReserveTraderV1Interface, TwoStepOwnable {
// Track all authorized accounts.
address[] private _accounts;
// Indexes start at 1, as 0 signifies non-inclusion
mapping (address => uint256) private _accountIndexes;
address private immutable _TRADE_RESERVE;
constructor(address tradeReserve, address[] memory initialAccounts) public {
}
function addAccount(address account) external override onlyOwner {
}
function removeAccount(address account) external override onlyOwner {
}
function callTradeReserve(
bytes calldata data
) external override returns (bool ok, bytes memory returnData) {
}
function callAny(
address payable target, uint256 amount, bytes calldata data
) external override onlyOwner returns (bool ok, bytes memory returnData) {
}
function getAccounts() external view override returns (address[] memory) {
}
function getTradeReserve() external view override returns (address tradeReserve) {
}
function _addAccount(address account) internal {
require(<FILL_ME>)
_accounts.push(account);
_accountIndexes[account] = _accounts.length;
emit AddedAccount(account);
}
function _removeAccount(address account) internal {
}
}
| _accountIndexes[account]==0,"Account matching the provided account already exists." | 305,231 | _accountIndexes[account]==0 |
null | pragma solidity ^0.4.18;
/**
* ERC 20 token
* https://github.com/ethereum/EIPs/issues/20
*/
interface Token {
/// @return total amount of tokens
/// function totalSupply() public constant returns (uint256 supply);
/// do not declare totalSupply() here, see https://github.com/OpenZeppelin/zeppelin-solidity/issues/434
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public constant returns (uint256 balance);
/// @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
function transfer(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
function transferFrom(address _from, address _to, 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
function approve(address _spender, uint256 _value) public returns (bool success);
/// @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
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/** @title Publica Pebbles (PBL contract) **/
contract Pebbles is Token {
string public constant name = "Pebbles";
string public constant symbol = "PBL";
uint8 public constant decimals = 18;
uint256 public constant totalSupply = 33787150 * 10**18;
uint public launched = 0; // Time of locking distribution and retiring founder; 0 means not launched
address public founder = 0xa99Ab2FcC5DdFd5c1Cbe6C3D760420D2dDb63d99; // Founder's address
address public team = 0xe32A4bb42AcE38DcaAa7f23aD94c41dE0334A500; // Team's address
address public treasury = 0xc46e5D11754129790B336d62ee90b12479af7cB5; // Treasury address
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
uint256 public balanceTeam = 0; // Actual Team's frozen balance = balanceTeam - withdrawnTeam
uint256 public withdrawnTeam = 0;
uint256 public balanceTreasury = 0; // Treasury's frozen balance
function Pebbles() public {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/**@dev Launch and retire the founder */
function launch() public {
}
/**@dev Give _value PBLs to balances[team] during 5 years (20% per year) after launch
* @param _value Number of PBLs
*/
function reserveTeam(uint256 _value) public {
require(msg.sender == founder);
require(<FILL_ME>)
balances[founder] -= _value;
balanceTeam += _value;
}
/**@dev Give _value PBLs to balances[treasury] after 3 months after launch
* @param _value Number of PBLs
*/
function reserveTreasury(uint256 _value) public {
}
/**@dev Unfreeze some tokens for team and treasury, if the time has come
*/
function withdrawDeferred() public {
}
function() public {
}
}
| balances[founder]>=_value | 305,233 | balances[founder]>=_value |
ERROR_RECOVER_TOKEN_FUNDS_FAILED | pragma solidity ^0.5.8;
contract ControlledRecoverable is Controlled {
using SafeERC20 for ERC20;
string private constant ERROR_SENDER_NOT_FUNDS_GOVERNOR = "CTD_SENDER_NOT_FUNDS_GOVERNOR";
string private constant ERROR_INSUFFICIENT_RECOVER_FUNDS = "CTD_INSUFFICIENT_RECOVER_FUNDS";
string private constant ERROR_RECOVER_TOKEN_FUNDS_FAILED = "CTD_RECOVER_TOKEN_FUNDS_FAILED";
event RecoverFunds(ERC20 token, address recipient, uint256 balance);
/**
* @dev Ensure the msg.sender is the controller's funds governor
*/
modifier onlyFundsGovernor {
}
/**
* @dev Constructor function
* @param _controller Address of the controller
*/
constructor(Controller _controller) Controlled(_controller) public {
}
/**
* @notice Transfer all `_token` tokens to `_to`
* @param _token ERC20 token to be recovered
* @param _to Address of the recipient that will be receive all the funds of the requested token
*/
function recoverFunds(ERC20 _token, address _to) external onlyFundsGovernor {
uint256 balance = _token.balanceOf(address(this));
require(balance > 0, ERROR_INSUFFICIENT_RECOVER_FUNDS);
require(<FILL_ME>)
emit RecoverFunds(_token, _to, balance);
}
}
| _token.safeTransfer(_to,balance),ERROR_RECOVER_TOKEN_FUNDS_FAILED | 305,265 | _token.safeTransfer(_to,balance) |
"Max supply exceeded" | // SPDX-License-Identifier: MIT
// Copyright 2021 Inftspaces & Martin Wawrusch
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
/***
We need to whitelist mintLiveEvent function - topmost priority
We would like to whitelist (seperately from the mintLiveEvent function) the mintInftspaces function, when the saleWhitelistIsActive flag is true.
e.g. those are two different whitelists.
Questions:
* What would be the benefits of using enumerable long term? Should it be removed for minting cost reduction?
* Should we include the opensea proxy code functionality for? If so what would we need to add (looking at https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol) with proxy and meta transactions
* Should we implement the new rarible standard for comissions?
* Code Quality? Improvements?
*/
///
/// URL Handling
/// By default we use the base URL for the token combined with the tokenid, but if it has been overriden during minting or set explicitely
/// then we use the one provided there. The idea is to be able to convert all NFTs to IPFS storage when Ethereum switched to Staking and prices are reasonable to update the 8888 tokens.
///
/// Also, to support reveal we make the baseUrl settable, so before the reveal we switch it to the final url.
/// @custom:security-contact [email protected]
contract Inftspaces is ERC721, ERC721Enumerable, ERC721Burnable, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
using Strings for uint256;
string public PROVENANCE;
mapping(address => bool) public claimedFreeNft;
mapping(address => uint256) public purchasedForAddress;
uint256 public price = 60_000_000_000_000_000; // 0.060 ETH
/// @dev The tokens that are minted for special sales and or participating artists.
uint256 public constant CUSTOM_RESERVE = 100;
/// @dev The maxtokens are the total tokens - the custom reservce.
uint256 public constant MAX_TOKENS = 8788;
uint256 public constant MAX_PURCHASE_PER_MINT = 11;
uint256 public maxPurchasePerAccount = 11;
bool public saleIsActive;
bool public saleWhitelistIsActive = true;
bool public isLiveMintingActive;
uint256 public maxForSale = 2000;
string public baseURI = "https://dujurg1wstjc2.cloudfront.net/metaphysical-rift/";
string private _contractURI;
address public mintLiveEventSigner;
bool public tokenURIsFrozen;
Counters.Counter private _tokenIdCounter;
/// Opensea 'freezing' event.
event PermanentURI(string _value, uint256 indexed _id);
/// Invoked when we live minted an NFT
event LiveMinted(address indexed _to, uint256 indexed _tokenId);
/// Invoked when the live minting activation has been changed.
event SetLiveMintingActive(bool _active);
/// Invoked when the sale price is updated.
//event PriceChanged(uint256 _price);
/// Invoked when the sale activation has been changed.
event SaleIsActive(bool _isActive);
constructor() ERC721("inftspaces - Metaphysical Rift", "INFTMR") {
}
/// @notice Mints between 1 and 10 NFTs.
/// @param numberOfTokens The number of tokens to mint, a valid number of 1 to 10
function mintInftspaces(uint256 numberOfTokens) public payable {
require(saleIsActive, "Sale not active");
require(numberOfTokens > 0, "1 token min");
require(numberOfTokens <= MAX_PURCHASE_PER_MINT, "11 tokens max");
require(<FILL_ME>)
require(msg.value >= price.mul(numberOfTokens), "Wrong ETH amount");
uint256 mintedSoFar = purchasedForAddress[msg.sender];
require(mintedSoFar + numberOfTokens <= maxPurchasePerAccount, "11 tokens per account");
purchasedForAddress[msg.sender] = mintedSoFar + numberOfTokens;
for(uint256 i = 0; i < numberOfTokens; i++) {
uint256 mintIndex = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(msg.sender, mintIndex);
}
}
/// @notice Mint a token (If you have been whitelisted at an event).
/// @dev Called buy visitors of our live events. They are entitled to 1 mint per whitelisted address.
function mintLiveEvent(uint8 _v, bytes32 _r, bytes32 _s) onlyValidAccess(_v,_r,_s) public {
}
/// @notice Live minting support for the smart contract owner
/// @dev Used only in cases where people show up on the live events and don't have money in their ether.
function mintLiveForAddress(address to) public onlyOwner {
}
/// @notice Mint custom reserve NFTs for featured artists
/// @dev Used to create custom NFT sets for artists
function mintCustomForAddress(address to, uint256 tokenId) public onlyOwner {
}
/// @notice Fund withdrawal for owner.
function withdraw(uint256 amount) public onlyOwner {
}
/// @notice sets the price in gwai for a single nft sale.
function setPrice(uint256 newPrice) public onlyOwner {
}
function setMaxPurchasePerAccount(uint256 newMaxPurchasePerAccount) public onlyOwner {
}
function setContractURI(string calldata newContractURI) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setMintLiveEventSigner(address adr) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setSaleIsActive(bool active) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setTokenURIsFrozen() public onlyOwner {
}
function setProvenanceHash(string calldata provenanceHash) public onlyOwner {
}
/// @notice The live minting action is limited in time. People who do not mint in time will lose their slot.
function setLiveMintingActive(bool active) public onlyOwner {
}
/// @notice Sets the maximum number of tokens that can be sold right now (presale)
function setMaxForSale(uint256 newMaxForSale) public onlyOwner {
}
/// @notice The whitelist is by default activated for the sale, but it needs to be deactivated past the presale, otherwise we won't be able to sell without whitelist.
function setSaleWhitelistIsActive(bool active) public onlyOwner {
}
/// @dev This is set to empty to ensure that we can disambiguate between a stored full url and an url that is composed from the actual base url and the tokenid. Never change this.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets the baseURL, which needs to have a trailing /
function setBaseURI(string calldata newBaseURI) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
// /// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
// /// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
// function freezeMetadata(uint256 tokenId, string calldata uri) public onlyOwner{
// require(_exists(tokenId), "Not minted");
// require(!tokenURIsFrozen || bytes(super.tokenURI(tokenId)).length == 0, "Token URIs frozen");
// _setTokenURI(tokenId, uri);
// emit PermanentURI(uri, tokenId);
// }
/// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
/// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
function freezeMetadatas(uint256 tokenId, string[] calldata uris) public onlyOwner{
}
/*
* @dev Requires msg.sender to have valid access message.
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
*/
modifier onlyValidAccess(uint8 _v, bytes32 _r, bytes32 _s)
{
}
/*
* @dev Verifies if message was signed by owner to give access to _add for this contract.
* Assumes Geth signature prefix.
* @param _add Address of agent with access
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
* @return Validity of access message for a given address.
*/
function isValidAccessMessage(
address _add,
uint8 _v,
bytes32 _r,
bytes32 _s)
public view returns (bool)
{
}
function contractURI() public view returns (string memory) {
}
}
| _tokenIdCounter.current().add(numberOfTokens)<=maxForSale,"Max supply exceeded" | 305,300 | _tokenIdCounter.current().add(numberOfTokens)<=maxForSale |
"11 tokens per account" | // SPDX-License-Identifier: MIT
// Copyright 2021 Inftspaces & Martin Wawrusch
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
/***
We need to whitelist mintLiveEvent function - topmost priority
We would like to whitelist (seperately from the mintLiveEvent function) the mintInftspaces function, when the saleWhitelistIsActive flag is true.
e.g. those are two different whitelists.
Questions:
* What would be the benefits of using enumerable long term? Should it be removed for minting cost reduction?
* Should we include the opensea proxy code functionality for? If so what would we need to add (looking at https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol) with proxy and meta transactions
* Should we implement the new rarible standard for comissions?
* Code Quality? Improvements?
*/
///
/// URL Handling
/// By default we use the base URL for the token combined with the tokenid, but if it has been overriden during minting or set explicitely
/// then we use the one provided there. The idea is to be able to convert all NFTs to IPFS storage when Ethereum switched to Staking and prices are reasonable to update the 8888 tokens.
///
/// Also, to support reveal we make the baseUrl settable, so before the reveal we switch it to the final url.
/// @custom:security-contact [email protected]
contract Inftspaces is ERC721, ERC721Enumerable, ERC721Burnable, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
using Strings for uint256;
string public PROVENANCE;
mapping(address => bool) public claimedFreeNft;
mapping(address => uint256) public purchasedForAddress;
uint256 public price = 60_000_000_000_000_000; // 0.060 ETH
/// @dev The tokens that are minted for special sales and or participating artists.
uint256 public constant CUSTOM_RESERVE = 100;
/// @dev The maxtokens are the total tokens - the custom reservce.
uint256 public constant MAX_TOKENS = 8788;
uint256 public constant MAX_PURCHASE_PER_MINT = 11;
uint256 public maxPurchasePerAccount = 11;
bool public saleIsActive;
bool public saleWhitelistIsActive = true;
bool public isLiveMintingActive;
uint256 public maxForSale = 2000;
string public baseURI = "https://dujurg1wstjc2.cloudfront.net/metaphysical-rift/";
string private _contractURI;
address public mintLiveEventSigner;
bool public tokenURIsFrozen;
Counters.Counter private _tokenIdCounter;
/// Opensea 'freezing' event.
event PermanentURI(string _value, uint256 indexed _id);
/// Invoked when we live minted an NFT
event LiveMinted(address indexed _to, uint256 indexed _tokenId);
/// Invoked when the live minting activation has been changed.
event SetLiveMintingActive(bool _active);
/// Invoked when the sale price is updated.
//event PriceChanged(uint256 _price);
/// Invoked when the sale activation has been changed.
event SaleIsActive(bool _isActive);
constructor() ERC721("inftspaces - Metaphysical Rift", "INFTMR") {
}
/// @notice Mints between 1 and 10 NFTs.
/// @param numberOfTokens The number of tokens to mint, a valid number of 1 to 10
function mintInftspaces(uint256 numberOfTokens) public payable {
require(saleIsActive, "Sale not active");
require(numberOfTokens > 0, "1 token min");
require(numberOfTokens <= MAX_PURCHASE_PER_MINT, "11 tokens max");
require(_tokenIdCounter.current().add(numberOfTokens) <= maxForSale, "Max supply exceeded");
require(msg.value >= price.mul(numberOfTokens), "Wrong ETH amount");
uint256 mintedSoFar = purchasedForAddress[msg.sender];
require(<FILL_ME>)
purchasedForAddress[msg.sender] = mintedSoFar + numberOfTokens;
for(uint256 i = 0; i < numberOfTokens; i++) {
uint256 mintIndex = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(msg.sender, mintIndex);
}
}
/// @notice Mint a token (If you have been whitelisted at an event).
/// @dev Called buy visitors of our live events. They are entitled to 1 mint per whitelisted address.
function mintLiveEvent(uint8 _v, bytes32 _r, bytes32 _s) onlyValidAccess(_v,_r,_s) public {
}
/// @notice Live minting support for the smart contract owner
/// @dev Used only in cases where people show up on the live events and don't have money in their ether.
function mintLiveForAddress(address to) public onlyOwner {
}
/// @notice Mint custom reserve NFTs for featured artists
/// @dev Used to create custom NFT sets for artists
function mintCustomForAddress(address to, uint256 tokenId) public onlyOwner {
}
/// @notice Fund withdrawal for owner.
function withdraw(uint256 amount) public onlyOwner {
}
/// @notice sets the price in gwai for a single nft sale.
function setPrice(uint256 newPrice) public onlyOwner {
}
function setMaxPurchasePerAccount(uint256 newMaxPurchasePerAccount) public onlyOwner {
}
function setContractURI(string calldata newContractURI) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setMintLiveEventSigner(address adr) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setSaleIsActive(bool active) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setTokenURIsFrozen() public onlyOwner {
}
function setProvenanceHash(string calldata provenanceHash) public onlyOwner {
}
/// @notice The live minting action is limited in time. People who do not mint in time will lose their slot.
function setLiveMintingActive(bool active) public onlyOwner {
}
/// @notice Sets the maximum number of tokens that can be sold right now (presale)
function setMaxForSale(uint256 newMaxForSale) public onlyOwner {
}
/// @notice The whitelist is by default activated for the sale, but it needs to be deactivated past the presale, otherwise we won't be able to sell without whitelist.
function setSaleWhitelistIsActive(bool active) public onlyOwner {
}
/// @dev This is set to empty to ensure that we can disambiguate between a stored full url and an url that is composed from the actual base url and the tokenid. Never change this.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets the baseURL, which needs to have a trailing /
function setBaseURI(string calldata newBaseURI) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
// /// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
// /// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
// function freezeMetadata(uint256 tokenId, string calldata uri) public onlyOwner{
// require(_exists(tokenId), "Not minted");
// require(!tokenURIsFrozen || bytes(super.tokenURI(tokenId)).length == 0, "Token URIs frozen");
// _setTokenURI(tokenId, uri);
// emit PermanentURI(uri, tokenId);
// }
/// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
/// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
function freezeMetadatas(uint256 tokenId, string[] calldata uris) public onlyOwner{
}
/*
* @dev Requires msg.sender to have valid access message.
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
*/
modifier onlyValidAccess(uint8 _v, bytes32 _r, bytes32 _s)
{
}
/*
* @dev Verifies if message was signed by owner to give access to _add for this contract.
* Assumes Geth signature prefix.
* @param _add Address of agent with access
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
* @return Validity of access message for a given address.
*/
function isValidAccessMessage(
address _add,
uint8 _v,
bytes32 _r,
bytes32 _s)
public view returns (bool)
{
}
function contractURI() public view returns (string memory) {
}
}
| mintedSoFar+numberOfTokens<=maxPurchasePerAccount,"11 tokens per account" | 305,300 | mintedSoFar+numberOfTokens<=maxPurchasePerAccount |
"Max supply exceeded" | // SPDX-License-Identifier: MIT
// Copyright 2021 Inftspaces & Martin Wawrusch
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
/***
We need to whitelist mintLiveEvent function - topmost priority
We would like to whitelist (seperately from the mintLiveEvent function) the mintInftspaces function, when the saleWhitelistIsActive flag is true.
e.g. those are two different whitelists.
Questions:
* What would be the benefits of using enumerable long term? Should it be removed for minting cost reduction?
* Should we include the opensea proxy code functionality for? If so what would we need to add (looking at https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol) with proxy and meta transactions
* Should we implement the new rarible standard for comissions?
* Code Quality? Improvements?
*/
///
/// URL Handling
/// By default we use the base URL for the token combined with the tokenid, but if it has been overriden during minting or set explicitely
/// then we use the one provided there. The idea is to be able to convert all NFTs to IPFS storage when Ethereum switched to Staking and prices are reasonable to update the 8888 tokens.
///
/// Also, to support reveal we make the baseUrl settable, so before the reveal we switch it to the final url.
/// @custom:security-contact [email protected]
contract Inftspaces is ERC721, ERC721Enumerable, ERC721Burnable, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
using Strings for uint256;
string public PROVENANCE;
mapping(address => bool) public claimedFreeNft;
mapping(address => uint256) public purchasedForAddress;
uint256 public price = 60_000_000_000_000_000; // 0.060 ETH
/// @dev The tokens that are minted for special sales and or participating artists.
uint256 public constant CUSTOM_RESERVE = 100;
/// @dev The maxtokens are the total tokens - the custom reservce.
uint256 public constant MAX_TOKENS = 8788;
uint256 public constant MAX_PURCHASE_PER_MINT = 11;
uint256 public maxPurchasePerAccount = 11;
bool public saleIsActive;
bool public saleWhitelistIsActive = true;
bool public isLiveMintingActive;
uint256 public maxForSale = 2000;
string public baseURI = "https://dujurg1wstjc2.cloudfront.net/metaphysical-rift/";
string private _contractURI;
address public mintLiveEventSigner;
bool public tokenURIsFrozen;
Counters.Counter private _tokenIdCounter;
/// Opensea 'freezing' event.
event PermanentURI(string _value, uint256 indexed _id);
/// Invoked when we live minted an NFT
event LiveMinted(address indexed _to, uint256 indexed _tokenId);
/// Invoked when the live minting activation has been changed.
event SetLiveMintingActive(bool _active);
/// Invoked when the sale price is updated.
//event PriceChanged(uint256 _price);
/// Invoked when the sale activation has been changed.
event SaleIsActive(bool _isActive);
constructor() ERC721("inftspaces - Metaphysical Rift", "INFTMR") {
}
/// @notice Mints between 1 and 10 NFTs.
/// @param numberOfTokens The number of tokens to mint, a valid number of 1 to 10
function mintInftspaces(uint256 numberOfTokens) public payable {
}
/// @notice Mint a token (If you have been whitelisted at an event).
/// @dev Called buy visitors of our live events. They are entitled to 1 mint per whitelisted address.
function mintLiveEvent(uint8 _v, bytes32 _r, bytes32 _s) onlyValidAccess(_v,_r,_s) public {
require(isLiveMintingActive, "Live minting inactive");
require(<FILL_ME>)
require(!claimedFreeNft[msg.sender], "Already claimed");
uint256 mintIndex = _tokenIdCounter.current();
_tokenIdCounter.increment();
claimedFreeNft[msg.sender] = true;
_safeMint(msg.sender, mintIndex);
emit LiveMinted(msg.sender, mintIndex);
}
/// @notice Live minting support for the smart contract owner
/// @dev Used only in cases where people show up on the live events and don't have money in their ether.
function mintLiveForAddress(address to) public onlyOwner {
}
/// @notice Mint custom reserve NFTs for featured artists
/// @dev Used to create custom NFT sets for artists
function mintCustomForAddress(address to, uint256 tokenId) public onlyOwner {
}
/// @notice Fund withdrawal for owner.
function withdraw(uint256 amount) public onlyOwner {
}
/// @notice sets the price in gwai for a single nft sale.
function setPrice(uint256 newPrice) public onlyOwner {
}
function setMaxPurchasePerAccount(uint256 newMaxPurchasePerAccount) public onlyOwner {
}
function setContractURI(string calldata newContractURI) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setMintLiveEventSigner(address adr) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setSaleIsActive(bool active) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setTokenURIsFrozen() public onlyOwner {
}
function setProvenanceHash(string calldata provenanceHash) public onlyOwner {
}
/// @notice The live minting action is limited in time. People who do not mint in time will lose their slot.
function setLiveMintingActive(bool active) public onlyOwner {
}
/// @notice Sets the maximum number of tokens that can be sold right now (presale)
function setMaxForSale(uint256 newMaxForSale) public onlyOwner {
}
/// @notice The whitelist is by default activated for the sale, but it needs to be deactivated past the presale, otherwise we won't be able to sell without whitelist.
function setSaleWhitelistIsActive(bool active) public onlyOwner {
}
/// @dev This is set to empty to ensure that we can disambiguate between a stored full url and an url that is composed from the actual base url and the tokenid. Never change this.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets the baseURL, which needs to have a trailing /
function setBaseURI(string calldata newBaseURI) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
// /// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
// /// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
// function freezeMetadata(uint256 tokenId, string calldata uri) public onlyOwner{
// require(_exists(tokenId), "Not minted");
// require(!tokenURIsFrozen || bytes(super.tokenURI(tokenId)).length == 0, "Token URIs frozen");
// _setTokenURI(tokenId, uri);
// emit PermanentURI(uri, tokenId);
// }
/// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
/// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
function freezeMetadatas(uint256 tokenId, string[] calldata uris) public onlyOwner{
}
/*
* @dev Requires msg.sender to have valid access message.
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
*/
modifier onlyValidAccess(uint8 _v, bytes32 _r, bytes32 _s)
{
}
/*
* @dev Verifies if message was signed by owner to give access to _add for this contract.
* Assumes Geth signature prefix.
* @param _add Address of agent with access
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
* @return Validity of access message for a given address.
*/
function isValidAccessMessage(
address _add,
uint8 _v,
bytes32 _r,
bytes32 _s)
public view returns (bool)
{
}
function contractURI() public view returns (string memory) {
}
}
| _tokenIdCounter.current().add(1)<=MAX_TOKENS,"Max supply exceeded" | 305,300 | _tokenIdCounter.current().add(1)<=MAX_TOKENS |
"Already claimed" | // SPDX-License-Identifier: MIT
// Copyright 2021 Inftspaces & Martin Wawrusch
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
/***
We need to whitelist mintLiveEvent function - topmost priority
We would like to whitelist (seperately from the mintLiveEvent function) the mintInftspaces function, when the saleWhitelistIsActive flag is true.
e.g. those are two different whitelists.
Questions:
* What would be the benefits of using enumerable long term? Should it be removed for minting cost reduction?
* Should we include the opensea proxy code functionality for? If so what would we need to add (looking at https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol) with proxy and meta transactions
* Should we implement the new rarible standard for comissions?
* Code Quality? Improvements?
*/
///
/// URL Handling
/// By default we use the base URL for the token combined with the tokenid, but if it has been overriden during minting or set explicitely
/// then we use the one provided there. The idea is to be able to convert all NFTs to IPFS storage when Ethereum switched to Staking and prices are reasonable to update the 8888 tokens.
///
/// Also, to support reveal we make the baseUrl settable, so before the reveal we switch it to the final url.
/// @custom:security-contact [email protected]
contract Inftspaces is ERC721, ERC721Enumerable, ERC721Burnable, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
using Strings for uint256;
string public PROVENANCE;
mapping(address => bool) public claimedFreeNft;
mapping(address => uint256) public purchasedForAddress;
uint256 public price = 60_000_000_000_000_000; // 0.060 ETH
/// @dev The tokens that are minted for special sales and or participating artists.
uint256 public constant CUSTOM_RESERVE = 100;
/// @dev The maxtokens are the total tokens - the custom reservce.
uint256 public constant MAX_TOKENS = 8788;
uint256 public constant MAX_PURCHASE_PER_MINT = 11;
uint256 public maxPurchasePerAccount = 11;
bool public saleIsActive;
bool public saleWhitelistIsActive = true;
bool public isLiveMintingActive;
uint256 public maxForSale = 2000;
string public baseURI = "https://dujurg1wstjc2.cloudfront.net/metaphysical-rift/";
string private _contractURI;
address public mintLiveEventSigner;
bool public tokenURIsFrozen;
Counters.Counter private _tokenIdCounter;
/// Opensea 'freezing' event.
event PermanentURI(string _value, uint256 indexed _id);
/// Invoked when we live minted an NFT
event LiveMinted(address indexed _to, uint256 indexed _tokenId);
/// Invoked when the live minting activation has been changed.
event SetLiveMintingActive(bool _active);
/// Invoked when the sale price is updated.
//event PriceChanged(uint256 _price);
/// Invoked when the sale activation has been changed.
event SaleIsActive(bool _isActive);
constructor() ERC721("inftspaces - Metaphysical Rift", "INFTMR") {
}
/// @notice Mints between 1 and 10 NFTs.
/// @param numberOfTokens The number of tokens to mint, a valid number of 1 to 10
function mintInftspaces(uint256 numberOfTokens) public payable {
}
/// @notice Mint a token (If you have been whitelisted at an event).
/// @dev Called buy visitors of our live events. They are entitled to 1 mint per whitelisted address.
function mintLiveEvent(uint8 _v, bytes32 _r, bytes32 _s) onlyValidAccess(_v,_r,_s) public {
require(isLiveMintingActive, "Live minting inactive");
require(_tokenIdCounter.current().add(1) <= MAX_TOKENS, "Max supply exceeded");
require(<FILL_ME>)
uint256 mintIndex = _tokenIdCounter.current();
_tokenIdCounter.increment();
claimedFreeNft[msg.sender] = true;
_safeMint(msg.sender, mintIndex);
emit LiveMinted(msg.sender, mintIndex);
}
/// @notice Live minting support for the smart contract owner
/// @dev Used only in cases where people show up on the live events and don't have money in their ether.
function mintLiveForAddress(address to) public onlyOwner {
}
/// @notice Mint custom reserve NFTs for featured artists
/// @dev Used to create custom NFT sets for artists
function mintCustomForAddress(address to, uint256 tokenId) public onlyOwner {
}
/// @notice Fund withdrawal for owner.
function withdraw(uint256 amount) public onlyOwner {
}
/// @notice sets the price in gwai for a single nft sale.
function setPrice(uint256 newPrice) public onlyOwner {
}
function setMaxPurchasePerAccount(uint256 newMaxPurchasePerAccount) public onlyOwner {
}
function setContractURI(string calldata newContractURI) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setMintLiveEventSigner(address adr) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setSaleIsActive(bool active) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setTokenURIsFrozen() public onlyOwner {
}
function setProvenanceHash(string calldata provenanceHash) public onlyOwner {
}
/// @notice The live minting action is limited in time. People who do not mint in time will lose their slot.
function setLiveMintingActive(bool active) public onlyOwner {
}
/// @notice Sets the maximum number of tokens that can be sold right now (presale)
function setMaxForSale(uint256 newMaxForSale) public onlyOwner {
}
/// @notice The whitelist is by default activated for the sale, but it needs to be deactivated past the presale, otherwise we won't be able to sell without whitelist.
function setSaleWhitelistIsActive(bool active) public onlyOwner {
}
/// @dev This is set to empty to ensure that we can disambiguate between a stored full url and an url that is composed from the actual base url and the tokenid. Never change this.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets the baseURL, which needs to have a trailing /
function setBaseURI(string calldata newBaseURI) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
// /// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
// /// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
// function freezeMetadata(uint256 tokenId, string calldata uri) public onlyOwner{
// require(_exists(tokenId), "Not minted");
// require(!tokenURIsFrozen || bytes(super.tokenURI(tokenId)).length == 0, "Token URIs frozen");
// _setTokenURI(tokenId, uri);
// emit PermanentURI(uri, tokenId);
// }
/// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
/// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
function freezeMetadatas(uint256 tokenId, string[] calldata uris) public onlyOwner{
}
/*
* @dev Requires msg.sender to have valid access message.
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
*/
modifier onlyValidAccess(uint8 _v, bytes32 _r, bytes32 _s)
{
}
/*
* @dev Verifies if message was signed by owner to give access to _add for this contract.
* Assumes Geth signature prefix.
* @param _add Address of agent with access
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
* @return Validity of access message for a given address.
*/
function isValidAccessMessage(
address _add,
uint8 _v,
bytes32 _r,
bytes32 _s)
public view returns (bool)
{
}
function contractURI() public view returns (string memory) {
}
}
| !claimedFreeNft[msg.sender],"Already claimed" | 305,300 | !claimedFreeNft[msg.sender] |
"Not minted" | // SPDX-License-Identifier: MIT
// Copyright 2021 Inftspaces & Martin Wawrusch
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
/***
We need to whitelist mintLiveEvent function - topmost priority
We would like to whitelist (seperately from the mintLiveEvent function) the mintInftspaces function, when the saleWhitelistIsActive flag is true.
e.g. those are two different whitelists.
Questions:
* What would be the benefits of using enumerable long term? Should it be removed for minting cost reduction?
* Should we include the opensea proxy code functionality for? If so what would we need to add (looking at https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol) with proxy and meta transactions
* Should we implement the new rarible standard for comissions?
* Code Quality? Improvements?
*/
///
/// URL Handling
/// By default we use the base URL for the token combined with the tokenid, but if it has been overriden during minting or set explicitely
/// then we use the one provided there. The idea is to be able to convert all NFTs to IPFS storage when Ethereum switched to Staking and prices are reasonable to update the 8888 tokens.
///
/// Also, to support reveal we make the baseUrl settable, so before the reveal we switch it to the final url.
/// @custom:security-contact [email protected]
contract Inftspaces is ERC721, ERC721Enumerable, ERC721Burnable, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
using Strings for uint256;
string public PROVENANCE;
mapping(address => bool) public claimedFreeNft;
mapping(address => uint256) public purchasedForAddress;
uint256 public price = 60_000_000_000_000_000; // 0.060 ETH
/// @dev The tokens that are minted for special sales and or participating artists.
uint256 public constant CUSTOM_RESERVE = 100;
/// @dev The maxtokens are the total tokens - the custom reservce.
uint256 public constant MAX_TOKENS = 8788;
uint256 public constant MAX_PURCHASE_PER_MINT = 11;
uint256 public maxPurchasePerAccount = 11;
bool public saleIsActive;
bool public saleWhitelistIsActive = true;
bool public isLiveMintingActive;
uint256 public maxForSale = 2000;
string public baseURI = "https://dujurg1wstjc2.cloudfront.net/metaphysical-rift/";
string private _contractURI;
address public mintLiveEventSigner;
bool public tokenURIsFrozen;
Counters.Counter private _tokenIdCounter;
/// Opensea 'freezing' event.
event PermanentURI(string _value, uint256 indexed _id);
/// Invoked when we live minted an NFT
event LiveMinted(address indexed _to, uint256 indexed _tokenId);
/// Invoked when the live minting activation has been changed.
event SetLiveMintingActive(bool _active);
/// Invoked when the sale price is updated.
//event PriceChanged(uint256 _price);
/// Invoked when the sale activation has been changed.
event SaleIsActive(bool _isActive);
constructor() ERC721("inftspaces - Metaphysical Rift", "INFTMR") {
}
/// @notice Mints between 1 and 10 NFTs.
/// @param numberOfTokens The number of tokens to mint, a valid number of 1 to 10
function mintInftspaces(uint256 numberOfTokens) public payable {
}
/// @notice Mint a token (If you have been whitelisted at an event).
/// @dev Called buy visitors of our live events. They are entitled to 1 mint per whitelisted address.
function mintLiveEvent(uint8 _v, bytes32 _r, bytes32 _s) onlyValidAccess(_v,_r,_s) public {
}
/// @notice Live minting support for the smart contract owner
/// @dev Used only in cases where people show up on the live events and don't have money in their ether.
function mintLiveForAddress(address to) public onlyOwner {
}
/// @notice Mint custom reserve NFTs for featured artists
/// @dev Used to create custom NFT sets for artists
function mintCustomForAddress(address to, uint256 tokenId) public onlyOwner {
}
/// @notice Fund withdrawal for owner.
function withdraw(uint256 amount) public onlyOwner {
}
/// @notice sets the price in gwai for a single nft sale.
function setPrice(uint256 newPrice) public onlyOwner {
}
function setMaxPurchasePerAccount(uint256 newMaxPurchasePerAccount) public onlyOwner {
}
function setContractURI(string calldata newContractURI) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setMintLiveEventSigner(address adr) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setSaleIsActive(bool active) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setTokenURIsFrozen() public onlyOwner {
}
function setProvenanceHash(string calldata provenanceHash) public onlyOwner {
}
/// @notice The live minting action is limited in time. People who do not mint in time will lose their slot.
function setLiveMintingActive(bool active) public onlyOwner {
}
/// @notice Sets the maximum number of tokens that can be sold right now (presale)
function setMaxForSale(uint256 newMaxForSale) public onlyOwner {
}
/// @notice The whitelist is by default activated for the sale, but it needs to be deactivated past the presale, otherwise we won't be able to sell without whitelist.
function setSaleWhitelistIsActive(bool active) public onlyOwner {
}
/// @dev This is set to empty to ensure that we can disambiguate between a stored full url and an url that is composed from the actual base url and the tokenid. Never change this.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets the baseURL, which needs to have a trailing /
function setBaseURI(string calldata newBaseURI) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
// /// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
// /// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
// function freezeMetadata(uint256 tokenId, string calldata uri) public onlyOwner{
// require(_exists(tokenId), "Not minted");
// require(!tokenURIsFrozen || bytes(super.tokenURI(tokenId)).length == 0, "Token URIs frozen");
// _setTokenURI(tokenId, uri);
// emit PermanentURI(uri, tokenId);
// }
/// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
/// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
function freezeMetadatas(uint256 tokenId, string[] calldata uris) public onlyOwner{
for(uint256 i = 0; i < uris.length; i++) {
uint256 mintIndex = tokenId + i;
require(<FILL_ME>)
require(!tokenURIsFrozen || bytes(super.tokenURI(mintIndex)).length == 0, "Token URIs frozen");
_setTokenURI(mintIndex, uris[i]);
emit PermanentURI(uris[i], mintIndex);
}
}
/*
* @dev Requires msg.sender to have valid access message.
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
*/
modifier onlyValidAccess(uint8 _v, bytes32 _r, bytes32 _s)
{
}
/*
* @dev Verifies if message was signed by owner to give access to _add for this contract.
* Assumes Geth signature prefix.
* @param _add Address of agent with access
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
* @return Validity of access message for a given address.
*/
function isValidAccessMessage(
address _add,
uint8 _v,
bytes32 _r,
bytes32 _s)
public view returns (bool)
{
}
function contractURI() public view returns (string memory) {
}
}
| _exists(mintIndex),"Not minted" | 305,300 | _exists(mintIndex) |
"Token URIs frozen" | // SPDX-License-Identifier: MIT
// Copyright 2021 Inftspaces & Martin Wawrusch
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
/***
We need to whitelist mintLiveEvent function - topmost priority
We would like to whitelist (seperately from the mintLiveEvent function) the mintInftspaces function, when the saleWhitelistIsActive flag is true.
e.g. those are two different whitelists.
Questions:
* What would be the benefits of using enumerable long term? Should it be removed for minting cost reduction?
* Should we include the opensea proxy code functionality for? If so what would we need to add (looking at https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol) with proxy and meta transactions
* Should we implement the new rarible standard for comissions?
* Code Quality? Improvements?
*/
///
/// URL Handling
/// By default we use the base URL for the token combined with the tokenid, but if it has been overriden during minting or set explicitely
/// then we use the one provided there. The idea is to be able to convert all NFTs to IPFS storage when Ethereum switched to Staking and prices are reasonable to update the 8888 tokens.
///
/// Also, to support reveal we make the baseUrl settable, so before the reveal we switch it to the final url.
/// @custom:security-contact [email protected]
contract Inftspaces is ERC721, ERC721Enumerable, ERC721Burnable, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
using Strings for uint256;
string public PROVENANCE;
mapping(address => bool) public claimedFreeNft;
mapping(address => uint256) public purchasedForAddress;
uint256 public price = 60_000_000_000_000_000; // 0.060 ETH
/// @dev The tokens that are minted for special sales and or participating artists.
uint256 public constant CUSTOM_RESERVE = 100;
/// @dev The maxtokens are the total tokens - the custom reservce.
uint256 public constant MAX_TOKENS = 8788;
uint256 public constant MAX_PURCHASE_PER_MINT = 11;
uint256 public maxPurchasePerAccount = 11;
bool public saleIsActive;
bool public saleWhitelistIsActive = true;
bool public isLiveMintingActive;
uint256 public maxForSale = 2000;
string public baseURI = "https://dujurg1wstjc2.cloudfront.net/metaphysical-rift/";
string private _contractURI;
address public mintLiveEventSigner;
bool public tokenURIsFrozen;
Counters.Counter private _tokenIdCounter;
/// Opensea 'freezing' event.
event PermanentURI(string _value, uint256 indexed _id);
/// Invoked when we live minted an NFT
event LiveMinted(address indexed _to, uint256 indexed _tokenId);
/// Invoked when the live minting activation has been changed.
event SetLiveMintingActive(bool _active);
/// Invoked when the sale price is updated.
//event PriceChanged(uint256 _price);
/// Invoked when the sale activation has been changed.
event SaleIsActive(bool _isActive);
constructor() ERC721("inftspaces - Metaphysical Rift", "INFTMR") {
}
/// @notice Mints between 1 and 10 NFTs.
/// @param numberOfTokens The number of tokens to mint, a valid number of 1 to 10
function mintInftspaces(uint256 numberOfTokens) public payable {
}
/// @notice Mint a token (If you have been whitelisted at an event).
/// @dev Called buy visitors of our live events. They are entitled to 1 mint per whitelisted address.
function mintLiveEvent(uint8 _v, bytes32 _r, bytes32 _s) onlyValidAccess(_v,_r,_s) public {
}
/// @notice Live minting support for the smart contract owner
/// @dev Used only in cases where people show up on the live events and don't have money in their ether.
function mintLiveForAddress(address to) public onlyOwner {
}
/// @notice Mint custom reserve NFTs for featured artists
/// @dev Used to create custom NFT sets for artists
function mintCustomForAddress(address to, uint256 tokenId) public onlyOwner {
}
/// @notice Fund withdrawal for owner.
function withdraw(uint256 amount) public onlyOwner {
}
/// @notice sets the price in gwai for a single nft sale.
function setPrice(uint256 newPrice) public onlyOwner {
}
function setMaxPurchasePerAccount(uint256 newMaxPurchasePerAccount) public onlyOwner {
}
function setContractURI(string calldata newContractURI) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setMintLiveEventSigner(address adr) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setSaleIsActive(bool active) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setTokenURIsFrozen() public onlyOwner {
}
function setProvenanceHash(string calldata provenanceHash) public onlyOwner {
}
/// @notice The live minting action is limited in time. People who do not mint in time will lose their slot.
function setLiveMintingActive(bool active) public onlyOwner {
}
/// @notice Sets the maximum number of tokens that can be sold right now (presale)
function setMaxForSale(uint256 newMaxForSale) public onlyOwner {
}
/// @notice The whitelist is by default activated for the sale, but it needs to be deactivated past the presale, otherwise we won't be able to sell without whitelist.
function setSaleWhitelistIsActive(bool active) public onlyOwner {
}
/// @dev This is set to empty to ensure that we can disambiguate between a stored full url and an url that is composed from the actual base url and the tokenid. Never change this.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets the baseURL, which needs to have a trailing /
function setBaseURI(string calldata newBaseURI) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
// /// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
// /// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
// function freezeMetadata(uint256 tokenId, string calldata uri) public onlyOwner{
// require(_exists(tokenId), "Not minted");
// require(!tokenURIsFrozen || bytes(super.tokenURI(tokenId)).length == 0, "Token URIs frozen");
// _setTokenURI(tokenId, uri);
// emit PermanentURI(uri, tokenId);
// }
/// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
/// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
function freezeMetadatas(uint256 tokenId, string[] calldata uris) public onlyOwner{
for(uint256 i = 0; i < uris.length; i++) {
uint256 mintIndex = tokenId + i;
require(_exists(mintIndex), "Not minted");
require(<FILL_ME>)
_setTokenURI(mintIndex, uris[i]);
emit PermanentURI(uris[i], mintIndex);
}
}
/*
* @dev Requires msg.sender to have valid access message.
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
*/
modifier onlyValidAccess(uint8 _v, bytes32 _r, bytes32 _s)
{
}
/*
* @dev Verifies if message was signed by owner to give access to _add for this contract.
* Assumes Geth signature prefix.
* @param _add Address of agent with access
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
* @return Validity of access message for a given address.
*/
function isValidAccessMessage(
address _add,
uint8 _v,
bytes32 _r,
bytes32 _s)
public view returns (bool)
{
}
function contractURI() public view returns (string memory) {
}
}
| !tokenURIsFrozen||bytes(super.tokenURI(mintIndex)).length==0,"Token URIs frozen" | 305,300 | !tokenURIsFrozen||bytes(super.tokenURI(mintIndex)).length==0 |
"Invalid signer" | // SPDX-License-Identifier: MIT
// Copyright 2021 Inftspaces & Martin Wawrusch
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
/***
We need to whitelist mintLiveEvent function - topmost priority
We would like to whitelist (seperately from the mintLiveEvent function) the mintInftspaces function, when the saleWhitelistIsActive flag is true.
e.g. those are two different whitelists.
Questions:
* What would be the benefits of using enumerable long term? Should it be removed for minting cost reduction?
* Should we include the opensea proxy code functionality for? If so what would we need to add (looking at https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol) with proxy and meta transactions
* Should we implement the new rarible standard for comissions?
* Code Quality? Improvements?
*/
///
/// URL Handling
/// By default we use the base URL for the token combined with the tokenid, but if it has been overriden during minting or set explicitely
/// then we use the one provided there. The idea is to be able to convert all NFTs to IPFS storage when Ethereum switched to Staking and prices are reasonable to update the 8888 tokens.
///
/// Also, to support reveal we make the baseUrl settable, so before the reveal we switch it to the final url.
/// @custom:security-contact [email protected]
contract Inftspaces is ERC721, ERC721Enumerable, ERC721Burnable, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
using Strings for uint256;
string public PROVENANCE;
mapping(address => bool) public claimedFreeNft;
mapping(address => uint256) public purchasedForAddress;
uint256 public price = 60_000_000_000_000_000; // 0.060 ETH
/// @dev The tokens that are minted for special sales and or participating artists.
uint256 public constant CUSTOM_RESERVE = 100;
/// @dev The maxtokens are the total tokens - the custom reservce.
uint256 public constant MAX_TOKENS = 8788;
uint256 public constant MAX_PURCHASE_PER_MINT = 11;
uint256 public maxPurchasePerAccount = 11;
bool public saleIsActive;
bool public saleWhitelistIsActive = true;
bool public isLiveMintingActive;
uint256 public maxForSale = 2000;
string public baseURI = "https://dujurg1wstjc2.cloudfront.net/metaphysical-rift/";
string private _contractURI;
address public mintLiveEventSigner;
bool public tokenURIsFrozen;
Counters.Counter private _tokenIdCounter;
/// Opensea 'freezing' event.
event PermanentURI(string _value, uint256 indexed _id);
/// Invoked when we live minted an NFT
event LiveMinted(address indexed _to, uint256 indexed _tokenId);
/// Invoked when the live minting activation has been changed.
event SetLiveMintingActive(bool _active);
/// Invoked when the sale price is updated.
//event PriceChanged(uint256 _price);
/// Invoked when the sale activation has been changed.
event SaleIsActive(bool _isActive);
constructor() ERC721("inftspaces - Metaphysical Rift", "INFTMR") {
}
/// @notice Mints between 1 and 10 NFTs.
/// @param numberOfTokens The number of tokens to mint, a valid number of 1 to 10
function mintInftspaces(uint256 numberOfTokens) public payable {
}
/// @notice Mint a token (If you have been whitelisted at an event).
/// @dev Called buy visitors of our live events. They are entitled to 1 mint per whitelisted address.
function mintLiveEvent(uint8 _v, bytes32 _r, bytes32 _s) onlyValidAccess(_v,_r,_s) public {
}
/// @notice Live minting support for the smart contract owner
/// @dev Used only in cases where people show up on the live events and don't have money in their ether.
function mintLiveForAddress(address to) public onlyOwner {
}
/// @notice Mint custom reserve NFTs for featured artists
/// @dev Used to create custom NFT sets for artists
function mintCustomForAddress(address to, uint256 tokenId) public onlyOwner {
}
/// @notice Fund withdrawal for owner.
function withdraw(uint256 amount) public onlyOwner {
}
/// @notice sets the price in gwai for a single nft sale.
function setPrice(uint256 newPrice) public onlyOwner {
}
function setMaxPurchasePerAccount(uint256 newMaxPurchasePerAccount) public onlyOwner {
}
function setContractURI(string calldata newContractURI) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setMintLiveEventSigner(address adr) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setSaleIsActive(bool active) public onlyOwner {
}
/// @notice enables/disables the pre sale and sale.
function setTokenURIsFrozen() public onlyOwner {
}
function setProvenanceHash(string calldata provenanceHash) public onlyOwner {
}
/// @notice The live minting action is limited in time. People who do not mint in time will lose their slot.
function setLiveMintingActive(bool active) public onlyOwner {
}
/// @notice Sets the maximum number of tokens that can be sold right now (presale)
function setMaxForSale(uint256 newMaxForSale) public onlyOwner {
}
/// @notice The whitelist is by default activated for the sale, but it needs to be deactivated past the presale, otherwise we won't be able to sell without whitelist.
function setSaleWhitelistIsActive(bool active) public onlyOwner {
}
/// @dev This is set to empty to ensure that we can disambiguate between a stored full url and an url that is composed from the actual base url and the tokenid. Never change this.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets the baseURL, which needs to have a trailing /
function setBaseURI(string calldata newBaseURI) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
// /// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
// /// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
// function freezeMetadata(uint256 tokenId, string calldata uri) public onlyOwner{
// require(_exists(tokenId), "Not minted");
// require(!tokenURIsFrozen || bytes(super.tokenURI(tokenId)).length == 0, "Token URIs frozen");
// _setTokenURI(tokenId, uri);
// emit PermanentURI(uri, tokenId);
// }
/// @notice Will be used by the owner to permanently freeze the metadata on ipfs once Ethereum moves to PoS
/// This can be set as long as tokenURIs are not frozen or it has not been set to a dedicated value.
function freezeMetadatas(uint256 tokenId, string[] calldata uris) public onlyOwner{
}
/*
* @dev Requires msg.sender to have valid access message.
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
*/
modifier onlyValidAccess(uint8 _v, bytes32 _r, bytes32 _s)
{
require(<FILL_ME>)
_;
}
/*
* @dev Verifies if message was signed by owner to give access to _add for this contract.
* Assumes Geth signature prefix.
* @param _add Address of agent with access
* @param _v ECDSA signature parameter v.
* @param _r ECDSA signature parameters r.
* @param _s ECDSA signature parameters s.
* @return Validity of access message for a given address.
*/
function isValidAccessMessage(
address _add,
uint8 _v,
bytes32 _r,
bytes32 _s)
public view returns (bool)
{
}
function contractURI() public view returns (string memory) {
}
}
| isValidAccessMessage(msg.sender,_v,_r,_s),"Invalid signer" | 305,300 | isValidAccessMessage(msg.sender,_v,_r,_s) |
null | //@ create by ETU LAB, INC.
pragma solidity ^0.4.24;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Owned {
address public owner;
address public newOwner;
modifier onlyOwner { }
event OwnerUpdate(address _prevOwner, address _newOwner);
function Owned() public {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
// ERC20 Interface
contract ERC20 {
function totalSupply() public view returns (uint _totalSupply);
function balanceOf(address _owner) public view returns (uint balance);
function transfer(address _to, uint _value) public returns (bool success);
function transferFrom(address _from, address _to, uint _value) public returns (bool success);
function approve(address _spender, uint _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint remaining);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
// ERC20Token
contract ERC20Token is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalToken;
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
}
contract H2OC is ERC20Token, Owned {
string public constant name = "H2O Chain";
string public constant symbol = "H2OC";
uint256 public constant decimals = 18;
uint256 public tokenDestroyed;
event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp);
function H2OC() public {
}
function transferAnyERC20Token(address _tokenAddress, address _recipient, uint256 _amount) public onlyOwner returns (bool success) {
}
function burn (uint256 _burntAmount) public returns (bool success) {
require(<FILL_ME>)
balances[msg.sender] = balances[msg.sender].sub(_burntAmount);
totalToken = totalToken.sub(_burntAmount);
tokenDestroyed = tokenDestroyed.add(_burntAmount);
require (tokenDestroyed <= 30000000000000000000000000000);
Transfer(address(this), 0x0, _burntAmount);
Burn(msg.sender, _burntAmount, block.timestamp);
return true;
}
}
| balances[msg.sender]>=_burntAmount&&_burntAmount>0 | 305,360 | balances[msg.sender]>=_burntAmount&&_burntAmount>0 |
"MARKET_NOT_LISTED" | pragma solidity ^0.5.16;
import "./CToken.sol";
import "./ErrorReporter.sol";
import "./PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError {
event MarketListed(CToken cToken);
event MarketEntered(CToken cToken, address account);
event MarketExited(CToken cToken, address account);
event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa);
event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa);
event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa);
event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);
event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);
event ActionPaused(string action, bool pauseState);
event ActionPaused(CToken cToken, string action, bool pauseState);
event NewBorrowCap(CToken indexed cToken, uint newBorrowCap);
event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian);
uint internal constant closeFactorMinMantissa = 0.05e18;
uint internal constant closeFactorMaxMantissa = 0.9e18;
uint internal constant collateralFactorMaxMantissa = 0.9e18;
constructor() public {
}
function getAssetsIn(address account) external view returns (CToken[] memory) {
}
function checkMembership(address account, CToken cToken) external view returns (bool) {
}
function enterMarkets(address[] memory cTokens) public returns (uint[] memory) {
}
function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) {
Market storage marketToJoin = markets[address(cToken)];
require(<FILL_ME>)
if (marketToJoin.accountMembership[borrower] == true) {
return Error.NO_ERROR;
}
marketToJoin.accountMembership[borrower] = true;
accountAssets[borrower].push(cToken);
emit MarketEntered(cToken, borrower);
return Error.NO_ERROR;
}
function exitMarket(address cTokenAddress) external returns (uint) {
}
function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) {
}
function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) {
}
function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) {
}
function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external {
}
function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) {
}
function repayBorrowAllowed(
address cToken,
address payer,
address borrower,
uint repayAmount) external returns (uint) {
}
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) external returns (uint) {
}
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external returns (uint) {
}
function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) {
}
struct AccountLiquidityLocalVars {
uint sumCollateral;
uint sumBorrowPlusEffects;
uint cTokenBalance;
uint borrowBalance;
uint exchangeRateMantissa;
uint oraclePriceMantissa;
Exp collateralFactor;
Exp exchangeRate;
Exp oraclePrice;
Exp tokensToDenom;
}
function getAccountLiquidity(address account) public view returns (uint, uint, uint) {
}
function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) {
}
function getHypotheticalAccountLiquidity(
address account,
address cTokenModify,
uint redeemTokens,
uint borrowAmount) public view returns (uint, uint, uint) {
}
function getHypotheticalAccountLiquidityInternal(
address account,
CToken cTokenModify,
uint redeemTokens,
uint borrowAmount) internal view returns (Error, uint, uint) {
}
function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) {
}
function _setPriceOracle(PriceOracle newOracle) public returns (uint) {
}
function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) {
}
function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) {
}
function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) {
}
function _supportMarket(CToken cToken) external returns (uint) {
}
function _addMarketInternal(address cToken) internal {
}
function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external {
}
function _setBorrowCapGuardian(address newBorrowCapGuardian) external {
}
function _setPauseGuardian(address newPauseGuardian) public returns (uint) {
}
function _setMintPaused(CToken cToken, bool state) public returns (bool) {
}
function _setBorrowPaused(CToken cToken, bool state) public returns (bool) {
}
function _setTransferPaused(bool state) public returns (bool) {
}
function _setSeizePaused(bool state) public returns (bool) {
}
function _setBorrowSeizePaused(bool state) public returns (bool) {
}
function adminOrInitializing() internal view returns (bool) {
}
function getAllMarkets() public view returns (CToken[] memory) {
}
function getBlockNumber() public view returns (uint) {
}
}
| marketToJoin.isListed,"MARKET_NOT_LISTED" | 305,374 | marketToJoin.isListed |
"MINT_IS_PAUSED" | pragma solidity ^0.5.16;
import "./CToken.sol";
import "./ErrorReporter.sol";
import "./PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError {
event MarketListed(CToken cToken);
event MarketEntered(CToken cToken, address account);
event MarketExited(CToken cToken, address account);
event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa);
event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa);
event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa);
event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);
event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);
event ActionPaused(string action, bool pauseState);
event ActionPaused(CToken cToken, string action, bool pauseState);
event NewBorrowCap(CToken indexed cToken, uint newBorrowCap);
event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian);
uint internal constant closeFactorMinMantissa = 0.05e18;
uint internal constant closeFactorMaxMantissa = 0.9e18;
uint internal constant collateralFactorMaxMantissa = 0.9e18;
constructor() public {
}
function getAssetsIn(address account) external view returns (CToken[] memory) {
}
function checkMembership(address account, CToken cToken) external view returns (bool) {
}
function enterMarkets(address[] memory cTokens) public returns (uint[] memory) {
}
function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) {
}
function exitMarket(address cTokenAddress) external returns (uint) {
}
function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) {
require(<FILL_ME>)
require(markets[cToken].isListed, "MARKET_NOT_LISTED");
return uint(Error.NO_ERROR);
}
function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) {
}
function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) {
}
function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external {
}
function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) {
}
function repayBorrowAllowed(
address cToken,
address payer,
address borrower,
uint repayAmount) external returns (uint) {
}
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) external returns (uint) {
}
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external returns (uint) {
}
function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) {
}
struct AccountLiquidityLocalVars {
uint sumCollateral;
uint sumBorrowPlusEffects;
uint cTokenBalance;
uint borrowBalance;
uint exchangeRateMantissa;
uint oraclePriceMantissa;
Exp collateralFactor;
Exp exchangeRate;
Exp oraclePrice;
Exp tokensToDenom;
}
function getAccountLiquidity(address account) public view returns (uint, uint, uint) {
}
function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) {
}
function getHypotheticalAccountLiquidity(
address account,
address cTokenModify,
uint redeemTokens,
uint borrowAmount) public view returns (uint, uint, uint) {
}
function getHypotheticalAccountLiquidityInternal(
address account,
CToken cTokenModify,
uint redeemTokens,
uint borrowAmount) internal view returns (Error, uint, uint) {
}
function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) {
}
function _setPriceOracle(PriceOracle newOracle) public returns (uint) {
}
function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) {
}
function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) {
}
function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) {
}
function _supportMarket(CToken cToken) external returns (uint) {
}
function _addMarketInternal(address cToken) internal {
}
function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external {
}
function _setBorrowCapGuardian(address newBorrowCapGuardian) external {
}
function _setPauseGuardian(address newPauseGuardian) public returns (uint) {
}
function _setMintPaused(CToken cToken, bool state) public returns (bool) {
}
function _setBorrowPaused(CToken cToken, bool state) public returns (bool) {
}
function _setTransferPaused(bool state) public returns (bool) {
}
function _setSeizePaused(bool state) public returns (bool) {
}
function _setBorrowSeizePaused(bool state) public returns (bool) {
}
function adminOrInitializing() internal view returns (bool) {
}
function getAllMarkets() public view returns (CToken[] memory) {
}
function getBlockNumber() public view returns (uint) {
}
}
| !mintGuardianPaused[cToken],"MINT_IS_PAUSED" | 305,374 | !mintGuardianPaused[cToken] |
"MARKET_NOT_LISTED" | pragma solidity ^0.5.16;
import "./CToken.sol";
import "./ErrorReporter.sol";
import "./PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError {
event MarketListed(CToken cToken);
event MarketEntered(CToken cToken, address account);
event MarketExited(CToken cToken, address account);
event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa);
event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa);
event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa);
event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);
event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);
event ActionPaused(string action, bool pauseState);
event ActionPaused(CToken cToken, string action, bool pauseState);
event NewBorrowCap(CToken indexed cToken, uint newBorrowCap);
event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian);
uint internal constant closeFactorMinMantissa = 0.05e18;
uint internal constant closeFactorMaxMantissa = 0.9e18;
uint internal constant collateralFactorMaxMantissa = 0.9e18;
constructor() public {
}
function getAssetsIn(address account) external view returns (CToken[] memory) {
}
function checkMembership(address account, CToken cToken) external view returns (bool) {
}
function enterMarkets(address[] memory cTokens) public returns (uint[] memory) {
}
function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) {
}
function exitMarket(address cTokenAddress) external returns (uint) {
}
function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) {
require(!mintGuardianPaused[cToken], "MINT_IS_PAUSED");
require(<FILL_ME>)
return uint(Error.NO_ERROR);
}
function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) {
}
function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) {
}
function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external {
}
function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) {
}
function repayBorrowAllowed(
address cToken,
address payer,
address borrower,
uint repayAmount) external returns (uint) {
}
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) external returns (uint) {
}
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external returns (uint) {
}
function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) {
}
struct AccountLiquidityLocalVars {
uint sumCollateral;
uint sumBorrowPlusEffects;
uint cTokenBalance;
uint borrowBalance;
uint exchangeRateMantissa;
uint oraclePriceMantissa;
Exp collateralFactor;
Exp exchangeRate;
Exp oraclePrice;
Exp tokensToDenom;
}
function getAccountLiquidity(address account) public view returns (uint, uint, uint) {
}
function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) {
}
function getHypotheticalAccountLiquidity(
address account,
address cTokenModify,
uint redeemTokens,
uint borrowAmount) public view returns (uint, uint, uint) {
}
function getHypotheticalAccountLiquidityInternal(
address account,
CToken cTokenModify,
uint redeemTokens,
uint borrowAmount) internal view returns (Error, uint, uint) {
}
function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) {
}
function _setPriceOracle(PriceOracle newOracle) public returns (uint) {
}
function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) {
}
function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) {
}
function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) {
}
function _supportMarket(CToken cToken) external returns (uint) {
}
function _addMarketInternal(address cToken) internal {
}
function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external {
}
function _setBorrowCapGuardian(address newBorrowCapGuardian) external {
}
function _setPauseGuardian(address newPauseGuardian) public returns (uint) {
}
function _setMintPaused(CToken cToken, bool state) public returns (bool) {
}
function _setBorrowPaused(CToken cToken, bool state) public returns (bool) {
}
function _setTransferPaused(bool state) public returns (bool) {
}
function _setSeizePaused(bool state) public returns (bool) {
}
function _setBorrowSeizePaused(bool state) public returns (bool) {
}
function adminOrInitializing() internal view returns (bool) {
}
function getAllMarkets() public view returns (CToken[] memory) {
}
function getBlockNumber() public view returns (uint) {
}
}
| markets[cToken].isListed,"MARKET_NOT_LISTED" | 305,374 | markets[cToken].isListed |
"ALL_BORROW_IS_PAUSED" | pragma solidity ^0.5.16;
import "./CToken.sol";
import "./ErrorReporter.sol";
import "./PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError {
event MarketListed(CToken cToken);
event MarketEntered(CToken cToken, address account);
event MarketExited(CToken cToken, address account);
event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa);
event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa);
event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa);
event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);
event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);
event ActionPaused(string action, bool pauseState);
event ActionPaused(CToken cToken, string action, bool pauseState);
event NewBorrowCap(CToken indexed cToken, uint newBorrowCap);
event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian);
uint internal constant closeFactorMinMantissa = 0.05e18;
uint internal constant closeFactorMaxMantissa = 0.9e18;
uint internal constant collateralFactorMaxMantissa = 0.9e18;
constructor() public {
}
function getAssetsIn(address account) external view returns (CToken[] memory) {
}
function checkMembership(address account, CToken cToken) external view returns (bool) {
}
function enterMarkets(address[] memory cTokens) public returns (uint[] memory) {
}
function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) {
}
function exitMarket(address cTokenAddress) external returns (uint) {
}
function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) {
}
function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) {
}
function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) {
}
function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external {
}
function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) {
require(<FILL_ME>)
require(!borrowGuardianPaused[cToken], "BORROW_IS_PAUSED");
require(markets[cToken].isListed, "MARKET_NOT_LISTED");
if (!markets[cToken].accountMembership[borrower]) {
require(msg.sender == cToken, "SENDER_MUST_BE_CTOKEN");
Error err = addToMarketInternal(CToken(msg.sender), borrower);
require(err == Error.NO_ERROR, "ADD_TO_MARKET_FAIL");
assert(markets[cToken].accountMembership[borrower]);
}
require(oracle.getUnderlyingPrice(CToken(cToken)) != 0, "PRICE_ERROR");
uint borrowCap = borrowCaps[cToken];
if (borrowCap != 0) {
uint totalBorrows = CToken(cToken).totalBorrows();
uint nextTotalBorrows = add_(totalBorrows, borrowAmount);
require(nextTotalBorrows < borrowCap, "MARKET_BORROW_CAP_REACHED");
}
(Error err, , uint shortfall) = getHypotheticalAccountLiquidityInternal(borrower, CToken(cToken), 0, borrowAmount);
require(err == Error.NO_ERROR, "GET_HYPOTHETICAL_ACCOUNT_LIQUDITY_FAIL");
require(shortfall <= 0, "INSUFFICIENT_LIQUIDITY");
return uint(Error.NO_ERROR);
}
function repayBorrowAllowed(
address cToken,
address payer,
address borrower,
uint repayAmount) external returns (uint) {
}
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) external returns (uint) {
}
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external returns (uint) {
}
function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) {
}
struct AccountLiquidityLocalVars {
uint sumCollateral;
uint sumBorrowPlusEffects;
uint cTokenBalance;
uint borrowBalance;
uint exchangeRateMantissa;
uint oraclePriceMantissa;
Exp collateralFactor;
Exp exchangeRate;
Exp oraclePrice;
Exp tokensToDenom;
}
function getAccountLiquidity(address account) public view returns (uint, uint, uint) {
}
function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) {
}
function getHypotheticalAccountLiquidity(
address account,
address cTokenModify,
uint redeemTokens,
uint borrowAmount) public view returns (uint, uint, uint) {
}
function getHypotheticalAccountLiquidityInternal(
address account,
CToken cTokenModify,
uint redeemTokens,
uint borrowAmount) internal view returns (Error, uint, uint) {
}
function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) {
}
function _setPriceOracle(PriceOracle newOracle) public returns (uint) {
}
function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) {
}
function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) {
}
function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) {
}
function _supportMarket(CToken cToken) external returns (uint) {
}
function _addMarketInternal(address cToken) internal {
}
function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external {
}
function _setBorrowCapGuardian(address newBorrowCapGuardian) external {
}
function _setPauseGuardian(address newPauseGuardian) public returns (uint) {
}
function _setMintPaused(CToken cToken, bool state) public returns (bool) {
}
function _setBorrowPaused(CToken cToken, bool state) public returns (bool) {
}
function _setTransferPaused(bool state) public returns (bool) {
}
function _setSeizePaused(bool state) public returns (bool) {
}
function _setBorrowSeizePaused(bool state) public returns (bool) {
}
function adminOrInitializing() internal view returns (bool) {
}
function getAllMarkets() public view returns (CToken[] memory) {
}
function getBlockNumber() public view returns (uint) {
}
}
| !borrowSeizeGuardianPaused,"ALL_BORROW_IS_PAUSED" | 305,374 | !borrowSeizeGuardianPaused |
"BORROW_IS_PAUSED" | pragma solidity ^0.5.16;
import "./CToken.sol";
import "./ErrorReporter.sol";
import "./PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError {
event MarketListed(CToken cToken);
event MarketEntered(CToken cToken, address account);
event MarketExited(CToken cToken, address account);
event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa);
event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa);
event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa);
event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);
event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);
event ActionPaused(string action, bool pauseState);
event ActionPaused(CToken cToken, string action, bool pauseState);
event NewBorrowCap(CToken indexed cToken, uint newBorrowCap);
event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian);
uint internal constant closeFactorMinMantissa = 0.05e18;
uint internal constant closeFactorMaxMantissa = 0.9e18;
uint internal constant collateralFactorMaxMantissa = 0.9e18;
constructor() public {
}
function getAssetsIn(address account) external view returns (CToken[] memory) {
}
function checkMembership(address account, CToken cToken) external view returns (bool) {
}
function enterMarkets(address[] memory cTokens) public returns (uint[] memory) {
}
function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) {
}
function exitMarket(address cTokenAddress) external returns (uint) {
}
function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) {
}
function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) {
}
function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) {
}
function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external {
}
function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) {
require(!borrowSeizeGuardianPaused, "ALL_BORROW_IS_PAUSED");
require(<FILL_ME>)
require(markets[cToken].isListed, "MARKET_NOT_LISTED");
if (!markets[cToken].accountMembership[borrower]) {
require(msg.sender == cToken, "SENDER_MUST_BE_CTOKEN");
Error err = addToMarketInternal(CToken(msg.sender), borrower);
require(err == Error.NO_ERROR, "ADD_TO_MARKET_FAIL");
assert(markets[cToken].accountMembership[borrower]);
}
require(oracle.getUnderlyingPrice(CToken(cToken)) != 0, "PRICE_ERROR");
uint borrowCap = borrowCaps[cToken];
if (borrowCap != 0) {
uint totalBorrows = CToken(cToken).totalBorrows();
uint nextTotalBorrows = add_(totalBorrows, borrowAmount);
require(nextTotalBorrows < borrowCap, "MARKET_BORROW_CAP_REACHED");
}
(Error err, , uint shortfall) = getHypotheticalAccountLiquidityInternal(borrower, CToken(cToken), 0, borrowAmount);
require(err == Error.NO_ERROR, "GET_HYPOTHETICAL_ACCOUNT_LIQUDITY_FAIL");
require(shortfall <= 0, "INSUFFICIENT_LIQUIDITY");
return uint(Error.NO_ERROR);
}
function repayBorrowAllowed(
address cToken,
address payer,
address borrower,
uint repayAmount) external returns (uint) {
}
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) external returns (uint) {
}
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external returns (uint) {
}
function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) {
}
struct AccountLiquidityLocalVars {
uint sumCollateral;
uint sumBorrowPlusEffects;
uint cTokenBalance;
uint borrowBalance;
uint exchangeRateMantissa;
uint oraclePriceMantissa;
Exp collateralFactor;
Exp exchangeRate;
Exp oraclePrice;
Exp tokensToDenom;
}
function getAccountLiquidity(address account) public view returns (uint, uint, uint) {
}
function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) {
}
function getHypotheticalAccountLiquidity(
address account,
address cTokenModify,
uint redeemTokens,
uint borrowAmount) public view returns (uint, uint, uint) {
}
function getHypotheticalAccountLiquidityInternal(
address account,
CToken cTokenModify,
uint redeemTokens,
uint borrowAmount) internal view returns (Error, uint, uint) {
}
function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) {
}
function _setPriceOracle(PriceOracle newOracle) public returns (uint) {
}
function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) {
}
function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) {
}
function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) {
}
function _supportMarket(CToken cToken) external returns (uint) {
}
function _addMarketInternal(address cToken) internal {
}
function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external {
}
function _setBorrowCapGuardian(address newBorrowCapGuardian) external {
}
function _setPauseGuardian(address newPauseGuardian) public returns (uint) {
}
function _setMintPaused(CToken cToken, bool state) public returns (bool) {
}
function _setBorrowPaused(CToken cToken, bool state) public returns (bool) {
}
function _setTransferPaused(bool state) public returns (bool) {
}
function _setSeizePaused(bool state) public returns (bool) {
}
function _setBorrowSeizePaused(bool state) public returns (bool) {
}
function adminOrInitializing() internal view returns (bool) {
}
function getAllMarkets() public view returns (CToken[] memory) {
}
function getBlockNumber() public view returns (uint) {
}
}
| !borrowGuardianPaused[cToken],"BORROW_IS_PAUSED" | 305,374 | !borrowGuardianPaused[cToken] |
"PRICE_ERROR" | pragma solidity ^0.5.16;
import "./CToken.sol";
import "./ErrorReporter.sol";
import "./PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError {
event MarketListed(CToken cToken);
event MarketEntered(CToken cToken, address account);
event MarketExited(CToken cToken, address account);
event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa);
event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa);
event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa);
event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);
event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);
event ActionPaused(string action, bool pauseState);
event ActionPaused(CToken cToken, string action, bool pauseState);
event NewBorrowCap(CToken indexed cToken, uint newBorrowCap);
event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian);
uint internal constant closeFactorMinMantissa = 0.05e18;
uint internal constant closeFactorMaxMantissa = 0.9e18;
uint internal constant collateralFactorMaxMantissa = 0.9e18;
constructor() public {
}
function getAssetsIn(address account) external view returns (CToken[] memory) {
}
function checkMembership(address account, CToken cToken) external view returns (bool) {
}
function enterMarkets(address[] memory cTokens) public returns (uint[] memory) {
}
function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) {
}
function exitMarket(address cTokenAddress) external returns (uint) {
}
function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) {
}
function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) {
}
function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) {
}
function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external {
}
function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) {
require(!borrowSeizeGuardianPaused, "ALL_BORROW_IS_PAUSED");
require(!borrowGuardianPaused[cToken], "BORROW_IS_PAUSED");
require(markets[cToken].isListed, "MARKET_NOT_LISTED");
if (!markets[cToken].accountMembership[borrower]) {
require(msg.sender == cToken, "SENDER_MUST_BE_CTOKEN");
Error err = addToMarketInternal(CToken(msg.sender), borrower);
require(err == Error.NO_ERROR, "ADD_TO_MARKET_FAIL");
assert(markets[cToken].accountMembership[borrower]);
}
require(<FILL_ME>)
uint borrowCap = borrowCaps[cToken];
if (borrowCap != 0) {
uint totalBorrows = CToken(cToken).totalBorrows();
uint nextTotalBorrows = add_(totalBorrows, borrowAmount);
require(nextTotalBorrows < borrowCap, "MARKET_BORROW_CAP_REACHED");
}
(Error err, , uint shortfall) = getHypotheticalAccountLiquidityInternal(borrower, CToken(cToken), 0, borrowAmount);
require(err == Error.NO_ERROR, "GET_HYPOTHETICAL_ACCOUNT_LIQUDITY_FAIL");
require(shortfall <= 0, "INSUFFICIENT_LIQUIDITY");
return uint(Error.NO_ERROR);
}
function repayBorrowAllowed(
address cToken,
address payer,
address borrower,
uint repayAmount) external returns (uint) {
}
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) external returns (uint) {
}
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external returns (uint) {
}
function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) {
}
struct AccountLiquidityLocalVars {
uint sumCollateral;
uint sumBorrowPlusEffects;
uint cTokenBalance;
uint borrowBalance;
uint exchangeRateMantissa;
uint oraclePriceMantissa;
Exp collateralFactor;
Exp exchangeRate;
Exp oraclePrice;
Exp tokensToDenom;
}
function getAccountLiquidity(address account) public view returns (uint, uint, uint) {
}
function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) {
}
function getHypotheticalAccountLiquidity(
address account,
address cTokenModify,
uint redeemTokens,
uint borrowAmount) public view returns (uint, uint, uint) {
}
function getHypotheticalAccountLiquidityInternal(
address account,
CToken cTokenModify,
uint redeemTokens,
uint borrowAmount) internal view returns (Error, uint, uint) {
}
function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) {
}
function _setPriceOracle(PriceOracle newOracle) public returns (uint) {
}
function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) {
}
function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) {
}
function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) {
}
function _supportMarket(CToken cToken) external returns (uint) {
}
function _addMarketInternal(address cToken) internal {
}
function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external {
}
function _setBorrowCapGuardian(address newBorrowCapGuardian) external {
}
function _setPauseGuardian(address newPauseGuardian) public returns (uint) {
}
function _setMintPaused(CToken cToken, bool state) public returns (bool) {
}
function _setBorrowPaused(CToken cToken, bool state) public returns (bool) {
}
function _setTransferPaused(bool state) public returns (bool) {
}
function _setSeizePaused(bool state) public returns (bool) {
}
function _setBorrowSeizePaused(bool state) public returns (bool) {
}
function adminOrInitializing() internal view returns (bool) {
}
function getAllMarkets() public view returns (CToken[] memory) {
}
function getBlockNumber() public view returns (uint) {
}
}
| oracle.getUnderlyingPrice(CToken(cToken))!=0,"PRICE_ERROR" | 305,374 | oracle.getUnderlyingPrice(CToken(cToken))!=0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.