comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
null | pragma solidity ^0.4.23;
/**
* SafeMath <https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol/>
* Copyright (c) 2016 Smart Contract Solutions, Inc.
* Released under the MIT License (MIT)
*/
/// @title Math operations with safety checks
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) {
}
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 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 t o transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/// ERC Token Standard #20 Interface (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md)
interface IERC20 {
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
function totalSupply() external view returns (uint256);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
interface ISecurityToken {
/**
* @dev Add a verified address to the Security Token whitelist
* @param _whitelistAddress Address attempting to join ST whitelist
* @return bool success
*/
function addToWhitelist(address _whitelistAddress) public returns (bool success);
/**
* @dev Add verified addresses to the Security Token whitelist
* @param _whitelistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToWhitelistMulti(address[] _whitelistAddresses) external returns (bool success);
/**
* @dev Removes a previosly verified address to the Security Token blacklist
* @param _blacklistAddress Address being added to the blacklist
* @return bool success
*/
function addToBlacklist(address _blacklistAddress) public returns (bool success);
/**
* @dev Removes previously verified addresseses to the Security Token whitelist
* @param _blacklistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToBlacklistMulti(address[] _blacklistAddresses) external returns (bool success);
/// Get token decimals
function decimals() view external returns (uint);
// @notice it will return status of white listing
// @return true if user is white listed and false if is not
function isWhiteListed(address _user) external view returns (bool);
}
// The Exchange token
contract SecurityToken is IERC20, Ownable, ISecurityToken {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint public decimals; // How many decimals to show.
string public version;
uint public totalSupply;
uint public tokenPrice;
bool public exchangeEnabled;
bool public codeExportEnabled;
address public commissionAddress; // address to deposit commissions
uint public deploymentCost; // cost of deployment with exchange feature
uint public tokenOnlyDeploymentCost; // cost of deployment with basic ERC20 feature
uint public exchangeEnableCost; // cost of upgrading existing ERC20 to exchange feature
uint public codeExportCost; // cost of exporting the code
string public securityISIN;
// Security token shareholders
struct Shareholder { // Structure that contains the data of the shareholders
bool allowed; // allowed - whether the shareholder is allowed to transfer or recieve the security token
uint receivedAmt;
uint releasedAmt;
uint vestingDuration;
uint vestingCliff;
uint vestingStart;
}
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowed;
mapping(address => Shareholder) public shareholders; // Mapping that holds the data of the shareholder corresponding to investor address
modifier onlyWhitelisted(address _to) {
}
modifier onlyVested(address _from) {
}
// The Token constructor
constructor (
uint _initialSupply,
string _tokenName,
string _tokenSymbol,
uint _decimalUnits,
string _version,
uint _tokenPrice,
string _securityISIN
) public payable
{
}
event LogTransferSold(address indexed to, uint value);
event LogTokenExchangeEnabled(address indexed caller, uint exchangeCost);
event LogTokenExportEnabled(address indexed caller, uint enableCost);
event LogNewWhitelistedAddress( address indexed shareholder);
event LogNewBlacklistedAddress(address indexed shareholder);
event logVestingAllocation(address indexed shareholder, uint amount, uint duration, uint cliff, uint start);
event logISIN(string isin);
function updateISIN(string _securityISIN) external onlyOwner() {
}
function allocateVestedTokens(address _to, uint _value, uint _duration, uint _cliff, uint _vestingStart )
external onlyWhitelisted(_to) onlyOwner() returns (bool)
{
}
function availableAmount(address _from) public view returns (uint256) {
}
// @noice To be called by owner of the contract to enable exchange functionality
// @param _tokenPrice {uint} cost of token in ETH
// @return true {bool} if successful
function enableExchange(uint _tokenPrice) public payable {
}
// @notice to enable code export functionality
function enableCodeExport() public payable {
require(<FILL_ME>)
require(codeExportCost == msg.value);
codeExportEnabled = true;
commissionAddress.transfer(msg.value);
emit LogTokenExportEnabled(msg.sender, msg.value);
}
// @notice It will send tokens to sender based on the token price
function swapTokens() public payable onlyWhitelisted(msg.sender) {
}
// @notice will be able to mint tokens in the future
// @param _target {address} address to which new tokens will be assigned
// @parm _mintedAmount {uint256} amouont of tokens to mint
function mintToken(address _target, uint256 _mintedAmount) public onlyWhitelisted(_target) onlyOwner() {
}
// @notice transfer tokens to given address
// @param _to {address} address or recipient
// @param _value {uint} amount to transfer
// @return {bool} true if successful
function transfer(address _to, uint _value) external onlyVested(_to) onlyWhitelisted(_to) returns(bool) {
}
// @notice transfer tokens from given address to another address
// @param _from {address} from whom tokens are transferred
// @param _to {address} to whom tokens are transferred
// @param _value {uint} amount of tokens to transfer
// @return {bool} true if successful
function transferFrom(address _from, address _to, uint256 _value)
external onlyVested(_to) onlyWhitelisted(_to) returns(bool success) {
}
// @notice to query balance of account
// @return _owner {address} address of user to query balance
function balanceOf(address _owner) public view returns(uint balance) {
}
/**
* @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, uint _value) external returns(bool) {
}
// @notice to query of allowance of one user to the other
// @param _owner {address} of the owner of the account
// @param _spender {address} of the spender of the account
// @return remaining {uint} amount of remaining allowance
function allowance(address _owner, address _spender) external view returns(uint remaining) {
}
/**
* 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
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
/**
* @dev Add a verified address to the Security Token whitelist
* The Issuer can add an address to the whitelist by themselves by
* creating their own KYC provider and using it to verify the accounts
* they want to add to the whitelist.
* @param _whitelistAddress Address attempting to join ST whitelist
* @return bool success
*/
function addToWhitelist(address _whitelistAddress) onlyOwner public returns (bool success) {
}
/**
* @dev Add verified addresses to the Security Token whitelist
* @param _whitelistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToWhitelistMulti(address[] _whitelistAddresses) onlyOwner external returns (bool success) {
}
/**
* @dev Add a verified address to the Security Token blacklist
* @param _blacklistAddress Address being added to the blacklist
* @return bool success
*/
function addToBlacklist(address _blacklistAddress) onlyOwner public returns (bool success) {
}
/**
* @dev Removes previously verified addresseses to the Security Token whitelist
* @param _blacklistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToBlacklistMulti(address[] _blacklistAddresses) onlyOwner external returns (bool success) {
}
// @notice it will return status of white listing
// @return true if user is white listed and false if is not
function isWhiteListed(address _user) external view returns (bool) {
}
function totalSupply() external view returns (uint256) {
}
function decimals() external view returns (uint) {
}
}
| !codeExportEnabled | 35,831 | !codeExportEnabled |
null | pragma solidity ^0.4.23;
/**
* SafeMath <https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol/>
* Copyright (c) 2016 Smart Contract Solutions, Inc.
* Released under the MIT License (MIT)
*/
/// @title Math operations with safety checks
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) {
}
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 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 t o transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/// ERC Token Standard #20 Interface (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md)
interface IERC20 {
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
function totalSupply() external view returns (uint256);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
interface ISecurityToken {
/**
* @dev Add a verified address to the Security Token whitelist
* @param _whitelistAddress Address attempting to join ST whitelist
* @return bool success
*/
function addToWhitelist(address _whitelistAddress) public returns (bool success);
/**
* @dev Add verified addresses to the Security Token whitelist
* @param _whitelistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToWhitelistMulti(address[] _whitelistAddresses) external returns (bool success);
/**
* @dev Removes a previosly verified address to the Security Token blacklist
* @param _blacklistAddress Address being added to the blacklist
* @return bool success
*/
function addToBlacklist(address _blacklistAddress) public returns (bool success);
/**
* @dev Removes previously verified addresseses to the Security Token whitelist
* @param _blacklistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToBlacklistMulti(address[] _blacklistAddresses) external returns (bool success);
/// Get token decimals
function decimals() view external returns (uint);
// @notice it will return status of white listing
// @return true if user is white listed and false if is not
function isWhiteListed(address _user) external view returns (bool);
}
// The Exchange token
contract SecurityToken is IERC20, Ownable, ISecurityToken {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint public decimals; // How many decimals to show.
string public version;
uint public totalSupply;
uint public tokenPrice;
bool public exchangeEnabled;
bool public codeExportEnabled;
address public commissionAddress; // address to deposit commissions
uint public deploymentCost; // cost of deployment with exchange feature
uint public tokenOnlyDeploymentCost; // cost of deployment with basic ERC20 feature
uint public exchangeEnableCost; // cost of upgrading existing ERC20 to exchange feature
uint public codeExportCost; // cost of exporting the code
string public securityISIN;
// Security token shareholders
struct Shareholder { // Structure that contains the data of the shareholders
bool allowed; // allowed - whether the shareholder is allowed to transfer or recieve the security token
uint receivedAmt;
uint releasedAmt;
uint vestingDuration;
uint vestingCliff;
uint vestingStart;
}
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowed;
mapping(address => Shareholder) public shareholders; // Mapping that holds the data of the shareholder corresponding to investor address
modifier onlyWhitelisted(address _to) {
}
modifier onlyVested(address _from) {
}
// The Token constructor
constructor (
uint _initialSupply,
string _tokenName,
string _tokenSymbol,
uint _decimalUnits,
string _version,
uint _tokenPrice,
string _securityISIN
) public payable
{
}
event LogTransferSold(address indexed to, uint value);
event LogTokenExchangeEnabled(address indexed caller, uint exchangeCost);
event LogTokenExportEnabled(address indexed caller, uint enableCost);
event LogNewWhitelistedAddress( address indexed shareholder);
event LogNewBlacklistedAddress(address indexed shareholder);
event logVestingAllocation(address indexed shareholder, uint amount, uint duration, uint cliff, uint start);
event logISIN(string isin);
function updateISIN(string _securityISIN) external onlyOwner() {
}
function allocateVestedTokens(address _to, uint _value, uint _duration, uint _cliff, uint _vestingStart )
external onlyWhitelisted(_to) onlyOwner() returns (bool)
{
}
function availableAmount(address _from) public view returns (uint256) {
}
// @noice To be called by owner of the contract to enable exchange functionality
// @param _tokenPrice {uint} cost of token in ETH
// @return true {bool} if successful
function enableExchange(uint _tokenPrice) public payable {
}
// @notice to enable code export functionality
function enableCodeExport() public payable {
}
// @notice It will send tokens to sender based on the token price
function swapTokens() public payable onlyWhitelisted(msg.sender) {
require(exchangeEnabled);
uint tokensToSend;
tokensToSend = (msg.value * (10**decimals)) / tokenPrice;
require(<FILL_ME>)
balances[msg.sender] = balances[msg.sender].add(tokensToSend);
balances[owner] = balances[owner].sub(tokensToSend);
owner.transfer(msg.value);
emit Transfer(owner, msg.sender, tokensToSend);
emit LogTransferSold(msg.sender, tokensToSend);
}
// @notice will be able to mint tokens in the future
// @param _target {address} address to which new tokens will be assigned
// @parm _mintedAmount {uint256} amouont of tokens to mint
function mintToken(address _target, uint256 _mintedAmount) public onlyWhitelisted(_target) onlyOwner() {
}
// @notice transfer tokens to given address
// @param _to {address} address or recipient
// @param _value {uint} amount to transfer
// @return {bool} true if successful
function transfer(address _to, uint _value) external onlyVested(_to) onlyWhitelisted(_to) returns(bool) {
}
// @notice transfer tokens from given address to another address
// @param _from {address} from whom tokens are transferred
// @param _to {address} to whom tokens are transferred
// @param _value {uint} amount of tokens to transfer
// @return {bool} true if successful
function transferFrom(address _from, address _to, uint256 _value)
external onlyVested(_to) onlyWhitelisted(_to) returns(bool success) {
}
// @notice to query balance of account
// @return _owner {address} address of user to query balance
function balanceOf(address _owner) public view returns(uint balance) {
}
/**
* @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, uint _value) external returns(bool) {
}
// @notice to query of allowance of one user to the other
// @param _owner {address} of the owner of the account
// @param _spender {address} of the spender of the account
// @return remaining {uint} amount of remaining allowance
function allowance(address _owner, address _spender) external view returns(uint remaining) {
}
/**
* 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
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
/**
* @dev Add a verified address to the Security Token whitelist
* The Issuer can add an address to the whitelist by themselves by
* creating their own KYC provider and using it to verify the accounts
* they want to add to the whitelist.
* @param _whitelistAddress Address attempting to join ST whitelist
* @return bool success
*/
function addToWhitelist(address _whitelistAddress) onlyOwner public returns (bool success) {
}
/**
* @dev Add verified addresses to the Security Token whitelist
* @param _whitelistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToWhitelistMulti(address[] _whitelistAddresses) onlyOwner external returns (bool success) {
}
/**
* @dev Add a verified address to the Security Token blacklist
* @param _blacklistAddress Address being added to the blacklist
* @return bool success
*/
function addToBlacklist(address _blacklistAddress) onlyOwner public returns (bool success) {
}
/**
* @dev Removes previously verified addresseses to the Security Token whitelist
* @param _blacklistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToBlacklistMulti(address[] _blacklistAddresses) onlyOwner external returns (bool success) {
}
// @notice it will return status of white listing
// @return true if user is white listed and false if is not
function isWhiteListed(address _user) external view returns (bool) {
}
function totalSupply() external view returns (uint256) {
}
function decimals() external view returns (uint) {
}
}
| balances[owner]>=tokensToSend | 35,831 | balances[owner]>=tokensToSend |
null | pragma solidity ^0.4.23;
/**
* SafeMath <https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol/>
* Copyright (c) 2016 Smart Contract Solutions, Inc.
* Released under the MIT License (MIT)
*/
/// @title Math operations with safety checks
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) {
}
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 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 t o transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/// ERC Token Standard #20 Interface (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md)
interface IERC20 {
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
function totalSupply() external view returns (uint256);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
interface ISecurityToken {
/**
* @dev Add a verified address to the Security Token whitelist
* @param _whitelistAddress Address attempting to join ST whitelist
* @return bool success
*/
function addToWhitelist(address _whitelistAddress) public returns (bool success);
/**
* @dev Add verified addresses to the Security Token whitelist
* @param _whitelistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToWhitelistMulti(address[] _whitelistAddresses) external returns (bool success);
/**
* @dev Removes a previosly verified address to the Security Token blacklist
* @param _blacklistAddress Address being added to the blacklist
* @return bool success
*/
function addToBlacklist(address _blacklistAddress) public returns (bool success);
/**
* @dev Removes previously verified addresseses to the Security Token whitelist
* @param _blacklistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToBlacklistMulti(address[] _blacklistAddresses) external returns (bool success);
/// Get token decimals
function decimals() view external returns (uint);
// @notice it will return status of white listing
// @return true if user is white listed and false if is not
function isWhiteListed(address _user) external view returns (bool);
}
// The Exchange token
contract SecurityToken is IERC20, Ownable, ISecurityToken {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint public decimals; // How many decimals to show.
string public version;
uint public totalSupply;
uint public tokenPrice;
bool public exchangeEnabled;
bool public codeExportEnabled;
address public commissionAddress; // address to deposit commissions
uint public deploymentCost; // cost of deployment with exchange feature
uint public tokenOnlyDeploymentCost; // cost of deployment with basic ERC20 feature
uint public exchangeEnableCost; // cost of upgrading existing ERC20 to exchange feature
uint public codeExportCost; // cost of exporting the code
string public securityISIN;
// Security token shareholders
struct Shareholder { // Structure that contains the data of the shareholders
bool allowed; // allowed - whether the shareholder is allowed to transfer or recieve the security token
uint receivedAmt;
uint releasedAmt;
uint vestingDuration;
uint vestingCliff;
uint vestingStart;
}
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowed;
mapping(address => Shareholder) public shareholders; // Mapping that holds the data of the shareholder corresponding to investor address
modifier onlyWhitelisted(address _to) {
}
modifier onlyVested(address _from) {
}
// The Token constructor
constructor (
uint _initialSupply,
string _tokenName,
string _tokenSymbol,
uint _decimalUnits,
string _version,
uint _tokenPrice,
string _securityISIN
) public payable
{
}
event LogTransferSold(address indexed to, uint value);
event LogTokenExchangeEnabled(address indexed caller, uint exchangeCost);
event LogTokenExportEnabled(address indexed caller, uint enableCost);
event LogNewWhitelistedAddress( address indexed shareholder);
event LogNewBlacklistedAddress(address indexed shareholder);
event logVestingAllocation(address indexed shareholder, uint amount, uint duration, uint cliff, uint start);
event logISIN(string isin);
function updateISIN(string _securityISIN) external onlyOwner() {
}
function allocateVestedTokens(address _to, uint _value, uint _duration, uint _cliff, uint _vestingStart )
external onlyWhitelisted(_to) onlyOwner() returns (bool)
{
}
function availableAmount(address _from) public view returns (uint256) {
}
// @noice To be called by owner of the contract to enable exchange functionality
// @param _tokenPrice {uint} cost of token in ETH
// @return true {bool} if successful
function enableExchange(uint _tokenPrice) public payable {
}
// @notice to enable code export functionality
function enableCodeExport() public payable {
}
// @notice It will send tokens to sender based on the token price
function swapTokens() public payable onlyWhitelisted(msg.sender) {
}
// @notice will be able to mint tokens in the future
// @param _target {address} address to which new tokens will be assigned
// @parm _mintedAmount {uint256} amouont of tokens to mint
function mintToken(address _target, uint256 _mintedAmount) public onlyWhitelisted(_target) onlyOwner() {
}
// @notice transfer tokens to given address
// @param _to {address} address or recipient
// @param _value {uint} amount to transfer
// @return {bool} true if successful
function transfer(address _to, uint _value) external onlyVested(_to) onlyWhitelisted(_to) returns(bool) {
}
// @notice transfer tokens from given address to another address
// @param _from {address} from whom tokens are transferred
// @param _to {address} to whom tokens are transferred
// @param _value {uint} amount of tokens to transfer
// @return {bool} true if successful
function transferFrom(address _from, address _to, uint256 _value)
external onlyVested(_to) onlyWhitelisted(_to) returns(bool success) {
}
// @notice to query balance of account
// @return _owner {address} address of user to query balance
function balanceOf(address _owner) public view returns(uint balance) {
}
/**
* @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, uint _value) external returns(bool) {
}
// @notice to query of allowance of one user to the other
// @param _owner {address} of the owner of the account
// @param _spender {address} of the spender of the account
// @return remaining {uint} amount of remaining allowance
function allowance(address _owner, address _spender) external view returns(uint remaining) {
}
/**
* 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
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
/**
* @dev Add a verified address to the Security Token whitelist
* The Issuer can add an address to the whitelist by themselves by
* creating their own KYC provider and using it to verify the accounts
* they want to add to the whitelist.
* @param _whitelistAddress Address attempting to join ST whitelist
* @return bool success
*/
function addToWhitelist(address _whitelistAddress) onlyOwner public returns (bool success) {
}
/**
* @dev Add verified addresses to the Security Token whitelist
* @param _whitelistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToWhitelistMulti(address[] _whitelistAddresses) onlyOwner external returns (bool success) {
}
/**
* @dev Add a verified address to the Security Token blacklist
* @param _blacklistAddress Address being added to the blacklist
* @return bool success
*/
function addToBlacklist(address _blacklistAddress) onlyOwner public returns (bool success) {
require(<FILL_ME>)
shareholders[_blacklistAddress].allowed = false;
emit LogNewBlacklistedAddress(_blacklistAddress);
return true;
}
/**
* @dev Removes previously verified addresseses to the Security Token whitelist
* @param _blacklistAddresses Array of addresses attempting to join ST whitelist
* @return bool success
*/
function addToBlacklistMulti(address[] _blacklistAddresses) onlyOwner external returns (bool success) {
}
// @notice it will return status of white listing
// @return true if user is white listed and false if is not
function isWhiteListed(address _user) external view returns (bool) {
}
function totalSupply() external view returns (uint256) {
}
function decimals() external view returns (uint) {
}
}
| shareholders[_blacklistAddress].allowed | 35,831 | shareholders[_blacklistAddress].allowed |
"Liquidity generation grace period still ongoing" | // but thanks a million Gwei to MIT and Zeppelin. You guys rock!!!
// MAINNET VERSION.
pragma solidity >=0.6.0;
contract Corlibri_Token is ERC20 {
using SafeMath for uint256;
using Address for address;
event LiquidityAddition(address indexed dst, uint value);
event LPTokenClaimed(address dst, uint value);
//ERC20
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 public constant initialSupply = 25000*1e18; // 25k
//timeStamps
uint256 public contractInitialized;
uint256 public contractStart_Timestamp;
uint256 public LGECompleted_Timestamp;
uint256 public constant contributionPhase = 7 days;
uint256 public constant stackingPhase = 1 hours;
uint256 public constant emergencyPeriod = 4 days;
//Tokenomics
uint256 public totalLPTokensMinted;
uint256 public totalETHContributed;
uint256 public LPperETHUnit;
mapping (address => uint) public ethContributed;
uint256 public constant individualCap = 10*1e18; // 10 ETH cap per address for LGE
uint256 public constant totalCap = 750*1e18; // 750 ETH cap total for LGE
//Ecosystem
address public UniswapPair;
address public wUNIv2;
address public Vault;
IUniswapV2Router02 public uniswapRouterV2;
IUniswapV2Factory public uniswapFactory;
//=========================================================================================================================================
constructor() ERC20("Corlibri", "CORLIBRI") public {
}
function initialSetup() public governanceLevel(2) {
}
//Pool UniSwap pair creation method (called by initialSetup() )
function POOL_CreateUniswapPair(address router, address factory) internal returns (address) {
}
/* Once initialSetup has been invoked
* Team will create the Vault and the LP wrapper token
*
* Only AFTER these 2 addresses have been created the users
* can start contributing in ETH
*/
function secondarySetup(address _Vault, address _wUNIv2) public governanceLevel(2) {
}
//=========================================================================================================================================
/* Liquidity generation logic
* Steps - All tokens that will ever exist go to this contract
*
* This contract accepts ETH as payable
* ETH is mapped to people
*
* When liquidity generation event is over
* everyone can call the mint LP function.
*
* which will put all the ETH and tokens inside the uniswap contract
* without any involvement
*
* This LP will go into this contract
* And will be able to proportionally be withdrawn based on ETH put in
*
* emergency drain function allows the contract owner to drain all ETH and tokens from this contract
* After the liquidity generation event happened. In case something goes wrong, to send ETH back
*/
string public liquidityGenerationParticipationAgreement = "I agree that the developers and affiliated parties of the Corlibri team are not responsible for my funds";
/* @dev List of modifiers used to differentiate the project phases
* ETH_ContributionPhase lets users send ETH to the token contract
* LGP_possible triggers after the contributionPhase duration
* Trading_Possible: this modifiers prevent Corlibri _transfer right
* after the LGE. It gives time for contributors to stake their
* tokens before fees are generated.
*/
modifier ETH_ContributionPhase() {
}
/* if totalETHContributed is bigger than 99% of the cap
* the LGE can happen (allows the LGE to happen sooner if needed)
* otherwise (ETHcontributed < 99% totalCap), time contraint applies
*/
modifier LGE_Possible() {
}
modifier LGE_happened() {
}
//UniSwap Cuck Machine: Blocks Uniswap Trades for a certain period, allowing users to claim and stake NECTAR
modifier Trading_Possible() {
}
//=========================================================================================================================================
// Emergency drain in case of a bug
function emergencyDrain24hAfterLiquidityGenerationEventIsDone() public governanceLevel(2) {
require(contractStart_Timestamp > 0, "Requires contractTimestamp > 0");
require(<FILL_ME>) // About 24h after liquidity generation happens
(bool success, ) = msg.sender.call{value:(address(this).balance)}("");
require(success, "ETH Transfer failed... we are cucked");
ERC20._transfer(address(this), msg.sender, balanceOf(address(this)));
}
//During ETH_ContributionPhase: Users deposit funds
//funds sent to TOKEN contract.
function USER_PledgeLiquidity(bool agreesToTermsOutlinedInLiquidityGenerationParticipationAgreement) public payable ETH_ContributionPhase {
}
function USER_UNPledgeLiquidity() public ETH_ContributionPhase {
}
// After ETH_ContributionPhase: Pool can create liquidity.
// Vault and wrapped UNIv2 contracts need to be setup in advance.
function POOL_CreateLiquidity() public LGE_Possible {
}
//After ETH_ContributionPhase: Pool can create liquidity.
function USER_ClaimWrappedLiquidity() public LGE_happened {
}
//=========================================================================================================================================
//overriden _transfer to take Fees
function _transfer(address sender, address recipient, uint256 amount) internal override Trading_Possible {
}
//=========================================================================================================================================
//FEE_APPROVER (now included into the token code)
mapping (address => bool) public noFeeList;
function calculateAmountAndFee(address sender, uint256 amount) public view returns (uint256 netAmount, uint256 fee){
}
//=========================================================================================================================================
//Governance
/**
* @dev multi tiered governance logic
*
* 0: plebs
* 1: voting contracts (setup later in DAO)
* 2: governors
*
*/
mapping(address => uint8) public governanceLevels;
modifier governanceLevel(uint8 _level){
}
function setGovernanceLevel(address _address, uint8 _level) public governanceLevel(_level) {
}
function viewGovernanceLevel(address _address) public view returns(uint8) {
}
//== Governable Functions
//External variables
function setUniswapPair(address _UniswapPair) public governanceLevel(2) {
}
function setVault(address _Vault) public governanceLevel(2) {
}
/* @dev :allows to upgrade the wrapper
* future devs will allow the wrapper to read live prices
* of liquidity tokens and to mint an Universal wrapper
* wrapping ANY UNIv2 LP token into their equivalent in
* wrappedLP tokens, based on the wrapped asset price.
*/
function setwUNIv2(address _wrapper) public governanceLevel(2) {
}
//burns tokens from the contract (holding them)
function burnToken(uint256 amount) public governanceLevel(1) {
}
//Fees
uint256 public buyFee; uint256 public sellFee;
function setBuySellFees(uint256 _buyFee, uint256 _sellFee) public governanceLevel(1) {
}
function setNoFeeList(address _address, bool _bool) public governanceLevel(1) {
}
//wrapper contract
function setPublicWrappingRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
//==Getters
function viewUNIv2() public view returns(address){
}
function viewWrappedUNIv2() public view returns(address){
}
function viewVault() public view returns(address){
}
//=experimental
uint256 private uniBurnRatio;
function setUniBurnRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
function viewUniBurnRatio() public view returns(uint256) {
}
function burnFromUni(uint256 _amount) external {
}
}
| contractStart_Timestamp.add(emergencyPeriod)<block.timestamp,"Liquidity generation grace period still ongoing" | 35,838 | contractStart_Timestamp.add(emergencyPeriod)<block.timestamp |
"max 10ETH contribution per address" | // but thanks a million Gwei to MIT and Zeppelin. You guys rock!!!
// MAINNET VERSION.
pragma solidity >=0.6.0;
contract Corlibri_Token is ERC20 {
using SafeMath for uint256;
using Address for address;
event LiquidityAddition(address indexed dst, uint value);
event LPTokenClaimed(address dst, uint value);
//ERC20
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 public constant initialSupply = 25000*1e18; // 25k
//timeStamps
uint256 public contractInitialized;
uint256 public contractStart_Timestamp;
uint256 public LGECompleted_Timestamp;
uint256 public constant contributionPhase = 7 days;
uint256 public constant stackingPhase = 1 hours;
uint256 public constant emergencyPeriod = 4 days;
//Tokenomics
uint256 public totalLPTokensMinted;
uint256 public totalETHContributed;
uint256 public LPperETHUnit;
mapping (address => uint) public ethContributed;
uint256 public constant individualCap = 10*1e18; // 10 ETH cap per address for LGE
uint256 public constant totalCap = 750*1e18; // 750 ETH cap total for LGE
//Ecosystem
address public UniswapPair;
address public wUNIv2;
address public Vault;
IUniswapV2Router02 public uniswapRouterV2;
IUniswapV2Factory public uniswapFactory;
//=========================================================================================================================================
constructor() ERC20("Corlibri", "CORLIBRI") public {
}
function initialSetup() public governanceLevel(2) {
}
//Pool UniSwap pair creation method (called by initialSetup() )
function POOL_CreateUniswapPair(address router, address factory) internal returns (address) {
}
/* Once initialSetup has been invoked
* Team will create the Vault and the LP wrapper token
*
* Only AFTER these 2 addresses have been created the users
* can start contributing in ETH
*/
function secondarySetup(address _Vault, address _wUNIv2) public governanceLevel(2) {
}
//=========================================================================================================================================
/* Liquidity generation logic
* Steps - All tokens that will ever exist go to this contract
*
* This contract accepts ETH as payable
* ETH is mapped to people
*
* When liquidity generation event is over
* everyone can call the mint LP function.
*
* which will put all the ETH and tokens inside the uniswap contract
* without any involvement
*
* This LP will go into this contract
* And will be able to proportionally be withdrawn based on ETH put in
*
* emergency drain function allows the contract owner to drain all ETH and tokens from this contract
* After the liquidity generation event happened. In case something goes wrong, to send ETH back
*/
string public liquidityGenerationParticipationAgreement = "I agree that the developers and affiliated parties of the Corlibri team are not responsible for my funds";
/* @dev List of modifiers used to differentiate the project phases
* ETH_ContributionPhase lets users send ETH to the token contract
* LGP_possible triggers after the contributionPhase duration
* Trading_Possible: this modifiers prevent Corlibri _transfer right
* after the LGE. It gives time for contributors to stake their
* tokens before fees are generated.
*/
modifier ETH_ContributionPhase() {
}
/* if totalETHContributed is bigger than 99% of the cap
* the LGE can happen (allows the LGE to happen sooner if needed)
* otherwise (ETHcontributed < 99% totalCap), time contraint applies
*/
modifier LGE_Possible() {
}
modifier LGE_happened() {
}
//UniSwap Cuck Machine: Blocks Uniswap Trades for a certain period, allowing users to claim and stake NECTAR
modifier Trading_Possible() {
}
//=========================================================================================================================================
// Emergency drain in case of a bug
function emergencyDrain24hAfterLiquidityGenerationEventIsDone() public governanceLevel(2) {
}
//During ETH_ContributionPhase: Users deposit funds
//funds sent to TOKEN contract.
function USER_PledgeLiquidity(bool agreesToTermsOutlinedInLiquidityGenerationParticipationAgreement) public payable ETH_ContributionPhase {
require(<FILL_ME>)
require(totalETHContributed.add(msg.value) <= totalCap, "750 ETH Hard cap");
require(agreesToTermsOutlinedInLiquidityGenerationParticipationAgreement, "No agreement provided");
ethContributed[msg.sender] = ethContributed[msg.sender].add(msg.value);
totalETHContributed = totalETHContributed.add(msg.value); // for front end display during LGE
emit LiquidityAddition(msg.sender, msg.value);
}
function USER_UNPledgeLiquidity() public ETH_ContributionPhase {
}
// After ETH_ContributionPhase: Pool can create liquidity.
// Vault and wrapped UNIv2 contracts need to be setup in advance.
function POOL_CreateLiquidity() public LGE_Possible {
}
//After ETH_ContributionPhase: Pool can create liquidity.
function USER_ClaimWrappedLiquidity() public LGE_happened {
}
//=========================================================================================================================================
//overriden _transfer to take Fees
function _transfer(address sender, address recipient, uint256 amount) internal override Trading_Possible {
}
//=========================================================================================================================================
//FEE_APPROVER (now included into the token code)
mapping (address => bool) public noFeeList;
function calculateAmountAndFee(address sender, uint256 amount) public view returns (uint256 netAmount, uint256 fee){
}
//=========================================================================================================================================
//Governance
/**
* @dev multi tiered governance logic
*
* 0: plebs
* 1: voting contracts (setup later in DAO)
* 2: governors
*
*/
mapping(address => uint8) public governanceLevels;
modifier governanceLevel(uint8 _level){
}
function setGovernanceLevel(address _address, uint8 _level) public governanceLevel(_level) {
}
function viewGovernanceLevel(address _address) public view returns(uint8) {
}
//== Governable Functions
//External variables
function setUniswapPair(address _UniswapPair) public governanceLevel(2) {
}
function setVault(address _Vault) public governanceLevel(2) {
}
/* @dev :allows to upgrade the wrapper
* future devs will allow the wrapper to read live prices
* of liquidity tokens and to mint an Universal wrapper
* wrapping ANY UNIv2 LP token into their equivalent in
* wrappedLP tokens, based on the wrapped asset price.
*/
function setwUNIv2(address _wrapper) public governanceLevel(2) {
}
//burns tokens from the contract (holding them)
function burnToken(uint256 amount) public governanceLevel(1) {
}
//Fees
uint256 public buyFee; uint256 public sellFee;
function setBuySellFees(uint256 _buyFee, uint256 _sellFee) public governanceLevel(1) {
}
function setNoFeeList(address _address, bool _bool) public governanceLevel(1) {
}
//wrapper contract
function setPublicWrappingRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
//==Getters
function viewUNIv2() public view returns(address){
}
function viewWrappedUNIv2() public view returns(address){
}
function viewVault() public view returns(address){
}
//=experimental
uint256 private uniBurnRatio;
function setUniBurnRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
function viewUniBurnRatio() public view returns(uint256) {
}
function burnFromUni(uint256 _amount) external {
}
}
| ethContributed[msg.sender].add(msg.value)<=individualCap,"max 10ETH contribution per address" | 35,838 | ethContributed[msg.sender].add(msg.value)<=individualCap |
"750 ETH Hard cap" | // but thanks a million Gwei to MIT and Zeppelin. You guys rock!!!
// MAINNET VERSION.
pragma solidity >=0.6.0;
contract Corlibri_Token is ERC20 {
using SafeMath for uint256;
using Address for address;
event LiquidityAddition(address indexed dst, uint value);
event LPTokenClaimed(address dst, uint value);
//ERC20
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 public constant initialSupply = 25000*1e18; // 25k
//timeStamps
uint256 public contractInitialized;
uint256 public contractStart_Timestamp;
uint256 public LGECompleted_Timestamp;
uint256 public constant contributionPhase = 7 days;
uint256 public constant stackingPhase = 1 hours;
uint256 public constant emergencyPeriod = 4 days;
//Tokenomics
uint256 public totalLPTokensMinted;
uint256 public totalETHContributed;
uint256 public LPperETHUnit;
mapping (address => uint) public ethContributed;
uint256 public constant individualCap = 10*1e18; // 10 ETH cap per address for LGE
uint256 public constant totalCap = 750*1e18; // 750 ETH cap total for LGE
//Ecosystem
address public UniswapPair;
address public wUNIv2;
address public Vault;
IUniswapV2Router02 public uniswapRouterV2;
IUniswapV2Factory public uniswapFactory;
//=========================================================================================================================================
constructor() ERC20("Corlibri", "CORLIBRI") public {
}
function initialSetup() public governanceLevel(2) {
}
//Pool UniSwap pair creation method (called by initialSetup() )
function POOL_CreateUniswapPair(address router, address factory) internal returns (address) {
}
/* Once initialSetup has been invoked
* Team will create the Vault and the LP wrapper token
*
* Only AFTER these 2 addresses have been created the users
* can start contributing in ETH
*/
function secondarySetup(address _Vault, address _wUNIv2) public governanceLevel(2) {
}
//=========================================================================================================================================
/* Liquidity generation logic
* Steps - All tokens that will ever exist go to this contract
*
* This contract accepts ETH as payable
* ETH is mapped to people
*
* When liquidity generation event is over
* everyone can call the mint LP function.
*
* which will put all the ETH and tokens inside the uniswap contract
* without any involvement
*
* This LP will go into this contract
* And will be able to proportionally be withdrawn based on ETH put in
*
* emergency drain function allows the contract owner to drain all ETH and tokens from this contract
* After the liquidity generation event happened. In case something goes wrong, to send ETH back
*/
string public liquidityGenerationParticipationAgreement = "I agree that the developers and affiliated parties of the Corlibri team are not responsible for my funds";
/* @dev List of modifiers used to differentiate the project phases
* ETH_ContributionPhase lets users send ETH to the token contract
* LGP_possible triggers after the contributionPhase duration
* Trading_Possible: this modifiers prevent Corlibri _transfer right
* after the LGE. It gives time for contributors to stake their
* tokens before fees are generated.
*/
modifier ETH_ContributionPhase() {
}
/* if totalETHContributed is bigger than 99% of the cap
* the LGE can happen (allows the LGE to happen sooner if needed)
* otherwise (ETHcontributed < 99% totalCap), time contraint applies
*/
modifier LGE_Possible() {
}
modifier LGE_happened() {
}
//UniSwap Cuck Machine: Blocks Uniswap Trades for a certain period, allowing users to claim and stake NECTAR
modifier Trading_Possible() {
}
//=========================================================================================================================================
// Emergency drain in case of a bug
function emergencyDrain24hAfterLiquidityGenerationEventIsDone() public governanceLevel(2) {
}
//During ETH_ContributionPhase: Users deposit funds
//funds sent to TOKEN contract.
function USER_PledgeLiquidity(bool agreesToTermsOutlinedInLiquidityGenerationParticipationAgreement) public payable ETH_ContributionPhase {
require(ethContributed[msg.sender].add(msg.value) <= individualCap, "max 10ETH contribution per address");
require(<FILL_ME>)
require(agreesToTermsOutlinedInLiquidityGenerationParticipationAgreement, "No agreement provided");
ethContributed[msg.sender] = ethContributed[msg.sender].add(msg.value);
totalETHContributed = totalETHContributed.add(msg.value); // for front end display during LGE
emit LiquidityAddition(msg.sender, msg.value);
}
function USER_UNPledgeLiquidity() public ETH_ContributionPhase {
}
// After ETH_ContributionPhase: Pool can create liquidity.
// Vault and wrapped UNIv2 contracts need to be setup in advance.
function POOL_CreateLiquidity() public LGE_Possible {
}
//After ETH_ContributionPhase: Pool can create liquidity.
function USER_ClaimWrappedLiquidity() public LGE_happened {
}
//=========================================================================================================================================
//overriden _transfer to take Fees
function _transfer(address sender, address recipient, uint256 amount) internal override Trading_Possible {
}
//=========================================================================================================================================
//FEE_APPROVER (now included into the token code)
mapping (address => bool) public noFeeList;
function calculateAmountAndFee(address sender, uint256 amount) public view returns (uint256 netAmount, uint256 fee){
}
//=========================================================================================================================================
//Governance
/**
* @dev multi tiered governance logic
*
* 0: plebs
* 1: voting contracts (setup later in DAO)
* 2: governors
*
*/
mapping(address => uint8) public governanceLevels;
modifier governanceLevel(uint8 _level){
}
function setGovernanceLevel(address _address, uint8 _level) public governanceLevel(_level) {
}
function viewGovernanceLevel(address _address) public view returns(uint8) {
}
//== Governable Functions
//External variables
function setUniswapPair(address _UniswapPair) public governanceLevel(2) {
}
function setVault(address _Vault) public governanceLevel(2) {
}
/* @dev :allows to upgrade the wrapper
* future devs will allow the wrapper to read live prices
* of liquidity tokens and to mint an Universal wrapper
* wrapping ANY UNIv2 LP token into their equivalent in
* wrappedLP tokens, based on the wrapped asset price.
*/
function setwUNIv2(address _wrapper) public governanceLevel(2) {
}
//burns tokens from the contract (holding them)
function burnToken(uint256 amount) public governanceLevel(1) {
}
//Fees
uint256 public buyFee; uint256 public sellFee;
function setBuySellFees(uint256 _buyFee, uint256 _sellFee) public governanceLevel(1) {
}
function setNoFeeList(address _address, bool _bool) public governanceLevel(1) {
}
//wrapper contract
function setPublicWrappingRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
//==Getters
function viewUNIv2() public view returns(address){
}
function viewWrappedUNIv2() public view returns(address){
}
function viewVault() public view returns(address){
}
//=experimental
uint256 private uniBurnRatio;
function setUniBurnRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
function viewUniBurnRatio() public view returns(uint256) {
}
function burnFromUni(uint256 _amount) external {
}
}
| totalETHContributed.add(msg.value)<=totalCap,"750 ETH Hard cap" | 35,838 | totalETHContributed.add(msg.value)<=totalCap |
"Nothing to claim, move along" | // but thanks a million Gwei to MIT and Zeppelin. You guys rock!!!
// MAINNET VERSION.
pragma solidity >=0.6.0;
contract Corlibri_Token is ERC20 {
using SafeMath for uint256;
using Address for address;
event LiquidityAddition(address indexed dst, uint value);
event LPTokenClaimed(address dst, uint value);
//ERC20
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 public constant initialSupply = 25000*1e18; // 25k
//timeStamps
uint256 public contractInitialized;
uint256 public contractStart_Timestamp;
uint256 public LGECompleted_Timestamp;
uint256 public constant contributionPhase = 7 days;
uint256 public constant stackingPhase = 1 hours;
uint256 public constant emergencyPeriod = 4 days;
//Tokenomics
uint256 public totalLPTokensMinted;
uint256 public totalETHContributed;
uint256 public LPperETHUnit;
mapping (address => uint) public ethContributed;
uint256 public constant individualCap = 10*1e18; // 10 ETH cap per address for LGE
uint256 public constant totalCap = 750*1e18; // 750 ETH cap total for LGE
//Ecosystem
address public UniswapPair;
address public wUNIv2;
address public Vault;
IUniswapV2Router02 public uniswapRouterV2;
IUniswapV2Factory public uniswapFactory;
//=========================================================================================================================================
constructor() ERC20("Corlibri", "CORLIBRI") public {
}
function initialSetup() public governanceLevel(2) {
}
//Pool UniSwap pair creation method (called by initialSetup() )
function POOL_CreateUniswapPair(address router, address factory) internal returns (address) {
}
/* Once initialSetup has been invoked
* Team will create the Vault and the LP wrapper token
*
* Only AFTER these 2 addresses have been created the users
* can start contributing in ETH
*/
function secondarySetup(address _Vault, address _wUNIv2) public governanceLevel(2) {
}
//=========================================================================================================================================
/* Liquidity generation logic
* Steps - All tokens that will ever exist go to this contract
*
* This contract accepts ETH as payable
* ETH is mapped to people
*
* When liquidity generation event is over
* everyone can call the mint LP function.
*
* which will put all the ETH and tokens inside the uniswap contract
* without any involvement
*
* This LP will go into this contract
* And will be able to proportionally be withdrawn based on ETH put in
*
* emergency drain function allows the contract owner to drain all ETH and tokens from this contract
* After the liquidity generation event happened. In case something goes wrong, to send ETH back
*/
string public liquidityGenerationParticipationAgreement = "I agree that the developers and affiliated parties of the Corlibri team are not responsible for my funds";
/* @dev List of modifiers used to differentiate the project phases
* ETH_ContributionPhase lets users send ETH to the token contract
* LGP_possible triggers after the contributionPhase duration
* Trading_Possible: this modifiers prevent Corlibri _transfer right
* after the LGE. It gives time for contributors to stake their
* tokens before fees are generated.
*/
modifier ETH_ContributionPhase() {
}
/* if totalETHContributed is bigger than 99% of the cap
* the LGE can happen (allows the LGE to happen sooner if needed)
* otherwise (ETHcontributed < 99% totalCap), time contraint applies
*/
modifier LGE_Possible() {
}
modifier LGE_happened() {
}
//UniSwap Cuck Machine: Blocks Uniswap Trades for a certain period, allowing users to claim and stake NECTAR
modifier Trading_Possible() {
}
//=========================================================================================================================================
// Emergency drain in case of a bug
function emergencyDrain24hAfterLiquidityGenerationEventIsDone() public governanceLevel(2) {
}
//During ETH_ContributionPhase: Users deposit funds
//funds sent to TOKEN contract.
function USER_PledgeLiquidity(bool agreesToTermsOutlinedInLiquidityGenerationParticipationAgreement) public payable ETH_ContributionPhase {
}
function USER_UNPledgeLiquidity() public ETH_ContributionPhase {
}
// After ETH_ContributionPhase: Pool can create liquidity.
// Vault and wrapped UNIv2 contracts need to be setup in advance.
function POOL_CreateLiquidity() public LGE_Possible {
}
//After ETH_ContributionPhase: Pool can create liquidity.
function USER_ClaimWrappedLiquidity() public LGE_happened {
require(<FILL_ME>)
uint256 amountLPToTransfer = ethContributed[msg.sender].mul(LPperETHUnit).div(1e18);
INectar(wUNIv2).wTransfer(msg.sender, amountLPToTransfer); // stored as 1e18x value for change
ethContributed[msg.sender] = 0;
emit LPTokenClaimed(msg.sender, amountLPToTransfer);
}
//=========================================================================================================================================
//overriden _transfer to take Fees
function _transfer(address sender, address recipient, uint256 amount) internal override Trading_Possible {
}
//=========================================================================================================================================
//FEE_APPROVER (now included into the token code)
mapping (address => bool) public noFeeList;
function calculateAmountAndFee(address sender, uint256 amount) public view returns (uint256 netAmount, uint256 fee){
}
//=========================================================================================================================================
//Governance
/**
* @dev multi tiered governance logic
*
* 0: plebs
* 1: voting contracts (setup later in DAO)
* 2: governors
*
*/
mapping(address => uint8) public governanceLevels;
modifier governanceLevel(uint8 _level){
}
function setGovernanceLevel(address _address, uint8 _level) public governanceLevel(_level) {
}
function viewGovernanceLevel(address _address) public view returns(uint8) {
}
//== Governable Functions
//External variables
function setUniswapPair(address _UniswapPair) public governanceLevel(2) {
}
function setVault(address _Vault) public governanceLevel(2) {
}
/* @dev :allows to upgrade the wrapper
* future devs will allow the wrapper to read live prices
* of liquidity tokens and to mint an Universal wrapper
* wrapping ANY UNIv2 LP token into their equivalent in
* wrappedLP tokens, based on the wrapped asset price.
*/
function setwUNIv2(address _wrapper) public governanceLevel(2) {
}
//burns tokens from the contract (holding them)
function burnToken(uint256 amount) public governanceLevel(1) {
}
//Fees
uint256 public buyFee; uint256 public sellFee;
function setBuySellFees(uint256 _buyFee, uint256 _sellFee) public governanceLevel(1) {
}
function setNoFeeList(address _address, bool _bool) public governanceLevel(1) {
}
//wrapper contract
function setPublicWrappingRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
//==Getters
function viewUNIv2() public view returns(address){
}
function viewWrappedUNIv2() public view returns(address){
}
function viewVault() public view returns(address){
}
//=experimental
uint256 private uniBurnRatio;
function setUniBurnRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
function viewUniBurnRatio() public view returns(uint256) {
}
function burnFromUni(uint256 _amount) external {
}
}
| ethContributed[msg.sender]>0,"Nothing to claim, move along" | 35,838 | ethContributed[msg.sender]>0 |
"Grow some mustache kiddo..." | // but thanks a million Gwei to MIT and Zeppelin. You guys rock!!!
// MAINNET VERSION.
pragma solidity >=0.6.0;
contract Corlibri_Token is ERC20 {
using SafeMath for uint256;
using Address for address;
event LiquidityAddition(address indexed dst, uint value);
event LPTokenClaimed(address dst, uint value);
//ERC20
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 public constant initialSupply = 25000*1e18; // 25k
//timeStamps
uint256 public contractInitialized;
uint256 public contractStart_Timestamp;
uint256 public LGECompleted_Timestamp;
uint256 public constant contributionPhase = 7 days;
uint256 public constant stackingPhase = 1 hours;
uint256 public constant emergencyPeriod = 4 days;
//Tokenomics
uint256 public totalLPTokensMinted;
uint256 public totalETHContributed;
uint256 public LPperETHUnit;
mapping (address => uint) public ethContributed;
uint256 public constant individualCap = 10*1e18; // 10 ETH cap per address for LGE
uint256 public constant totalCap = 750*1e18; // 750 ETH cap total for LGE
//Ecosystem
address public UniswapPair;
address public wUNIv2;
address public Vault;
IUniswapV2Router02 public uniswapRouterV2;
IUniswapV2Factory public uniswapFactory;
//=========================================================================================================================================
constructor() ERC20("Corlibri", "CORLIBRI") public {
}
function initialSetup() public governanceLevel(2) {
}
//Pool UniSwap pair creation method (called by initialSetup() )
function POOL_CreateUniswapPair(address router, address factory) internal returns (address) {
}
/* Once initialSetup has been invoked
* Team will create the Vault and the LP wrapper token
*
* Only AFTER these 2 addresses have been created the users
* can start contributing in ETH
*/
function secondarySetup(address _Vault, address _wUNIv2) public governanceLevel(2) {
}
//=========================================================================================================================================
/* Liquidity generation logic
* Steps - All tokens that will ever exist go to this contract
*
* This contract accepts ETH as payable
* ETH is mapped to people
*
* When liquidity generation event is over
* everyone can call the mint LP function.
*
* which will put all the ETH and tokens inside the uniswap contract
* without any involvement
*
* This LP will go into this contract
* And will be able to proportionally be withdrawn based on ETH put in
*
* emergency drain function allows the contract owner to drain all ETH and tokens from this contract
* After the liquidity generation event happened. In case something goes wrong, to send ETH back
*/
string public liquidityGenerationParticipationAgreement = "I agree that the developers and affiliated parties of the Corlibri team are not responsible for my funds";
/* @dev List of modifiers used to differentiate the project phases
* ETH_ContributionPhase lets users send ETH to the token contract
* LGP_possible triggers after the contributionPhase duration
* Trading_Possible: this modifiers prevent Corlibri _transfer right
* after the LGE. It gives time for contributors to stake their
* tokens before fees are generated.
*/
modifier ETH_ContributionPhase() {
}
/* if totalETHContributed is bigger than 99% of the cap
* the LGE can happen (allows the LGE to happen sooner if needed)
* otherwise (ETHcontributed < 99% totalCap), time contraint applies
*/
modifier LGE_Possible() {
}
modifier LGE_happened() {
}
//UniSwap Cuck Machine: Blocks Uniswap Trades for a certain period, allowing users to claim and stake NECTAR
modifier Trading_Possible() {
}
//=========================================================================================================================================
// Emergency drain in case of a bug
function emergencyDrain24hAfterLiquidityGenerationEventIsDone() public governanceLevel(2) {
}
//During ETH_ContributionPhase: Users deposit funds
//funds sent to TOKEN contract.
function USER_PledgeLiquidity(bool agreesToTermsOutlinedInLiquidityGenerationParticipationAgreement) public payable ETH_ContributionPhase {
}
function USER_UNPledgeLiquidity() public ETH_ContributionPhase {
}
// After ETH_ContributionPhase: Pool can create liquidity.
// Vault and wrapped UNIv2 contracts need to be setup in advance.
function POOL_CreateLiquidity() public LGE_Possible {
}
//After ETH_ContributionPhase: Pool can create liquidity.
function USER_ClaimWrappedLiquidity() public LGE_happened {
}
//=========================================================================================================================================
//overriden _transfer to take Fees
function _transfer(address sender, address recipient, uint256 amount) internal override Trading_Possible {
}
//=========================================================================================================================================
//FEE_APPROVER (now included into the token code)
mapping (address => bool) public noFeeList;
function calculateAmountAndFee(address sender, uint256 amount) public view returns (uint256 netAmount, uint256 fee){
}
//=========================================================================================================================================
//Governance
/**
* @dev multi tiered governance logic
*
* 0: plebs
* 1: voting contracts (setup later in DAO)
* 2: governors
*
*/
mapping(address => uint8) public governanceLevels;
modifier governanceLevel(uint8 _level){
require(<FILL_ME>)
_;
}
function setGovernanceLevel(address _address, uint8 _level) public governanceLevel(_level) {
}
function viewGovernanceLevel(address _address) public view returns(uint8) {
}
//== Governable Functions
//External variables
function setUniswapPair(address _UniswapPair) public governanceLevel(2) {
}
function setVault(address _Vault) public governanceLevel(2) {
}
/* @dev :allows to upgrade the wrapper
* future devs will allow the wrapper to read live prices
* of liquidity tokens and to mint an Universal wrapper
* wrapping ANY UNIv2 LP token into their equivalent in
* wrappedLP tokens, based on the wrapped asset price.
*/
function setwUNIv2(address _wrapper) public governanceLevel(2) {
}
//burns tokens from the contract (holding them)
function burnToken(uint256 amount) public governanceLevel(1) {
}
//Fees
uint256 public buyFee; uint256 public sellFee;
function setBuySellFees(uint256 _buyFee, uint256 _sellFee) public governanceLevel(1) {
}
function setNoFeeList(address _address, bool _bool) public governanceLevel(1) {
}
//wrapper contract
function setPublicWrappingRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
//==Getters
function viewUNIv2() public view returns(address){
}
function viewWrappedUNIv2() public view returns(address){
}
function viewVault() public view returns(address){
}
//=experimental
uint256 private uniBurnRatio;
function setUniBurnRatio(uint256 _ratioBase100) public governanceLevel(1) {
}
function viewUniBurnRatio() public view returns(uint256) {
}
function burnFromUni(uint256 _amount) external {
}
}
| governanceLevels[msg.sender]>=_level,"Grow some mustache kiddo..." | 35,838 | governanceLevels[msg.sender]>=_level |
"Max reached" | pragma solidity ^0.8.0;
contract BBL1 is ERC721Enumerable, Ownable {
//BB Variables
using Strings for uint256;
uint256 public cost = 0.04 ether;
uint16 public cmMaxSupply = 9261;
uint16 public cmCount;
uint16 private maxLB = 1900;
uint16 private maxSB = 1850;
uint16 private maxCB = 1876;
uint16 private maxSTB = 1798;
uint16 private maxMB = 1837;
uint16 public pLmt = 500;
uint8 private cmBeardTypeCount = 5;
mapping(uint8 => uint8) private cmBeardTypeStatus;
mapping(uint8 => uint16) private countByBt;
mapping(uint16 => Bb) public tokenIDToBB;
string private baseURIL1;
string private baseURIL2;
string private baseURIL3;
string private baseURIL4;
string private baseURILx;
string private notRevealedURI;
address private cbContractAddress;
address private ccContractAddress;
address private ceContractAddress;
address private cxContractAddress;
bool private revealed = false;
bool private cmEnabled = false;
bool private preSale = true;
event mintSuccessful(address indexed usr, uint16 cnt, uint8 indexed bt, uint8 indexed lvl);
struct Bb {
uint16 dna;
uint8 bearedType;
uint8 level;
}
constructor(string memory _name, string memory _symbol, string memory _initBaseURIL1, string memory _notRevealedURI) ERC721(_name, _symbol) {
}
function _fillBeardStatusM() private {
}
//Random generation of BB
function _createRandomNum(uint8 _mod) private view returns(uint256){
}
function _removeBeardTypeM(uint8 _position) private {
}
function _checkIfZeroM(uint8 _bT) private returns(bool) {
}
//Mint function
function _createRandomClansMen(address _to, uint8 _mintAmount) private {
require(cmEnabled, "Minting off");
require(_mintAmount > 0, "invalid amount");
require(_mintAmount <= 5, "max 5");
require(<FILL_ME>)
if(_to != owner()) {
if(preSale) {
require(pLmt > 0, " Pre-Sale limit not set");
require(cmCount + _mintAmount <= pLmt, "pre-sale max reached");
uint ownerTokenBalance = balanceOf(_to);
require(ownerTokenBalance + _mintAmount <= 5, "5 mints per person during pre-sale");
}
require(msg.value >= cost * _mintAmount);
}
for (uint256 i = 1; i <= _mintAmount; i++) {
uint8 _randomBeardPosition = uint8(_createRandomNum(cmBeardTypeCount));
uint8 _rbt = cmBeardTypeStatus[_randomBeardPosition];
_safeMint(_to, totalSupply() + 1);
cmCount+=1;
uint16 _countByType = countByBt[_rbt];
_countByType+=1;
tokenIDToBB[uint16(totalSupply())] = Bb({dna: _countByType, bearedType: _rbt , level: 1});
emit mintSuccessful(_to,_countByType,_rbt,1);
countByBt[_rbt] = _countByType;
if (!_checkIfZeroM(_rbt)) {
_removeBeardTypeM(_randomBeardPosition);
}
}
}
function mintRandomClansMen(uint8 _mintAmount) public payable {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
// Setters......
function setPreSale(bool _setPreSale) public onlyOwner {
}
function setRevealed() public onlyOwner {
}
function setNotRevealedURL(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURIL1(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL2(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL3(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL4(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURILx(string memory _initialBaseURI) public onlyOwner {
}
function setMaxBTypeClansM(uint16 _maxLongBSupply, uint16 _maxShortBSupply, uint16 _maxCurlyBSupply, uint16 _maxSpikeBSupply, uint16 _maxMushBSupply) public onlyOwner {
}
function mintingStatus(bool _status) public onlyOwner {
}
function setFee(uint64 baseCost) public onlyOwner {
}
function setCBContractAddress(address _cbContractAddress) public onlyOwner {
}
function setCCContractAddress(address _ccContractAddress) public onlyOwner {
}
function setCEContractAddress(address _ceContractAddress) public onlyOwner {
}
function setCXContractAddress(address _cxContractAddress) public onlyOwner {
}
function setpLmt(uint16 _pLmt) public onlyOwner {
}
// Getters.....
function getcmBeardDistribution() public view onlyOwner returns(uint,uint,uint,uint,uint) {
}
function getCBContractAddress()public view onlyOwner returns(address) {
}
function getCCContractAddress()public view onlyOwner returns(address) {
}
function getCEContractAddress()public view onlyOwner returns(address) {
}
function getCXContractAddress()public view onlyOwner returns(address) {
}
//frontend getter
function getOwnerBB(address _owner) external view returns (Bb[] memory) {
}
//Interface functions
function getOwnerBBTokenIDs(address _owner) external view returns (uint16[] memory) {
}
function getOwnerBBDetails(uint16 _tokenId) external view returns (uint8, uint8) {
}
function mintARandomL2(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomL3(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomL4(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomLx(address _to, uint8 _bt, uint16 _count, uint8 _level) external returns(uint16) {
}
function withdraw() public payable onlyOwner {
}
}
| cmCount+_mintAmount<=cmMaxSupply,"Max reached" | 35,919 | cmCount+_mintAmount<=cmMaxSupply |
"pre-sale max reached" | pragma solidity ^0.8.0;
contract BBL1 is ERC721Enumerable, Ownable {
//BB Variables
using Strings for uint256;
uint256 public cost = 0.04 ether;
uint16 public cmMaxSupply = 9261;
uint16 public cmCount;
uint16 private maxLB = 1900;
uint16 private maxSB = 1850;
uint16 private maxCB = 1876;
uint16 private maxSTB = 1798;
uint16 private maxMB = 1837;
uint16 public pLmt = 500;
uint8 private cmBeardTypeCount = 5;
mapping(uint8 => uint8) private cmBeardTypeStatus;
mapping(uint8 => uint16) private countByBt;
mapping(uint16 => Bb) public tokenIDToBB;
string private baseURIL1;
string private baseURIL2;
string private baseURIL3;
string private baseURIL4;
string private baseURILx;
string private notRevealedURI;
address private cbContractAddress;
address private ccContractAddress;
address private ceContractAddress;
address private cxContractAddress;
bool private revealed = false;
bool private cmEnabled = false;
bool private preSale = true;
event mintSuccessful(address indexed usr, uint16 cnt, uint8 indexed bt, uint8 indexed lvl);
struct Bb {
uint16 dna;
uint8 bearedType;
uint8 level;
}
constructor(string memory _name, string memory _symbol, string memory _initBaseURIL1, string memory _notRevealedURI) ERC721(_name, _symbol) {
}
function _fillBeardStatusM() private {
}
//Random generation of BB
function _createRandomNum(uint8 _mod) private view returns(uint256){
}
function _removeBeardTypeM(uint8 _position) private {
}
function _checkIfZeroM(uint8 _bT) private returns(bool) {
}
//Mint function
function _createRandomClansMen(address _to, uint8 _mintAmount) private {
require(cmEnabled, "Minting off");
require(_mintAmount > 0, "invalid amount");
require(_mintAmount <= 5, "max 5");
require(cmCount + _mintAmount <= cmMaxSupply, "Max reached");
if(_to != owner()) {
if(preSale) {
require(pLmt > 0, " Pre-Sale limit not set");
require(<FILL_ME>)
uint ownerTokenBalance = balanceOf(_to);
require(ownerTokenBalance + _mintAmount <= 5, "5 mints per person during pre-sale");
}
require(msg.value >= cost * _mintAmount);
}
for (uint256 i = 1; i <= _mintAmount; i++) {
uint8 _randomBeardPosition = uint8(_createRandomNum(cmBeardTypeCount));
uint8 _rbt = cmBeardTypeStatus[_randomBeardPosition];
_safeMint(_to, totalSupply() + 1);
cmCount+=1;
uint16 _countByType = countByBt[_rbt];
_countByType+=1;
tokenIDToBB[uint16(totalSupply())] = Bb({dna: _countByType, bearedType: _rbt , level: 1});
emit mintSuccessful(_to,_countByType,_rbt,1);
countByBt[_rbt] = _countByType;
if (!_checkIfZeroM(_rbt)) {
_removeBeardTypeM(_randomBeardPosition);
}
}
}
function mintRandomClansMen(uint8 _mintAmount) public payable {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
// Setters......
function setPreSale(bool _setPreSale) public onlyOwner {
}
function setRevealed() public onlyOwner {
}
function setNotRevealedURL(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURIL1(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL2(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL3(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL4(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURILx(string memory _initialBaseURI) public onlyOwner {
}
function setMaxBTypeClansM(uint16 _maxLongBSupply, uint16 _maxShortBSupply, uint16 _maxCurlyBSupply, uint16 _maxSpikeBSupply, uint16 _maxMushBSupply) public onlyOwner {
}
function mintingStatus(bool _status) public onlyOwner {
}
function setFee(uint64 baseCost) public onlyOwner {
}
function setCBContractAddress(address _cbContractAddress) public onlyOwner {
}
function setCCContractAddress(address _ccContractAddress) public onlyOwner {
}
function setCEContractAddress(address _ceContractAddress) public onlyOwner {
}
function setCXContractAddress(address _cxContractAddress) public onlyOwner {
}
function setpLmt(uint16 _pLmt) public onlyOwner {
}
// Getters.....
function getcmBeardDistribution() public view onlyOwner returns(uint,uint,uint,uint,uint) {
}
function getCBContractAddress()public view onlyOwner returns(address) {
}
function getCCContractAddress()public view onlyOwner returns(address) {
}
function getCEContractAddress()public view onlyOwner returns(address) {
}
function getCXContractAddress()public view onlyOwner returns(address) {
}
//frontend getter
function getOwnerBB(address _owner) external view returns (Bb[] memory) {
}
//Interface functions
function getOwnerBBTokenIDs(address _owner) external view returns (uint16[] memory) {
}
function getOwnerBBDetails(uint16 _tokenId) external view returns (uint8, uint8) {
}
function mintARandomL2(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomL3(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomL4(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomLx(address _to, uint8 _bt, uint16 _count, uint8 _level) external returns(uint16) {
}
function withdraw() public payable onlyOwner {
}
}
| cmCount+_mintAmount<=pLmt,"pre-sale max reached" | 35,919 | cmCount+_mintAmount<=pLmt |
"5 mints per person during pre-sale" | pragma solidity ^0.8.0;
contract BBL1 is ERC721Enumerable, Ownable {
//BB Variables
using Strings for uint256;
uint256 public cost = 0.04 ether;
uint16 public cmMaxSupply = 9261;
uint16 public cmCount;
uint16 private maxLB = 1900;
uint16 private maxSB = 1850;
uint16 private maxCB = 1876;
uint16 private maxSTB = 1798;
uint16 private maxMB = 1837;
uint16 public pLmt = 500;
uint8 private cmBeardTypeCount = 5;
mapping(uint8 => uint8) private cmBeardTypeStatus;
mapping(uint8 => uint16) private countByBt;
mapping(uint16 => Bb) public tokenIDToBB;
string private baseURIL1;
string private baseURIL2;
string private baseURIL3;
string private baseURIL4;
string private baseURILx;
string private notRevealedURI;
address private cbContractAddress;
address private ccContractAddress;
address private ceContractAddress;
address private cxContractAddress;
bool private revealed = false;
bool private cmEnabled = false;
bool private preSale = true;
event mintSuccessful(address indexed usr, uint16 cnt, uint8 indexed bt, uint8 indexed lvl);
struct Bb {
uint16 dna;
uint8 bearedType;
uint8 level;
}
constructor(string memory _name, string memory _symbol, string memory _initBaseURIL1, string memory _notRevealedURI) ERC721(_name, _symbol) {
}
function _fillBeardStatusM() private {
}
//Random generation of BB
function _createRandomNum(uint8 _mod) private view returns(uint256){
}
function _removeBeardTypeM(uint8 _position) private {
}
function _checkIfZeroM(uint8 _bT) private returns(bool) {
}
//Mint function
function _createRandomClansMen(address _to, uint8 _mintAmount) private {
require(cmEnabled, "Minting off");
require(_mintAmount > 0, "invalid amount");
require(_mintAmount <= 5, "max 5");
require(cmCount + _mintAmount <= cmMaxSupply, "Max reached");
if(_to != owner()) {
if(preSale) {
require(pLmt > 0, " Pre-Sale limit not set");
require(cmCount + _mintAmount <= pLmt, "pre-sale max reached");
uint ownerTokenBalance = balanceOf(_to);
require(<FILL_ME>)
}
require(msg.value >= cost * _mintAmount);
}
for (uint256 i = 1; i <= _mintAmount; i++) {
uint8 _randomBeardPosition = uint8(_createRandomNum(cmBeardTypeCount));
uint8 _rbt = cmBeardTypeStatus[_randomBeardPosition];
_safeMint(_to, totalSupply() + 1);
cmCount+=1;
uint16 _countByType = countByBt[_rbt];
_countByType+=1;
tokenIDToBB[uint16(totalSupply())] = Bb({dna: _countByType, bearedType: _rbt , level: 1});
emit mintSuccessful(_to,_countByType,_rbt,1);
countByBt[_rbt] = _countByType;
if (!_checkIfZeroM(_rbt)) {
_removeBeardTypeM(_randomBeardPosition);
}
}
}
function mintRandomClansMen(uint8 _mintAmount) public payable {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
// Setters......
function setPreSale(bool _setPreSale) public onlyOwner {
}
function setRevealed() public onlyOwner {
}
function setNotRevealedURL(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURIL1(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL2(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL3(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURIL4(string memory _initialBaseURI) public onlyOwner {
}
function setBaseURILx(string memory _initialBaseURI) public onlyOwner {
}
function setMaxBTypeClansM(uint16 _maxLongBSupply, uint16 _maxShortBSupply, uint16 _maxCurlyBSupply, uint16 _maxSpikeBSupply, uint16 _maxMushBSupply) public onlyOwner {
}
function mintingStatus(bool _status) public onlyOwner {
}
function setFee(uint64 baseCost) public onlyOwner {
}
function setCBContractAddress(address _cbContractAddress) public onlyOwner {
}
function setCCContractAddress(address _ccContractAddress) public onlyOwner {
}
function setCEContractAddress(address _ceContractAddress) public onlyOwner {
}
function setCXContractAddress(address _cxContractAddress) public onlyOwner {
}
function setpLmt(uint16 _pLmt) public onlyOwner {
}
// Getters.....
function getcmBeardDistribution() public view onlyOwner returns(uint,uint,uint,uint,uint) {
}
function getCBContractAddress()public view onlyOwner returns(address) {
}
function getCCContractAddress()public view onlyOwner returns(address) {
}
function getCEContractAddress()public view onlyOwner returns(address) {
}
function getCXContractAddress()public view onlyOwner returns(address) {
}
//frontend getter
function getOwnerBB(address _owner) external view returns (Bb[] memory) {
}
//Interface functions
function getOwnerBBTokenIDs(address _owner) external view returns (uint16[] memory) {
}
function getOwnerBBDetails(uint16 _tokenId) external view returns (uint8, uint8) {
}
function mintARandomL2(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomL3(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomL4(address _to, uint8 _bt, uint16 _count) external returns(uint16) {
}
function mintARandomLx(address _to, uint8 _bt, uint16 _count, uint8 _level) external returns(uint16) {
}
function withdraw() public payable onlyOwner {
}
}
| ownerTokenBalance+_mintAmount<=5,"5 mints per person during pre-sale" | 35,919 | ownerTokenBalance+_mintAmount<=5 |
"Purchase would exceed max supply of Sylvia" | // SPDX-License-Identifier: MIT
// Adapted from BoringBananasCo
// Modified and updated to 0.8.0 by @Danny_One_
// Project Sylvia art by @kakigaijin
// <3 VeVefam
// Special thanks to BoringBananasCo & Blockhead Devs for all the resources & assistance along the way!
import "./ERC721_flat.sol";
pragma solidity ^0.8.0;
pragma abicoder v2;
contract ProjectSylvia is ERC721, Ownable, nonReentrant {
string public SYLVIA_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN SYLVIAS ARE ALL SOLD OUT
uint256 public sylPrice = 20000000000000000; // 0.02 ETH
uint public constant maxSylviaPurchase = 15;
uint256 public constant MAX_SYLVIAS = 8888;
bool public saleIsActive = false;
// mapping(uint => string) public sylviaNames;
// Reserve SYL for team - Giveaways/Prizes etc
uint public constant MAX_SYLRESERVE = 100; // total team reserves allowed
uint public sylReserve = MAX_SYLRESERVE; // counter for team reserves remaining
constructor() ERC721("Project Sylvia", "SYL") { }
// withraw to project wallet
function withdraw(uint256 _amount, address payable _owner) public onlyOwner {
}
// withdraw to team
function teamWithdraw(address payable _team1, address payable _team2) public onlyOwner {
}
function setSylviaPrice(uint256 _sylPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function reserveSylvias(address _to, uint256 _reserveAmount) public onlyOwner {
}
function mintSylvia(uint numberOfTokens) public payable reentryLock {
require(saleIsActive, "Sale must be active to mint Sylvia");
require(numberOfTokens > 0 && numberOfTokens < maxSylviaPurchase + 1, "Can only mint 10 tokens at a time");
require(<FILL_ME>)
require(msg.value >= sylPrice * numberOfTokens, "Ether value sent is not correct");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply() + sylReserve; // start minting after reserved tokenIds
if (totalSupply() < MAX_SYLVIAS) {
_safeMint(msg.sender, mintIndex);
}
}
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
}
| totalSupply()+numberOfTokens<MAX_SYLVIAS-sylReserve+1,"Purchase would exceed max supply of Sylvia" | 35,921 | totalSupply()+numberOfTokens<MAX_SYLVIAS-sylReserve+1 |
"Sale end" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./ERC721Burnable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./ERC721Pausable.sol";
contract Prive is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_NFT = 10000;
uint256 public constant PRICE = 8 * 10**16;
uint256 public constant MAX_BY_MINT = 10;
address public creatorAddress;
string public baseTokenURI;
event CreatePrive(uint256 indexed id);
constructor(string memory baseURI, address payable creator) ERC721("Niros Collection", "Prive") {
}
modifier saleIsOpen {
require(<FILL_ME>)
if (_msgSender() != owner()) {
require(!paused(), "Pausable: paused");
}
_;
}
function _totalSupply() internal view returns (uint) {
}
function totalMint() public view returns (uint256) {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
}
function _mintAnElement(address _to) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setCreatorAddress(address payable creator) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| _totalSupply()<=MAX_NFT,"Sale end" | 35,929 | _totalSupply()<=MAX_NFT |
"Max limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./ERC721Burnable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./ERC721Pausable.sol";
contract Prive is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_NFT = 10000;
uint256 public constant PRICE = 8 * 10**16;
uint256 public constant MAX_BY_MINT = 10;
address public creatorAddress;
string public baseTokenURI;
event CreatePrive(uint256 indexed id);
constructor(string memory baseURI, address payable creator) ERC721("Niros Collection", "Prive") {
}
modifier saleIsOpen {
}
function _totalSupply() internal view returns (uint) {
}
function totalMint() public view returns (uint256) {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
uint256 total = _totalSupply();
require(<FILL_ME>)
require(total <= MAX_NFT, "Sale end");
require(_count <= MAX_BY_MINT, "Exceeds number");
require(msg.value >= price(_count), "Value below price");
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(_to);
}
}
function _mintAnElement(address _to) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setCreatorAddress(address payable creator) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| total+_count<=MAX_NFT,"Max limit" | 35,929 | total+_count<=MAX_NFT |
"Sold Out" | pragma solidity ^0.8.0;
contract BellaPoarchDAO is ERC721A, Ownable {
uint256 public NFT_PRICE = 0.01 ether;
uint256 public MAX_SUPPLY = 1111;
uint256 public MAX_MINTS = 10;
uint256 public MAX_MINTS_RESERVED = 5;
uint256 public freeTokens = 222;
string public projName = "BellaPoarchDAO";
string public projSym = "BPDAO";
bool public DROP_ACTIVE = false;
bool public IS_REVEALED = false;
string public baseURI;
using Strings for uint256;
mapping(address => uint) addressToReservedMints;
constructor() ERC721A(projName, projSym, MAX_MINTS, MAX_SUPPLY) {}
function mint(uint256 numTokens) public payable {
require(DROP_ACTIVE, "Sale not started");
require(
numTokens > 0 && numTokens <= MAX_MINTS,
"Must mint between 1 and 10 tokens"
);
require(<FILL_ME>)
require(
msg.value >= NFT_PRICE * numTokens,
"Amount of ether sent is not enough"
);
_safeMint(msg.sender, numTokens);
}
function freeMint(uint256 numTokens) public {
}
function flipDropState() public onlyOwner {
}
function flipRevealedState() public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// function setPrice(uint256 newPrice) public onlyOwner {
// NFT_PRICE = newPrice;
// }
// function setMaxMints(uint256 newMax) public onlyOwner {
// MAX_MINTS = newMax;
// }
// function setSupply(uint256 newSupply) public onlyOwner {
// MAX_SUPPLY = newSupply;
// }
// function setFreeTokens(uint256 newReserve) public onlyOwner {
// freeTokens = newReserve;
// }
function _baseURI() internal view virtual override returns (string memory) {
}
function reservedMintedBy() external view returns (uint256) {
}
function withdraw() public onlyOwner {
}
/** BASE 64 - Written by Brech Devos */
string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
function base64(bytes memory data) internal pure returns (string memory) {
}
}
| totalSupply()+numTokens<=MAX_SUPPLY,"Sold Out" | 35,941 | totalSupply()+numTokens<=MAX_SUPPLY |
"Only 5 reserved mints per wallet" | pragma solidity ^0.8.0;
contract BellaPoarchDAO is ERC721A, Ownable {
uint256 public NFT_PRICE = 0.01 ether;
uint256 public MAX_SUPPLY = 1111;
uint256 public MAX_MINTS = 10;
uint256 public MAX_MINTS_RESERVED = 5;
uint256 public freeTokens = 222;
string public projName = "BellaPoarchDAO";
string public projSym = "BPDAO";
bool public DROP_ACTIVE = false;
bool public IS_REVEALED = false;
string public baseURI;
using Strings for uint256;
mapping(address => uint) addressToReservedMints;
constructor() ERC721A(projName, projSym, MAX_MINTS, MAX_SUPPLY) {}
function mint(uint256 numTokens) public payable {
}
function freeMint(uint256 numTokens) public {
require(DROP_ACTIVE, "Sale not started");
require(
numTokens > 0 && numTokens <= MAX_MINTS_RESERVED,
"Must mint between 1 and 5 tokens"
);
require(<FILL_ME>)
require(totalSupply() + numTokens <= MAX_SUPPLY, "Sold Out");
require(
totalSupply() + numTokens <= freeTokens,
"There are no reserved mints left"
);
addressToReservedMints[msg.sender] += numTokens;
_safeMint(msg.sender, numTokens);
}
function flipDropState() public onlyOwner {
}
function flipRevealedState() public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// function setPrice(uint256 newPrice) public onlyOwner {
// NFT_PRICE = newPrice;
// }
// function setMaxMints(uint256 newMax) public onlyOwner {
// MAX_MINTS = newMax;
// }
// function setSupply(uint256 newSupply) public onlyOwner {
// MAX_SUPPLY = newSupply;
// }
// function setFreeTokens(uint256 newReserve) public onlyOwner {
// freeTokens = newReserve;
// }
function _baseURI() internal view virtual override returns (string memory) {
}
function reservedMintedBy() external view returns (uint256) {
}
function withdraw() public onlyOwner {
}
/** BASE 64 - Written by Brech Devos */
string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
function base64(bytes memory data) internal pure returns (string memory) {
}
}
| addressToReservedMints[msg.sender]+numTokens<=MAX_MINTS_RESERVED,"Only 5 reserved mints per wallet" | 35,941 | addressToReservedMints[msg.sender]+numTokens<=MAX_MINTS_RESERVED |
"There are no reserved mints left" | pragma solidity ^0.8.0;
contract BellaPoarchDAO is ERC721A, Ownable {
uint256 public NFT_PRICE = 0.01 ether;
uint256 public MAX_SUPPLY = 1111;
uint256 public MAX_MINTS = 10;
uint256 public MAX_MINTS_RESERVED = 5;
uint256 public freeTokens = 222;
string public projName = "BellaPoarchDAO";
string public projSym = "BPDAO";
bool public DROP_ACTIVE = false;
bool public IS_REVEALED = false;
string public baseURI;
using Strings for uint256;
mapping(address => uint) addressToReservedMints;
constructor() ERC721A(projName, projSym, MAX_MINTS, MAX_SUPPLY) {}
function mint(uint256 numTokens) public payable {
}
function freeMint(uint256 numTokens) public {
require(DROP_ACTIVE, "Sale not started");
require(
numTokens > 0 && numTokens <= MAX_MINTS_RESERVED,
"Must mint between 1 and 5 tokens"
);
require(
addressToReservedMints[msg.sender] + numTokens <= MAX_MINTS_RESERVED,
"Only 5 reserved mints per wallet"
);
require(totalSupply() + numTokens <= MAX_SUPPLY, "Sold Out");
require(<FILL_ME>)
addressToReservedMints[msg.sender] += numTokens;
_safeMint(msg.sender, numTokens);
}
function flipDropState() public onlyOwner {
}
function flipRevealedState() public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// function setPrice(uint256 newPrice) public onlyOwner {
// NFT_PRICE = newPrice;
// }
// function setMaxMints(uint256 newMax) public onlyOwner {
// MAX_MINTS = newMax;
// }
// function setSupply(uint256 newSupply) public onlyOwner {
// MAX_SUPPLY = newSupply;
// }
// function setFreeTokens(uint256 newReserve) public onlyOwner {
// freeTokens = newReserve;
// }
function _baseURI() internal view virtual override returns (string memory) {
}
function reservedMintedBy() external view returns (uint256) {
}
function withdraw() public onlyOwner {
}
/** BASE 64 - Written by Brech Devos */
string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
function base64(bytes memory data) internal pure returns (string memory) {
}
}
| totalSupply()+numTokens<=freeTokens,"There are no reserved mints left" | 35,941 | totalSupply()+numTokens<=freeTokens |
"TwitterValidationOperator: INVALID_REGISTRY_ADDRESS" | pragma solidity 0.5.12;
// pragma experimental ABIEncoderV2;
contract TwitterValidationOperator is WhitelistedRole, CapperRole, ERC677Receiver {
string public constant NAME = 'Chainlink Twitter Validation Operator';
string public constant VERSION = '0.2.0';
using SafeMath for uint256;
event Validation(uint256 indexed tokenId, uint256 requestId, uint256 paymentAmount);
event ValidationRequest(uint256 indexed tokenId, address indexed owner, uint256 requestId, string code);
event PaymentSet(uint256 operatorPaymentPerValidation, uint256 userPaymentPerValidation);
uint256 public operatorPaymentPerValidation;
uint256 public userPaymentPerValidation;
uint256 public withdrawableTokens;
uint256 private frozenTokens;
uint256 private lastRequestId = 1;
mapping(uint256 => uint256) private userRequests;
IRegistry private registry;
LinkTokenInterface private linkToken;
/**
* @notice Deploy with the address of the LINK token, domains registry and payment amount in LINK for one valiation
* @dev Sets the LinkToken address, Registry address and payment in LINK tokens for one validation
* @param _registry The address of the .crypto Registry
* @param _linkToken The address of the LINK token
* @param _paymentCappers Addresses allowed to update payment amount per validation
*/
constructor (IRegistry _registry, LinkTokenInterface _linkToken, address[] memory _paymentCappers) public {
require(<FILL_ME>)
require(address(_linkToken) != address(0), "TwitterValidationOperator: INVALID_LINK_TOKEN_ADDRESS");
require(_paymentCappers.length > 0, "TwitterValidationOperator: NO_CAPPERS_PROVIDED");
registry = _registry;
linkToken = _linkToken;
uint256 cappersCount = _paymentCappers.length;
for (uint256 i = 0; i < cappersCount; i++) {
addCapper(_paymentCappers[i]);
}
renounceCapper();
}
/**
* @dev Reverts if amount requested is greater than withdrawable balance
* @param _amount The given amount to compare to `withdrawableTokens`
*/
modifier hasAvailableFunds(uint256 _amount) {
}
/**
* @dev Reverts if contract doesn not have enough LINK tokens to fulfil validation
*/
modifier hasAvailableBalance() {
}
/**
* @dev Reverts if method called not from LINK token contract
*/
modifier linkTokenOnly() {
}
/**
* @dev Reverts if user sent incorrect amount of LINK tokens
*/
modifier correctTokensAmount(uint256 _value) {
}
/**
* @notice Method will be called by Chainlink node in the end of the job. Provides user twitter name and validation signature
* @dev Sets twitter username and signature to .crypto domain records
* @param _username Twitter username
* @param _signature Signed twitter username. Ensures the validity of twitter username
* @param _tokenId Domain token ID
* @param _requestId Request id for validations were requested from Smart Contract. If validation was requested from operator `_requestId` should be equals to zero.
*/
function setValidation(string calldata _username, string calldata _signature, uint256 _tokenId, uint256 _requestId)
external
onlyWhitelisted
hasAvailableBalance {
}
/**
* @notice Method returns true if Node Operator able to set validation
* @dev Returns true or error
*/
function canSetValidation() external view onlyWhitelisted hasAvailableBalance returns (bool) {
}
/**
* @notice Method allows to update payments per one validation in LINK tokens
* @dev Sets operatorPaymentPerValidation and userPaymentPerValidation variables
* @param _operatorPaymentPerValidation Payment amount in LINK tokens when verification initiated via Operator
* @param _userPaymentPerValidation Payment amount in LINK tokens when verification initiated directly by user via Smart Contract call
*/
function setPaymentPerValidation(uint256 _operatorPaymentPerValidation, uint256 _userPaymentPerValidation) external onlyCapper {
}
/**
* @notice Allows the node operator to withdraw earned LINK to a given address
* @dev The owner of the contract can be another wallet and does not have to be a Chainlink node
* @param _recipient The address to send the LINK token to
* @param _amount The amount to send (specified in wei)
*/
function withdraw(address _recipient, uint256 _amount) external onlyWhitelistAdmin hasAvailableFunds(_amount) {
}
/**
* @notice Initiate Twitter validation
* @dev Method invoked when LINK tokens transferred via transferAndCall method. Requires additional encoded data
* @param _sender Original token sender
* @param _value Tokens amount
* @param _data Encoded additional data needed to initiate domain verification: `abi.encode(uint256 tokenId, string code)`
*/
function onTokenTransfer(address _sender, uint256 _value, bytes calldata _data) external linkTokenOnly correctTokensAmount(_value) {
}
/**
* @notice Method returns available LINK tokens balance minus held tokens
* @dev Returns tokens amount
*/
function availableBalance() public view returns (uint256) {
}
function calculatePaymentForValidation(uint256 _requestId) private returns (uint256 _paymentPerValidation) {
}
}
| address(_registry)!=address(0),"TwitterValidationOperator: INVALID_REGISTRY_ADDRESS" | 35,987 | address(_registry)!=address(0) |
"TwitterValidationOperator: INVALID_LINK_TOKEN_ADDRESS" | pragma solidity 0.5.12;
// pragma experimental ABIEncoderV2;
contract TwitterValidationOperator is WhitelistedRole, CapperRole, ERC677Receiver {
string public constant NAME = 'Chainlink Twitter Validation Operator';
string public constant VERSION = '0.2.0';
using SafeMath for uint256;
event Validation(uint256 indexed tokenId, uint256 requestId, uint256 paymentAmount);
event ValidationRequest(uint256 indexed tokenId, address indexed owner, uint256 requestId, string code);
event PaymentSet(uint256 operatorPaymentPerValidation, uint256 userPaymentPerValidation);
uint256 public operatorPaymentPerValidation;
uint256 public userPaymentPerValidation;
uint256 public withdrawableTokens;
uint256 private frozenTokens;
uint256 private lastRequestId = 1;
mapping(uint256 => uint256) private userRequests;
IRegistry private registry;
LinkTokenInterface private linkToken;
/**
* @notice Deploy with the address of the LINK token, domains registry and payment amount in LINK for one valiation
* @dev Sets the LinkToken address, Registry address and payment in LINK tokens for one validation
* @param _registry The address of the .crypto Registry
* @param _linkToken The address of the LINK token
* @param _paymentCappers Addresses allowed to update payment amount per validation
*/
constructor (IRegistry _registry, LinkTokenInterface _linkToken, address[] memory _paymentCappers) public {
require(address(_registry) != address(0), "TwitterValidationOperator: INVALID_REGISTRY_ADDRESS");
require(<FILL_ME>)
require(_paymentCappers.length > 0, "TwitterValidationOperator: NO_CAPPERS_PROVIDED");
registry = _registry;
linkToken = _linkToken;
uint256 cappersCount = _paymentCappers.length;
for (uint256 i = 0; i < cappersCount; i++) {
addCapper(_paymentCappers[i]);
}
renounceCapper();
}
/**
* @dev Reverts if amount requested is greater than withdrawable balance
* @param _amount The given amount to compare to `withdrawableTokens`
*/
modifier hasAvailableFunds(uint256 _amount) {
}
/**
* @dev Reverts if contract doesn not have enough LINK tokens to fulfil validation
*/
modifier hasAvailableBalance() {
}
/**
* @dev Reverts if method called not from LINK token contract
*/
modifier linkTokenOnly() {
}
/**
* @dev Reverts if user sent incorrect amount of LINK tokens
*/
modifier correctTokensAmount(uint256 _value) {
}
/**
* @notice Method will be called by Chainlink node in the end of the job. Provides user twitter name and validation signature
* @dev Sets twitter username and signature to .crypto domain records
* @param _username Twitter username
* @param _signature Signed twitter username. Ensures the validity of twitter username
* @param _tokenId Domain token ID
* @param _requestId Request id for validations were requested from Smart Contract. If validation was requested from operator `_requestId` should be equals to zero.
*/
function setValidation(string calldata _username, string calldata _signature, uint256 _tokenId, uint256 _requestId)
external
onlyWhitelisted
hasAvailableBalance {
}
/**
* @notice Method returns true if Node Operator able to set validation
* @dev Returns true or error
*/
function canSetValidation() external view onlyWhitelisted hasAvailableBalance returns (bool) {
}
/**
* @notice Method allows to update payments per one validation in LINK tokens
* @dev Sets operatorPaymentPerValidation and userPaymentPerValidation variables
* @param _operatorPaymentPerValidation Payment amount in LINK tokens when verification initiated via Operator
* @param _userPaymentPerValidation Payment amount in LINK tokens when verification initiated directly by user via Smart Contract call
*/
function setPaymentPerValidation(uint256 _operatorPaymentPerValidation, uint256 _userPaymentPerValidation) external onlyCapper {
}
/**
* @notice Allows the node operator to withdraw earned LINK to a given address
* @dev The owner of the contract can be another wallet and does not have to be a Chainlink node
* @param _recipient The address to send the LINK token to
* @param _amount The amount to send (specified in wei)
*/
function withdraw(address _recipient, uint256 _amount) external onlyWhitelistAdmin hasAvailableFunds(_amount) {
}
/**
* @notice Initiate Twitter validation
* @dev Method invoked when LINK tokens transferred via transferAndCall method. Requires additional encoded data
* @param _sender Original token sender
* @param _value Tokens amount
* @param _data Encoded additional data needed to initiate domain verification: `abi.encode(uint256 tokenId, string code)`
*/
function onTokenTransfer(address _sender, uint256 _value, bytes calldata _data) external linkTokenOnly correctTokensAmount(_value) {
}
/**
* @notice Method returns available LINK tokens balance minus held tokens
* @dev Returns tokens amount
*/
function availableBalance() public view returns (uint256) {
}
function calculatePaymentForValidation(uint256 _requestId) private returns (uint256 _paymentPerValidation) {
}
}
| address(_linkToken)!=address(0),"TwitterValidationOperator: INVALID_LINK_TOKEN_ADDRESS" | 35,987 | address(_linkToken)!=address(0) |
"TwitterValidationOperator: NOT_ENOUGH_TOKENS_ON_CONTRACT_BALANCE" | pragma solidity 0.5.12;
// pragma experimental ABIEncoderV2;
contract TwitterValidationOperator is WhitelistedRole, CapperRole, ERC677Receiver {
string public constant NAME = 'Chainlink Twitter Validation Operator';
string public constant VERSION = '0.2.0';
using SafeMath for uint256;
event Validation(uint256 indexed tokenId, uint256 requestId, uint256 paymentAmount);
event ValidationRequest(uint256 indexed tokenId, address indexed owner, uint256 requestId, string code);
event PaymentSet(uint256 operatorPaymentPerValidation, uint256 userPaymentPerValidation);
uint256 public operatorPaymentPerValidation;
uint256 public userPaymentPerValidation;
uint256 public withdrawableTokens;
uint256 private frozenTokens;
uint256 private lastRequestId = 1;
mapping(uint256 => uint256) private userRequests;
IRegistry private registry;
LinkTokenInterface private linkToken;
/**
* @notice Deploy with the address of the LINK token, domains registry and payment amount in LINK for one valiation
* @dev Sets the LinkToken address, Registry address and payment in LINK tokens for one validation
* @param _registry The address of the .crypto Registry
* @param _linkToken The address of the LINK token
* @param _paymentCappers Addresses allowed to update payment amount per validation
*/
constructor (IRegistry _registry, LinkTokenInterface _linkToken, address[] memory _paymentCappers) public {
}
/**
* @dev Reverts if amount requested is greater than withdrawable balance
* @param _amount The given amount to compare to `withdrawableTokens`
*/
modifier hasAvailableFunds(uint256 _amount) {
}
/**
* @dev Reverts if contract doesn not have enough LINK tokens to fulfil validation
*/
modifier hasAvailableBalance() {
require(<FILL_ME>)
_;
}
/**
* @dev Reverts if method called not from LINK token contract
*/
modifier linkTokenOnly() {
}
/**
* @dev Reverts if user sent incorrect amount of LINK tokens
*/
modifier correctTokensAmount(uint256 _value) {
}
/**
* @notice Method will be called by Chainlink node in the end of the job. Provides user twitter name and validation signature
* @dev Sets twitter username and signature to .crypto domain records
* @param _username Twitter username
* @param _signature Signed twitter username. Ensures the validity of twitter username
* @param _tokenId Domain token ID
* @param _requestId Request id for validations were requested from Smart Contract. If validation was requested from operator `_requestId` should be equals to zero.
*/
function setValidation(string calldata _username, string calldata _signature, uint256 _tokenId, uint256 _requestId)
external
onlyWhitelisted
hasAvailableBalance {
}
/**
* @notice Method returns true if Node Operator able to set validation
* @dev Returns true or error
*/
function canSetValidation() external view onlyWhitelisted hasAvailableBalance returns (bool) {
}
/**
* @notice Method allows to update payments per one validation in LINK tokens
* @dev Sets operatorPaymentPerValidation and userPaymentPerValidation variables
* @param _operatorPaymentPerValidation Payment amount in LINK tokens when verification initiated via Operator
* @param _userPaymentPerValidation Payment amount in LINK tokens when verification initiated directly by user via Smart Contract call
*/
function setPaymentPerValidation(uint256 _operatorPaymentPerValidation, uint256 _userPaymentPerValidation) external onlyCapper {
}
/**
* @notice Allows the node operator to withdraw earned LINK to a given address
* @dev The owner of the contract can be another wallet and does not have to be a Chainlink node
* @param _recipient The address to send the LINK token to
* @param _amount The amount to send (specified in wei)
*/
function withdraw(address _recipient, uint256 _amount) external onlyWhitelistAdmin hasAvailableFunds(_amount) {
}
/**
* @notice Initiate Twitter validation
* @dev Method invoked when LINK tokens transferred via transferAndCall method. Requires additional encoded data
* @param _sender Original token sender
* @param _value Tokens amount
* @param _data Encoded additional data needed to initiate domain verification: `abi.encode(uint256 tokenId, string code)`
*/
function onTokenTransfer(address _sender, uint256 _value, bytes calldata _data) external linkTokenOnly correctTokensAmount(_value) {
}
/**
* @notice Method returns available LINK tokens balance minus held tokens
* @dev Returns tokens amount
*/
function availableBalance() public view returns (uint256) {
}
function calculatePaymentForValidation(uint256 _requestId) private returns (uint256 _paymentPerValidation) {
}
}
| availableBalance()>=withdrawableTokens.add(operatorPaymentPerValidation),"TwitterValidationOperator: NOT_ENOUGH_TOKENS_ON_CONTRACT_BALANCE" | 35,987 | availableBalance()>=withdrawableTokens.add(operatorPaymentPerValidation) |
"TwitterValidationOperator: SENDER_DOES_NOT_HAVE_ACCESS_TO_DOMAIN" | pragma solidity 0.5.12;
// pragma experimental ABIEncoderV2;
contract TwitterValidationOperator is WhitelistedRole, CapperRole, ERC677Receiver {
string public constant NAME = 'Chainlink Twitter Validation Operator';
string public constant VERSION = '0.2.0';
using SafeMath for uint256;
event Validation(uint256 indexed tokenId, uint256 requestId, uint256 paymentAmount);
event ValidationRequest(uint256 indexed tokenId, address indexed owner, uint256 requestId, string code);
event PaymentSet(uint256 operatorPaymentPerValidation, uint256 userPaymentPerValidation);
uint256 public operatorPaymentPerValidation;
uint256 public userPaymentPerValidation;
uint256 public withdrawableTokens;
uint256 private frozenTokens;
uint256 private lastRequestId = 1;
mapping(uint256 => uint256) private userRequests;
IRegistry private registry;
LinkTokenInterface private linkToken;
/**
* @notice Deploy with the address of the LINK token, domains registry and payment amount in LINK for one valiation
* @dev Sets the LinkToken address, Registry address and payment in LINK tokens for one validation
* @param _registry The address of the .crypto Registry
* @param _linkToken The address of the LINK token
* @param _paymentCappers Addresses allowed to update payment amount per validation
*/
constructor (IRegistry _registry, LinkTokenInterface _linkToken, address[] memory _paymentCappers) public {
}
/**
* @dev Reverts if amount requested is greater than withdrawable balance
* @param _amount The given amount to compare to `withdrawableTokens`
*/
modifier hasAvailableFunds(uint256 _amount) {
}
/**
* @dev Reverts if contract doesn not have enough LINK tokens to fulfil validation
*/
modifier hasAvailableBalance() {
}
/**
* @dev Reverts if method called not from LINK token contract
*/
modifier linkTokenOnly() {
}
/**
* @dev Reverts if user sent incorrect amount of LINK tokens
*/
modifier correctTokensAmount(uint256 _value) {
}
/**
* @notice Method will be called by Chainlink node in the end of the job. Provides user twitter name and validation signature
* @dev Sets twitter username and signature to .crypto domain records
* @param _username Twitter username
* @param _signature Signed twitter username. Ensures the validity of twitter username
* @param _tokenId Domain token ID
* @param _requestId Request id for validations were requested from Smart Contract. If validation was requested from operator `_requestId` should be equals to zero.
*/
function setValidation(string calldata _username, string calldata _signature, uint256 _tokenId, uint256 _requestId)
external
onlyWhitelisted
hasAvailableBalance {
}
/**
* @notice Method returns true if Node Operator able to set validation
* @dev Returns true or error
*/
function canSetValidation() external view onlyWhitelisted hasAvailableBalance returns (bool) {
}
/**
* @notice Method allows to update payments per one validation in LINK tokens
* @dev Sets operatorPaymentPerValidation and userPaymentPerValidation variables
* @param _operatorPaymentPerValidation Payment amount in LINK tokens when verification initiated via Operator
* @param _userPaymentPerValidation Payment amount in LINK tokens when verification initiated directly by user via Smart Contract call
*/
function setPaymentPerValidation(uint256 _operatorPaymentPerValidation, uint256 _userPaymentPerValidation) external onlyCapper {
}
/**
* @notice Allows the node operator to withdraw earned LINK to a given address
* @dev The owner of the contract can be another wallet and does not have to be a Chainlink node
* @param _recipient The address to send the LINK token to
* @param _amount The amount to send (specified in wei)
*/
function withdraw(address _recipient, uint256 _amount) external onlyWhitelistAdmin hasAvailableFunds(_amount) {
}
/**
* @notice Initiate Twitter validation
* @dev Method invoked when LINK tokens transferred via transferAndCall method. Requires additional encoded data
* @param _sender Original token sender
* @param _value Tokens amount
* @param _data Encoded additional data needed to initiate domain verification: `abi.encode(uint256 tokenId, string code)`
*/
function onTokenTransfer(address _sender, uint256 _value, bytes calldata _data) external linkTokenOnly correctTokensAmount(_value) {
(uint256 _tokenId, string memory _code) = abi.decode(_data, (uint256, string));
require(<FILL_ME>)
require(bytes(_code).length > 0, "TwitterValidationOperator: CODE_IS_EMPTY");
require(registry.isApprovedOrOwner(address(this), _tokenId), "TwitterValidationOperator: OPERATOR_SHOULD_BE_APPROVED");
frozenTokens = frozenTokens.add(_value);
userRequests[lastRequestId] = _value;
emit ValidationRequest(_tokenId, registry.ownerOf(_tokenId), lastRequestId, _code);
lastRequestId = lastRequestId.add(1);
}
/**
* @notice Method returns available LINK tokens balance minus held tokens
* @dev Returns tokens amount
*/
function availableBalance() public view returns (uint256) {
}
function calculatePaymentForValidation(uint256 _requestId) private returns (uint256 _paymentPerValidation) {
}
}
| registry.isApprovedOrOwner(_sender,_tokenId),"TwitterValidationOperator: SENDER_DOES_NOT_HAVE_ACCESS_TO_DOMAIN" | 35,987 | registry.isApprovedOrOwner(_sender,_tokenId) |
"TwitterValidationOperator: CODE_IS_EMPTY" | pragma solidity 0.5.12;
// pragma experimental ABIEncoderV2;
contract TwitterValidationOperator is WhitelistedRole, CapperRole, ERC677Receiver {
string public constant NAME = 'Chainlink Twitter Validation Operator';
string public constant VERSION = '0.2.0';
using SafeMath for uint256;
event Validation(uint256 indexed tokenId, uint256 requestId, uint256 paymentAmount);
event ValidationRequest(uint256 indexed tokenId, address indexed owner, uint256 requestId, string code);
event PaymentSet(uint256 operatorPaymentPerValidation, uint256 userPaymentPerValidation);
uint256 public operatorPaymentPerValidation;
uint256 public userPaymentPerValidation;
uint256 public withdrawableTokens;
uint256 private frozenTokens;
uint256 private lastRequestId = 1;
mapping(uint256 => uint256) private userRequests;
IRegistry private registry;
LinkTokenInterface private linkToken;
/**
* @notice Deploy with the address of the LINK token, domains registry and payment amount in LINK for one valiation
* @dev Sets the LinkToken address, Registry address and payment in LINK tokens for one validation
* @param _registry The address of the .crypto Registry
* @param _linkToken The address of the LINK token
* @param _paymentCappers Addresses allowed to update payment amount per validation
*/
constructor (IRegistry _registry, LinkTokenInterface _linkToken, address[] memory _paymentCappers) public {
}
/**
* @dev Reverts if amount requested is greater than withdrawable balance
* @param _amount The given amount to compare to `withdrawableTokens`
*/
modifier hasAvailableFunds(uint256 _amount) {
}
/**
* @dev Reverts if contract doesn not have enough LINK tokens to fulfil validation
*/
modifier hasAvailableBalance() {
}
/**
* @dev Reverts if method called not from LINK token contract
*/
modifier linkTokenOnly() {
}
/**
* @dev Reverts if user sent incorrect amount of LINK tokens
*/
modifier correctTokensAmount(uint256 _value) {
}
/**
* @notice Method will be called by Chainlink node in the end of the job. Provides user twitter name and validation signature
* @dev Sets twitter username and signature to .crypto domain records
* @param _username Twitter username
* @param _signature Signed twitter username. Ensures the validity of twitter username
* @param _tokenId Domain token ID
* @param _requestId Request id for validations were requested from Smart Contract. If validation was requested from operator `_requestId` should be equals to zero.
*/
function setValidation(string calldata _username, string calldata _signature, uint256 _tokenId, uint256 _requestId)
external
onlyWhitelisted
hasAvailableBalance {
}
/**
* @notice Method returns true if Node Operator able to set validation
* @dev Returns true or error
*/
function canSetValidation() external view onlyWhitelisted hasAvailableBalance returns (bool) {
}
/**
* @notice Method allows to update payments per one validation in LINK tokens
* @dev Sets operatorPaymentPerValidation and userPaymentPerValidation variables
* @param _operatorPaymentPerValidation Payment amount in LINK tokens when verification initiated via Operator
* @param _userPaymentPerValidation Payment amount in LINK tokens when verification initiated directly by user via Smart Contract call
*/
function setPaymentPerValidation(uint256 _operatorPaymentPerValidation, uint256 _userPaymentPerValidation) external onlyCapper {
}
/**
* @notice Allows the node operator to withdraw earned LINK to a given address
* @dev The owner of the contract can be another wallet and does not have to be a Chainlink node
* @param _recipient The address to send the LINK token to
* @param _amount The amount to send (specified in wei)
*/
function withdraw(address _recipient, uint256 _amount) external onlyWhitelistAdmin hasAvailableFunds(_amount) {
}
/**
* @notice Initiate Twitter validation
* @dev Method invoked when LINK tokens transferred via transferAndCall method. Requires additional encoded data
* @param _sender Original token sender
* @param _value Tokens amount
* @param _data Encoded additional data needed to initiate domain verification: `abi.encode(uint256 tokenId, string code)`
*/
function onTokenTransfer(address _sender, uint256 _value, bytes calldata _data) external linkTokenOnly correctTokensAmount(_value) {
(uint256 _tokenId, string memory _code) = abi.decode(_data, (uint256, string));
require(registry.isApprovedOrOwner(_sender, _tokenId), "TwitterValidationOperator: SENDER_DOES_NOT_HAVE_ACCESS_TO_DOMAIN");
require(<FILL_ME>)
require(registry.isApprovedOrOwner(address(this), _tokenId), "TwitterValidationOperator: OPERATOR_SHOULD_BE_APPROVED");
frozenTokens = frozenTokens.add(_value);
userRequests[lastRequestId] = _value;
emit ValidationRequest(_tokenId, registry.ownerOf(_tokenId), lastRequestId, _code);
lastRequestId = lastRequestId.add(1);
}
/**
* @notice Method returns available LINK tokens balance minus held tokens
* @dev Returns tokens amount
*/
function availableBalance() public view returns (uint256) {
}
function calculatePaymentForValidation(uint256 _requestId) private returns (uint256 _paymentPerValidation) {
}
}
| bytes(_code).length>0,"TwitterValidationOperator: CODE_IS_EMPTY" | 35,987 | bytes(_code).length>0 |
"TwitterValidationOperator: OPERATOR_SHOULD_BE_APPROVED" | pragma solidity 0.5.12;
// pragma experimental ABIEncoderV2;
contract TwitterValidationOperator is WhitelistedRole, CapperRole, ERC677Receiver {
string public constant NAME = 'Chainlink Twitter Validation Operator';
string public constant VERSION = '0.2.0';
using SafeMath for uint256;
event Validation(uint256 indexed tokenId, uint256 requestId, uint256 paymentAmount);
event ValidationRequest(uint256 indexed tokenId, address indexed owner, uint256 requestId, string code);
event PaymentSet(uint256 operatorPaymentPerValidation, uint256 userPaymentPerValidation);
uint256 public operatorPaymentPerValidation;
uint256 public userPaymentPerValidation;
uint256 public withdrawableTokens;
uint256 private frozenTokens;
uint256 private lastRequestId = 1;
mapping(uint256 => uint256) private userRequests;
IRegistry private registry;
LinkTokenInterface private linkToken;
/**
* @notice Deploy with the address of the LINK token, domains registry and payment amount in LINK for one valiation
* @dev Sets the LinkToken address, Registry address and payment in LINK tokens for one validation
* @param _registry The address of the .crypto Registry
* @param _linkToken The address of the LINK token
* @param _paymentCappers Addresses allowed to update payment amount per validation
*/
constructor (IRegistry _registry, LinkTokenInterface _linkToken, address[] memory _paymentCappers) public {
}
/**
* @dev Reverts if amount requested is greater than withdrawable balance
* @param _amount The given amount to compare to `withdrawableTokens`
*/
modifier hasAvailableFunds(uint256 _amount) {
}
/**
* @dev Reverts if contract doesn not have enough LINK tokens to fulfil validation
*/
modifier hasAvailableBalance() {
}
/**
* @dev Reverts if method called not from LINK token contract
*/
modifier linkTokenOnly() {
}
/**
* @dev Reverts if user sent incorrect amount of LINK tokens
*/
modifier correctTokensAmount(uint256 _value) {
}
/**
* @notice Method will be called by Chainlink node in the end of the job. Provides user twitter name and validation signature
* @dev Sets twitter username and signature to .crypto domain records
* @param _username Twitter username
* @param _signature Signed twitter username. Ensures the validity of twitter username
* @param _tokenId Domain token ID
* @param _requestId Request id for validations were requested from Smart Contract. If validation was requested from operator `_requestId` should be equals to zero.
*/
function setValidation(string calldata _username, string calldata _signature, uint256 _tokenId, uint256 _requestId)
external
onlyWhitelisted
hasAvailableBalance {
}
/**
* @notice Method returns true if Node Operator able to set validation
* @dev Returns true or error
*/
function canSetValidation() external view onlyWhitelisted hasAvailableBalance returns (bool) {
}
/**
* @notice Method allows to update payments per one validation in LINK tokens
* @dev Sets operatorPaymentPerValidation and userPaymentPerValidation variables
* @param _operatorPaymentPerValidation Payment amount in LINK tokens when verification initiated via Operator
* @param _userPaymentPerValidation Payment amount in LINK tokens when verification initiated directly by user via Smart Contract call
*/
function setPaymentPerValidation(uint256 _operatorPaymentPerValidation, uint256 _userPaymentPerValidation) external onlyCapper {
}
/**
* @notice Allows the node operator to withdraw earned LINK to a given address
* @dev The owner of the contract can be another wallet and does not have to be a Chainlink node
* @param _recipient The address to send the LINK token to
* @param _amount The amount to send (specified in wei)
*/
function withdraw(address _recipient, uint256 _amount) external onlyWhitelistAdmin hasAvailableFunds(_amount) {
}
/**
* @notice Initiate Twitter validation
* @dev Method invoked when LINK tokens transferred via transferAndCall method. Requires additional encoded data
* @param _sender Original token sender
* @param _value Tokens amount
* @param _data Encoded additional data needed to initiate domain verification: `abi.encode(uint256 tokenId, string code)`
*/
function onTokenTransfer(address _sender, uint256 _value, bytes calldata _data) external linkTokenOnly correctTokensAmount(_value) {
(uint256 _tokenId, string memory _code) = abi.decode(_data, (uint256, string));
require(registry.isApprovedOrOwner(_sender, _tokenId), "TwitterValidationOperator: SENDER_DOES_NOT_HAVE_ACCESS_TO_DOMAIN");
require(bytes(_code).length > 0, "TwitterValidationOperator: CODE_IS_EMPTY");
require(<FILL_ME>)
frozenTokens = frozenTokens.add(_value);
userRequests[lastRequestId] = _value;
emit ValidationRequest(_tokenId, registry.ownerOf(_tokenId), lastRequestId, _code);
lastRequestId = lastRequestId.add(1);
}
/**
* @notice Method returns available LINK tokens balance minus held tokens
* @dev Returns tokens amount
*/
function availableBalance() public view returns (uint256) {
}
function calculatePaymentForValidation(uint256 _requestId) private returns (uint256 _paymentPerValidation) {
}
}
| registry.isApprovedOrOwner(address(this),_tokenId),"TwitterValidationOperator: OPERATOR_SHOULD_BE_APPROVED" | 35,987 | registry.isApprovedOrOwner(address(this),_tokenId) |
"ERC1363: _checkAndCallTransfer reverts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "./IERC1363.sol";
import "./IERC1363Receiver.sol";
import "./IERC1363Spender.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/introspection/ERC165Checker.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/introspection/ERC165.sol";
/**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/
contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)'))
*/
bytes4 internal constant _INTERFACE_ID_ERC1363_TRANSFER = 0x4bbee2df;
/*
* Note: the ERC-165 identifier for this interface is 0xfb9ec8ce.
* 0xfb9ec8ce ===
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
bytes4 internal constant _INTERFACE_ID_ERC1363_APPROVE = 0xfb9ec8ce;
// Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC1363Receiver(0).onTransferReceived.selector`
bytes4 private constant _ERC1363_RECEIVED = 0x88a7ca5c;
// Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`
// which can be also obtained as `IERC1363Spender(0).onApprovalReceived.selector`
bytes4 private constant _ERC1363_APPROVED = 0x7b04a2d0;
/**
* @param name Name of the token
* @param symbol A symbol to be used as ticker
*/
constructor (string memory name, string memory symbol) ERC20(name, symbol) {
}
/**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param recipient The address to transfer to.
* @param amount The amount to be transferred.
* @return A boolean that indicates if the operation was successful.
*/
function transferAndCall(address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param recipient The address to transfer to
* @param amount The amount to be transferred
* @param data Additional data with no specified format
* @return A boolean that indicates if the operation was successful.
*/
function transferAndCall(address recipient, uint256 amount, bytes memory data) public virtual override returns (bool) {
transfer(recipient, amount);
require(<FILL_ME>)
return true;
}
/**
* @dev Transfer tokens from one address to another and then execute a callback on recipient.
* @param sender The address which you want to send tokens from
* @param recipient The address which you want to transfer to
* @param amount The amount of tokens to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function transferFromAndCall(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another and then execute a callback on recipient.
* @param sender The address which you want to send tokens from
* @param recipient The address which you want to transfer to
* @param amount The amount of tokens to be transferred
* @param data Additional data with no specified format
* @return A boolean that indicates if the operation was successful.
*/
function transferFromAndCall(address sender, address recipient, uint256 amount, bytes memory data) public virtual override returns (bool) {
}
/**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to
* @param amount The amount allowed to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function approveAndCall(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to.
* @param amount The amount allowed to be transferred.
* @param data Additional data with no specified format.
* @return A boolean that indicates if the operation was successful.
*/
function approveAndCall(address spender, uint256 amount, bytes memory data) public virtual override returns (bool) {
}
/**
* @dev Internal function to invoke `onTransferReceived` on a target address
* The call is not executed if the target address is not a contract
* @param sender address Representing the previous owner of the given token value
* @param recipient address Target address that will receive the tokens
* @param amount uint256 The amount mount of tokens to be transferred
* @param data bytes Optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallTransfer(address sender, address recipient, uint256 amount, bytes memory data) internal virtual returns (bool) {
}
/**
* @dev Internal function to invoke `onApprovalReceived` on a target address
* The call is not executed if the target address is not a contract
* @param spender address The address which will spend the funds
* @param amount uint256 The amount of tokens to be spent
* @param data bytes Optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallApprove(address spender, uint256 amount, bytes memory data) internal virtual returns (bool) {
}
}
| _checkAndCallTransfer(_msgSender(),recipient,amount,data),"ERC1363: _checkAndCallTransfer reverts" | 35,997 | _checkAndCallTransfer(_msgSender(),recipient,amount,data) |
"ERC1363: _checkAndCallTransfer reverts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "./IERC1363.sol";
import "./IERC1363Receiver.sol";
import "./IERC1363Spender.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/introspection/ERC165Checker.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/introspection/ERC165.sol";
/**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/
contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)'))
*/
bytes4 internal constant _INTERFACE_ID_ERC1363_TRANSFER = 0x4bbee2df;
/*
* Note: the ERC-165 identifier for this interface is 0xfb9ec8ce.
* 0xfb9ec8ce ===
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
bytes4 internal constant _INTERFACE_ID_ERC1363_APPROVE = 0xfb9ec8ce;
// Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC1363Receiver(0).onTransferReceived.selector`
bytes4 private constant _ERC1363_RECEIVED = 0x88a7ca5c;
// Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`
// which can be also obtained as `IERC1363Spender(0).onApprovalReceived.selector`
bytes4 private constant _ERC1363_APPROVED = 0x7b04a2d0;
/**
* @param name Name of the token
* @param symbol A symbol to be used as ticker
*/
constructor (string memory name, string memory symbol) ERC20(name, symbol) {
}
/**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param recipient The address to transfer to.
* @param amount The amount to be transferred.
* @return A boolean that indicates if the operation was successful.
*/
function transferAndCall(address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param recipient The address to transfer to
* @param amount The amount to be transferred
* @param data Additional data with no specified format
* @return A boolean that indicates if the operation was successful.
*/
function transferAndCall(address recipient, uint256 amount, bytes memory data) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another and then execute a callback on recipient.
* @param sender The address which you want to send tokens from
* @param recipient The address which you want to transfer to
* @param amount The amount of tokens to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function transferFromAndCall(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another and then execute a callback on recipient.
* @param sender The address which you want to send tokens from
* @param recipient The address which you want to transfer to
* @param amount The amount of tokens to be transferred
* @param data Additional data with no specified format
* @return A boolean that indicates if the operation was successful.
*/
function transferFromAndCall(address sender, address recipient, uint256 amount, bytes memory data) public virtual override returns (bool) {
transferFrom(sender, recipient, amount);
require(<FILL_ME>)
return true;
}
/**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to
* @param amount The amount allowed to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function approveAndCall(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to.
* @param amount The amount allowed to be transferred.
* @param data Additional data with no specified format.
* @return A boolean that indicates if the operation was successful.
*/
function approveAndCall(address spender, uint256 amount, bytes memory data) public virtual override returns (bool) {
}
/**
* @dev Internal function to invoke `onTransferReceived` on a target address
* The call is not executed if the target address is not a contract
* @param sender address Representing the previous owner of the given token value
* @param recipient address Target address that will receive the tokens
* @param amount uint256 The amount mount of tokens to be transferred
* @param data bytes Optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallTransfer(address sender, address recipient, uint256 amount, bytes memory data) internal virtual returns (bool) {
}
/**
* @dev Internal function to invoke `onApprovalReceived` on a target address
* The call is not executed if the target address is not a contract
* @param spender address The address which will spend the funds
* @param amount uint256 The amount of tokens to be spent
* @param data bytes Optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallApprove(address spender, uint256 amount, bytes memory data) internal virtual returns (bool) {
}
}
| _checkAndCallTransfer(sender,recipient,amount,data),"ERC1363: _checkAndCallTransfer reverts" | 35,997 | _checkAndCallTransfer(sender,recipient,amount,data) |
"ERC1363: _checkAndCallApprove reverts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "./IERC1363.sol";
import "./IERC1363Receiver.sol";
import "./IERC1363Spender.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/introspection/ERC165Checker.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/introspection/ERC165.sol";
/**
* @title ERC1363
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of an ERC1363 interface
*/
contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
/*
* Note: the ERC-165 identifier for this interface is 0x4bbee2df.
* 0x4bbee2df ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)'))
*/
bytes4 internal constant _INTERFACE_ID_ERC1363_TRANSFER = 0x4bbee2df;
/*
* Note: the ERC-165 identifier for this interface is 0xfb9ec8ce.
* 0xfb9ec8ce ===
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
bytes4 internal constant _INTERFACE_ID_ERC1363_APPROVE = 0xfb9ec8ce;
// Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC1363Receiver(0).onTransferReceived.selector`
bytes4 private constant _ERC1363_RECEIVED = 0x88a7ca5c;
// Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`
// which can be also obtained as `IERC1363Spender(0).onApprovalReceived.selector`
bytes4 private constant _ERC1363_APPROVED = 0x7b04a2d0;
/**
* @param name Name of the token
* @param symbol A symbol to be used as ticker
*/
constructor (string memory name, string memory symbol) ERC20(name, symbol) {
}
/**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param recipient The address to transfer to.
* @param amount The amount to be transferred.
* @return A boolean that indicates if the operation was successful.
*/
function transferAndCall(address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens to a specified address and then execute a callback on recipient.
* @param recipient The address to transfer to
* @param amount The amount to be transferred
* @param data Additional data with no specified format
* @return A boolean that indicates if the operation was successful.
*/
function transferAndCall(address recipient, uint256 amount, bytes memory data) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another and then execute a callback on recipient.
* @param sender The address which you want to send tokens from
* @param recipient The address which you want to transfer to
* @param amount The amount of tokens to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function transferFromAndCall(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another and then execute a callback on recipient.
* @param sender The address which you want to send tokens from
* @param recipient The address which you want to transfer to
* @param amount The amount of tokens to be transferred
* @param data Additional data with no specified format
* @return A boolean that indicates if the operation was successful.
*/
function transferFromAndCall(address sender, address recipient, uint256 amount, bytes memory data) public virtual override returns (bool) {
}
/**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to
* @param amount The amount allowed to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function approveAndCall(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Approve spender to transfer tokens and then execute a callback on recipient.
* @param spender The address allowed to transfer to.
* @param amount The amount allowed to be transferred.
* @param data Additional data with no specified format.
* @return A boolean that indicates if the operation was successful.
*/
function approveAndCall(address spender, uint256 amount, bytes memory data) public virtual override returns (bool) {
approve(spender, amount);
require(<FILL_ME>)
return true;
}
/**
* @dev Internal function to invoke `onTransferReceived` on a target address
* The call is not executed if the target address is not a contract
* @param sender address Representing the previous owner of the given token value
* @param recipient address Target address that will receive the tokens
* @param amount uint256 The amount mount of tokens to be transferred
* @param data bytes Optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallTransfer(address sender, address recipient, uint256 amount, bytes memory data) internal virtual returns (bool) {
}
/**
* @dev Internal function to invoke `onApprovalReceived` on a target address
* The call is not executed if the target address is not a contract
* @param spender address The address which will spend the funds
* @param amount uint256 The amount of tokens to be spent
* @param data bytes Optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallApprove(address spender, uint256 amount, bytes memory data) internal virtual returns (bool) {
}
}
| _checkAndCallApprove(spender,amount,data),"ERC1363: _checkAndCallApprove reverts" | 35,997 | _checkAndCallApprove(spender,amount,data) |
"TimedCrowdsale: the opening time is smaller then the first bonus timestamp." | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/
contract TimedCrowdsale is Crowdsale {
uint256 private _openingTime;
uint256 private _closingTime;
/**
* @dev Reverts if not in crowdsale time range.
*/
modifier onlyWhileOpen() {
}
/**
* @dev Constructor, takes crowdsale opening and closing times.
* @param openingTime Crowdsale opening time
* @param closingTime Crowdsale closing time
*/
constructor (
uint256 rate,
address token,
uint256 openingTime,
uint256 closingTime,
address payable operator,
uint256[] memory bonusFinishTimestamp,
uint256[] memory bonuses,
uint256 minInvestmentAmount,
uint256 fee
) internal Crowdsale(rate, token, operator, bonusFinishTimestamp, bonuses, minInvestmentAmount, fee) {
if (bonusFinishTimestamp.length > 0) {
require(<FILL_ME>)
require(bonusFinishTimestamp[bonusFinishTimestamp.length - 1] <= closingTime, "TimedCrowdsale: the closing time is smaller then the last bonus timestamp.");
}
_openingTime = openingTime;
_closingTime = closingTime;
}
// -----------------------------------------
// INTERNAL
// -----------------------------------------
/**
* @dev Extend parent behavior requiring to be within contributing period
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal onlyWhileOpen view {
}
// -----------------------------------------
// EXTERNAL
// -----------------------------------------
/**
* @dev refund the investments to investor while crowdsale is open
*/
function refundETH() external onlyWhileOpen {
}
// -----------------------------------------
// GETTERS
// -----------------------------------------
/**
* @return the crowdsale opening time.
*/
function getOpeningTime() public view returns (uint256) {
}
/**
* @return the crowdsale closing time.
*/
function getClosingTime() public view returns (uint256) {
}
/**
* @return true if the crowdsale is open, false otherwise.
*/
function isOpen() public view returns (bool) {
}
/**
* @dev Checks whether the period in which the crowdsale is open has already elapsed.
* @return Whether crowdsale period has elapsed
*/
function hasClosed() public view returns (bool) {
}
}
| bonusFinishTimestamp[0]>=openingTime,"TimedCrowdsale: the opening time is smaller then the first bonus timestamp." | 36,042 | bonusFinishTimestamp[0]>=openingTime |
"TimedCrowdsale: the closing time is smaller then the last bonus timestamp." | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/
contract TimedCrowdsale is Crowdsale {
uint256 private _openingTime;
uint256 private _closingTime;
/**
* @dev Reverts if not in crowdsale time range.
*/
modifier onlyWhileOpen() {
}
/**
* @dev Constructor, takes crowdsale opening and closing times.
* @param openingTime Crowdsale opening time
* @param closingTime Crowdsale closing time
*/
constructor (
uint256 rate,
address token,
uint256 openingTime,
uint256 closingTime,
address payable operator,
uint256[] memory bonusFinishTimestamp,
uint256[] memory bonuses,
uint256 minInvestmentAmount,
uint256 fee
) internal Crowdsale(rate, token, operator, bonusFinishTimestamp, bonuses, minInvestmentAmount, fee) {
if (bonusFinishTimestamp.length > 0) {
require(bonusFinishTimestamp[0] >= openingTime, "TimedCrowdsale: the opening time is smaller then the first bonus timestamp.");
require(<FILL_ME>)
}
_openingTime = openingTime;
_closingTime = closingTime;
}
// -----------------------------------------
// INTERNAL
// -----------------------------------------
/**
* @dev Extend parent behavior requiring to be within contributing period
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal onlyWhileOpen view {
}
// -----------------------------------------
// EXTERNAL
// -----------------------------------------
/**
* @dev refund the investments to investor while crowdsale is open
*/
function refundETH() external onlyWhileOpen {
}
// -----------------------------------------
// GETTERS
// -----------------------------------------
/**
* @return the crowdsale opening time.
*/
function getOpeningTime() public view returns (uint256) {
}
/**
* @return the crowdsale closing time.
*/
function getClosingTime() public view returns (uint256) {
}
/**
* @return true if the crowdsale is open, false otherwise.
*/
function isOpen() public view returns (bool) {
}
/**
* @dev Checks whether the period in which the crowdsale is open has already elapsed.
* @return Whether crowdsale period has elapsed
*/
function hasClosed() public view returns (bool) {
}
}
| bonusFinishTimestamp[bonusFinishTimestamp.length-1]<=closingTime,"TimedCrowdsale: the closing time is smaller then the last bonus timestamp." | 36,042 | bonusFinishTimestamp[bonusFinishTimestamp.length-1]<=closingTime |
"refundETH: only the active investors can call this method." | /**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/
contract TimedCrowdsale is Crowdsale {
uint256 private _openingTime;
uint256 private _closingTime;
/**
* @dev Reverts if not in crowdsale time range.
*/
modifier onlyWhileOpen() {
}
/**
* @dev Constructor, takes crowdsale opening and closing times.
* @param openingTime Crowdsale opening time
* @param closingTime Crowdsale closing time
*/
constructor (
uint256 rate,
address token,
uint256 openingTime,
uint256 closingTime,
address payable operator,
uint256[] memory bonusFinishTimestamp,
uint256[] memory bonuses,
uint256 minInvestmentAmount,
uint256 fee
) internal Crowdsale(rate, token, operator, bonusFinishTimestamp, bonuses, minInvestmentAmount, fee) {
}
// -----------------------------------------
// INTERNAL
// -----------------------------------------
/**
* @dev Extend parent behavior requiring to be within contributing period
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal onlyWhileOpen view {
}
// -----------------------------------------
// EXTERNAL
// -----------------------------------------
/**
* @dev refund the investments to investor while crowdsale is open
*/
function refundETH() external onlyWhileOpen {
require(<FILL_ME>)
uint256 weiAmount = _balances[msg.sender].eth;
uint256 tokensAmount = _balances[msg.sender].tokens;
_balances[msg.sender].eth = 0;
_balances[msg.sender].tokens = 0;
if (_balances[msg.sender].refunded == false) {
_balances[msg.sender].refunded = true;
}
_weiRaised = _weiRaised.sub(weiAmount);
_tokensSold = _tokensSold.sub(tokensAmount);
msg.sender.transfer(weiAmount);
emit Refunded(msg.sender, weiAmount);
}
// -----------------------------------------
// GETTERS
// -----------------------------------------
/**
* @return the crowdsale opening time.
*/
function getOpeningTime() public view returns (uint256) {
}
/**
* @return the crowdsale closing time.
*/
function getClosingTime() public view returns (uint256) {
}
/**
* @return true if the crowdsale is open, false otherwise.
*/
function isOpen() public view returns (bool) {
}
/**
* @dev Checks whether the period in which the crowdsale is open has already elapsed.
* @return Whether crowdsale period has elapsed
*/
function hasClosed() public view returns (bool) {
}
}
| isInvestor(msg.sender),"refundETH: only the active investors can call this method." | 36,042 | isInvestor(msg.sender) |
"wrong class" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
bytes32 classHash = getClassHash(class);
require(<FILL_ME>)
if (classHash == OWNERHASH)
require(requiredNum <= getItemAddressCount(OWNERHASH),"num larger than existed owners");
bytes32 taskHash = keccak256(abi.encodePacked("resetRequiredNum", class, requiredNum));
addItemAddress(taskHash, msg.sender);
if(getItemAddressCount(taskHash) >= ownerRequireNum){
removeItem(taskHash);
uint256 previousNum = 0;
if (classHash == OWNERHASH){
previousNum = ownerRequireNum;
ownerRequireNum = requiredNum;
}
else if(classHash == OPERATORHASH){
previousNum = operatorRequireNum;
operatorRequireNum = requiredNum;
}else{
revert("wrong class");
}
emit AdminRequiredNumChanged("resetRequiredNum", class, previousNum, requiredNum);
}
return true;
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
}
function getClassHash(string memory class) private view returns (bytes32){
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
}
}
| (classHash==OPERATORHASH)||(classHash==OWNERHASH),"wrong class" | 36,082 | (classHash==OPERATORHASH)||(classHash==OWNERHASH) |
"address existed already" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
bytes32 classHash = getClassHash(class);
require(<FILL_ME>)
require(itemAddressExists(classHash,oldAddress),"address not existed");
bytes32 taskHash = keccak256(abi.encodePacked("modifyAddress", class, oldAddress, newAddress));
addItemAddress(taskHash, msg.sender);
if(getItemAddressCount(taskHash) >= ownerRequireNum){
replaceItemAddress(classHash, oldAddress, newAddress);
emit AdminChanged("modifyAddress", class, oldAddress, newAddress);
removeItem(taskHash);
return true;
}
return false;
}
function getClassHash(string memory class) private view returns (bytes32){
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
}
}
| !itemAddressExists(classHash,newAddress),"address existed already" | 36,082 | !itemAddressExists(classHash,newAddress) |
"address not existed" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
bytes32 classHash = getClassHash(class);
require(!itemAddressExists(classHash,newAddress),"address existed already");
require(<FILL_ME>)
bytes32 taskHash = keccak256(abi.encodePacked("modifyAddress", class, oldAddress, newAddress));
addItemAddress(taskHash, msg.sender);
if(getItemAddressCount(taskHash) >= ownerRequireNum){
replaceItemAddress(classHash, oldAddress, newAddress);
emit AdminChanged("modifyAddress", class, oldAddress, newAddress);
removeItem(taskHash);
return true;
}
return false;
}
function getClassHash(string memory class) private view returns (bytes32){
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
}
}
| itemAddressExists(classHash,oldAddress),"address not existed" | 36,082 | itemAddressExists(classHash,oldAddress) |
"invalid class" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
}
function getClassHash(string memory class) private view returns (bytes32){
bytes32 classHash = keccak256(abi.encodePacked(class));
require(<FILL_ME>)
return classHash;
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
}
}
| classHashExist(classHash),"invalid class" | 36,082 | classHashExist(classHash) |
"no such address exist" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
}
function getClassHash(string memory class) private view returns (bytes32){
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
bytes32 classHash = getClassHash(class);
require(classHash != STOREHASH && classHash != LOGICHASH, "wrong class");
require(<FILL_ME>)
if(classHash == OWNERHASH)
require(getItemAddressCount(classHash) > ownerRequireNum, "insuffience addresses");
bytes32 taskHash = keccak256(abi.encodePacked("dropAddress", class, oneAddress));
addItemAddress(taskHash, msg.sender);
if(getItemAddressCount(taskHash) >= ownerRequireNum){
removeOneItemAddress(classHash, oneAddress);
emit AdminChanged("dropAddress", class, oneAddress, oneAddress);
removeItem(taskHash);
return true;
}
return false;
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
}
}
| itemAddressExists(classHash,oneAddress),"no such address exist" | 36,082 | itemAddressExists(classHash,oneAddress) |
"insuffience addresses" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
}
function getClassHash(string memory class) private view returns (bytes32){
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
bytes32 classHash = getClassHash(class);
require(classHash != STOREHASH && classHash != LOGICHASH, "wrong class");
require(itemAddressExists(classHash, oneAddress), "no such address exist");
if(classHash == OWNERHASH)
require(<FILL_ME>)
bytes32 taskHash = keccak256(abi.encodePacked("dropAddress", class, oneAddress));
addItemAddress(taskHash, msg.sender);
if(getItemAddressCount(taskHash) >= ownerRequireNum){
removeOneItemAddress(classHash, oneAddress);
emit AdminChanged("dropAddress", class, oneAddress, oneAddress);
removeItem(taskHash);
return true;
}
return false;
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
}
}
| getItemAddressCount(classHash)>ownerRequireNum,"insuffience addresses" | 36,082 | getItemAddressCount(classHash)>ownerRequireNum |
"address existed already" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
}
function getClassHash(string memory class) private view returns (bytes32){
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
bytes32 classHash = getClassHash(class);
require(classHash != STOREHASH && classHash != LOGICHASH, "wrong class");
require(<FILL_ME>)
bytes32 taskHash = keccak256(abi.encodePacked("addAddress", class, oneAddress));
addItemAddress(taskHash, msg.sender);
if(getItemAddressCount(taskHash) >= ownerRequireNum){
addItemAddress(classHash, oneAddress);
emit AdminChanged("addAddress", class, oneAddress, oneAddress);
removeItem(taskHash);
return true;
}
return false;
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
}
}
| !itemAddressExists(classHash,oneAddress),"address existed already" | 36,082 | !itemAddressExists(classHash,oneAddress) |
"only use owner to call" | pragma solidity ^0.5.11;
import "./Container.sol";
contract HLTCAdmin is Container{
bytes32 internal constant OWNERHASH = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
bytes32 internal constant PAUSERHASH = 0x0cc58340b26c619cd4edc70f833d3f4d9d26f3ae7d5ef2965f81fe5495049a4f;
bytes32 internal constant STOREHASH = 0xe41d88711b08bdcd7556c5d2d24e0da6fa1f614cf2055f4d7e10206017cd1680;
bytes32 internal constant LOGICHASH = 0x397bc5b97f629151e68146caedba62f10b47e426b38db589771a288c0861f182;
uint256 internal constant MAXUSERNUM = 255;
bytes32[] private classHashArray;
uint256 internal ownerRequireNum;
uint256 internal operatorRequireNum;
event AdminChanged(string TaskType, string class, address oldAddress, address newAddress);
event AdminRequiredNumChanged(string TaskType, string class, uint256 previousNum, uint256 requiredNum);
event AdminTaskDropped(bytes32 taskHash);
function initAdmin(address owner0, address owner1, address owner2) internal{
}
function classHashExist(bytes32 aHash) private view returns(bool){
}
function getAdminAddresses(string memory class) public view returns(address[] memory) {
}
function getOwnerRequiredNum() public view returns(uint256){
}
function getOperatorRequiredNum() public view returns(uint256){
}
function resetRequiredNum(string memory class, uint256 requiredNum)
public onlyOwner returns(bool){
}
function modifyAddress(string memory class, address oldAddress, address newAddress)
internal onlyOwner returns(bool){
}
function getClassHash(string memory class) private view returns (bytes32){
}
function dropAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function addAddress(string memory class, address oneAddress)
public onlyOwner returns(bool){
}
function dropTask(bytes32 taskHash)
public onlyOwner returns (bool){
}
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
}
| itemAddressExists(OWNERHASH,msg.sender),"only use owner to call" | 36,082 | itemAddressExists(OWNERHASH,msg.sender) |
"wrong operator" | pragma solidity ^0.5.11;
import "./IERC20Token.sol";
import "./HLTCAdmin.sol";
import "./HLTCLogic.sol";
import "./HLTCStorage.sol";
import "./Pausable.sol";
contract HLTCToken is IERC20Token,Pausable, HLTCAdmin{
string public constant name = "Huobi LTC";
string public constant symbol = "HLTC";
uint8 public constant decimals = 18;
HLTCLogic private logic;
event Burning(address indexed from, uint256 value, string proof, string ltcAddress, address burner);
event Burned(address indexed from, uint256 value, string proof, string ltcAddress);
event Minting(address indexed to, uint256 value, string proof, address minter);
event Minted(address indexed to, uint256 value, string proof);
constructor(address owner0, address owner1, address owner2) public{
}
function totalSupply() public view returns (uint256 supply) {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function mint(address to, uint256 value, string memory proof,bytes32 taskHash) public whenNotPaused returns(bool){
require(<FILL_ME>)
uint256 status = logic.mintLogic(value,to,proof,taskHash, msg.sender, operatorRequireNum);
if (status == 1){
emit Minting(to, value, proof, msg.sender);
}else if (status == 3) {
emit Minting(to, value, proof, msg.sender);
emit Minted(to, value, proof);
emit Transfer(address(0x0),to,value);
}
return true;
}
function burn(address from,uint256 value,string memory ltcAddress,string memory proof, bytes32 taskHash)
public whenNotPaused returns(bool){
}
function cancelTask(bytes32 taskHash) public returns(uint256){
}
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 allowance(address owner, address spender) public view returns (uint256 remaining){
}
function modifyAdminAddress(string memory class, address oldAddress, address newAddress) public whenPaused{
}
function getLogicAddress() public view returns(address){
}
function getStoreAddress() public view returns(address){
}
function pause() public{
}
}
| itemAddressExists(OPERATORHASH,msg.sender),"wrong operator" | 36,085 | itemAddressExists(OPERATORHASH,msg.sender) |
"wrong user to pauser" | pragma solidity ^0.5.11;
import "./IERC20Token.sol";
import "./HLTCAdmin.sol";
import "./HLTCLogic.sol";
import "./HLTCStorage.sol";
import "./Pausable.sol";
contract HLTCToken is IERC20Token,Pausable, HLTCAdmin{
string public constant name = "Huobi LTC";
string public constant symbol = "HLTC";
uint8 public constant decimals = 18;
HLTCLogic private logic;
event Burning(address indexed from, uint256 value, string proof, string ltcAddress, address burner);
event Burned(address indexed from, uint256 value, string proof, string ltcAddress);
event Minting(address indexed to, uint256 value, string proof, address minter);
event Minted(address indexed to, uint256 value, string proof);
constructor(address owner0, address owner1, address owner2) public{
}
function totalSupply() public view returns (uint256 supply) {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function mint(address to, uint256 value, string memory proof,bytes32 taskHash) public whenNotPaused returns(bool){
}
function burn(address from,uint256 value,string memory ltcAddress,string memory proof, bytes32 taskHash)
public whenNotPaused returns(bool){
}
function cancelTask(bytes32 taskHash) public returns(uint256){
}
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 allowance(address owner, address spender) public view returns (uint256 remaining){
}
function modifyAdminAddress(string memory class, address oldAddress, address newAddress) public whenPaused{
}
function getLogicAddress() public view returns(address){
}
function getStoreAddress() public view returns(address){
}
function pause() public{
require(<FILL_ME>)
doPause();
}
}
| itemAddressExists(PAUSERHASH,msg.sender),"wrong user to pauser" | 36,085 | itemAddressExists(PAUSERHASH,msg.sender) |
"Token doesn't implement INFTPokeStakeController" | pragma solidity 0.8.5;
contract NFTPokeUtility is
Utility,
ERC20Burnable,
ERC20Capped,
ERC165Storage,
ERC20Snapshot,
INFTPokeStakeControllerProxy
{
using ERC165Checker for address;
event TokenMinterAdded(address tokenMinter);
event TokenMinted(address owner, uint256 mintedTokens);
event TokenBurned(address owner, uint256 burnedTokens);
event TokenBurnedFrom(address owner, address account, uint256 burnedTokens);
address public stakeMinter;
uint256 public liquidityPoolTokens = 70107396870423500000000000;
uint256 public publicSellTokens = 46738264580282300000000000;
uint256 public privateSellTokens = 23369132290141200000000000;
uint256 public inGameRewardTokens = 11684566145070600000000000;
uint256 public rewardStakeMax = 81791963015494100000000000;
uint256 public rewardPerSecond = 300000000000000;
uint256 public rewardTokenPerSecond = 300000000000000;
uint256 public rewardStakePositionPerSecond = 100000000000000;
uint256 private constantValue = 1324200000;
uint256 private constantValue2 = 113242;
/**
* @dev NFTPokeUtility constructor
* Supports the IERC20 and IStakeProxy interfaces
* @param name_ of the token
* @param symbol_ of the token
* @param cap_ is the total supply
*/
constructor(
string memory name_,
string memory symbol_,
uint256 cap_
) ERC20(name_, symbol_) ERC20Capped(cap_) {
}
/**
* @dev See {ERC20-_mint and ERC20Capped-_mint}.
* @param account for who to mint new tokens
* @param amount amount to mint
*/
function _mint(address account, uint256 amount)
internal
virtual
override(ERC20, ERC20Capped)
{
}
/**
* @dev See {ERC20-_beforeTokenTransfer and ERC20Snapshot-_beforeTokenTransfer }.
* @param from who to send the tokens
* @param to who to send the tokens
* @param amount to be transferred
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20, ERC20Snapshot) {
}
/**
* @dev See {ERC20Snapshot-takeSnapshot}.
*/
function takeSnapshot() external onlyOwner returns (uint256) {
}
/**
* @dev Add a new contract that can mint tokens for users
* @param minter that has access to mint new tokens for a specific user
*/
function addTokenMinter(address minter) external onlyOwner {
require(stakeMinter == address(0), "Can't assign a new token minter");
require(<FILL_ME>)
stakeMinter = minter;
emit TokenMinterAdded(minter);
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public override {
}
/**
* See {ERC20-_burn} and {ERC20-allowance}.
*/
function burnFrom(address account, uint256 amount) public override {
}
bool public privateSellTokensMinted = false;
bool public publicSellTokensMinted = false;
bool public liquidityPoolTokensMinted = false;
bool public inGameRewardTokensMinted = false;
function mintForPrivateSell() external onlyOwner {
}
function mintForPublicSell() external onlyOwner {
}
function mintForLiquidityPoll() external onlyOwner {
}
function mintForInGameRewards() external onlyOwner {
}
/**
* @dev Modifier that checks to see if address who wants to mint has access
*/
modifier verifyStakeMinter() {
}
/**
* @dev Mint new tokens for a single NFT token
* @param owner that will receive new minted tokens
* @param token details for the NFT token
*/
function mintNewToken(address owner, NFTDetails memory token)
external
override
verifyStakeMinter
{
}
/**
* @dev Mint new tokens for multiple NFT tokens
* @param owner that will receive new minted tokens
* @param tokens details for the NFT tokens
*/
function mintNewTokens(address owner, NFTDetails[] memory tokens)
external
override
verifyStakeMinter
{
}
}
| minter.supportsInterface(type(INFTPokeStakeController).interfaceId),"Token doesn't implement INFTPokeStakeController" | 36,147 | minter.supportsInterface(type(INFTPokeStakeController).interfaceId) |
"Private sell tokens already minted" | pragma solidity 0.8.5;
contract NFTPokeUtility is
Utility,
ERC20Burnable,
ERC20Capped,
ERC165Storage,
ERC20Snapshot,
INFTPokeStakeControllerProxy
{
using ERC165Checker for address;
event TokenMinterAdded(address tokenMinter);
event TokenMinted(address owner, uint256 mintedTokens);
event TokenBurned(address owner, uint256 burnedTokens);
event TokenBurnedFrom(address owner, address account, uint256 burnedTokens);
address public stakeMinter;
uint256 public liquidityPoolTokens = 70107396870423500000000000;
uint256 public publicSellTokens = 46738264580282300000000000;
uint256 public privateSellTokens = 23369132290141200000000000;
uint256 public inGameRewardTokens = 11684566145070600000000000;
uint256 public rewardStakeMax = 81791963015494100000000000;
uint256 public rewardPerSecond = 300000000000000;
uint256 public rewardTokenPerSecond = 300000000000000;
uint256 public rewardStakePositionPerSecond = 100000000000000;
uint256 private constantValue = 1324200000;
uint256 private constantValue2 = 113242;
/**
* @dev NFTPokeUtility constructor
* Supports the IERC20 and IStakeProxy interfaces
* @param name_ of the token
* @param symbol_ of the token
* @param cap_ is the total supply
*/
constructor(
string memory name_,
string memory symbol_,
uint256 cap_
) ERC20(name_, symbol_) ERC20Capped(cap_) {
}
/**
* @dev See {ERC20-_mint and ERC20Capped-_mint}.
* @param account for who to mint new tokens
* @param amount amount to mint
*/
function _mint(address account, uint256 amount)
internal
virtual
override(ERC20, ERC20Capped)
{
}
/**
* @dev See {ERC20-_beforeTokenTransfer and ERC20Snapshot-_beforeTokenTransfer }.
* @param from who to send the tokens
* @param to who to send the tokens
* @param amount to be transferred
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20, ERC20Snapshot) {
}
/**
* @dev See {ERC20Snapshot-takeSnapshot}.
*/
function takeSnapshot() external onlyOwner returns (uint256) {
}
/**
* @dev Add a new contract that can mint tokens for users
* @param minter that has access to mint new tokens for a specific user
*/
function addTokenMinter(address minter) external onlyOwner {
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public override {
}
/**
* See {ERC20-_burn} and {ERC20-allowance}.
*/
function burnFrom(address account, uint256 amount) public override {
}
bool public privateSellTokensMinted = false;
bool public publicSellTokensMinted = false;
bool public liquidityPoolTokensMinted = false;
bool public inGameRewardTokensMinted = false;
function mintForPrivateSell() external onlyOwner {
require(<FILL_ME>)
privateSellTokensMinted = true;
_mint(msg.sender, privateSellTokens);
}
function mintForPublicSell() external onlyOwner {
}
function mintForLiquidityPoll() external onlyOwner {
}
function mintForInGameRewards() external onlyOwner {
}
/**
* @dev Modifier that checks to see if address who wants to mint has access
*/
modifier verifyStakeMinter() {
}
/**
* @dev Mint new tokens for a single NFT token
* @param owner that will receive new minted tokens
* @param token details for the NFT token
*/
function mintNewToken(address owner, NFTDetails memory token)
external
override
verifyStakeMinter
{
}
/**
* @dev Mint new tokens for multiple NFT tokens
* @param owner that will receive new minted tokens
* @param tokens details for the NFT tokens
*/
function mintNewTokens(address owner, NFTDetails[] memory tokens)
external
override
verifyStakeMinter
{
}
}
| !privateSellTokensMinted,"Private sell tokens already minted" | 36,147 | !privateSellTokensMinted |
"Public sell tokens already minted" | pragma solidity 0.8.5;
contract NFTPokeUtility is
Utility,
ERC20Burnable,
ERC20Capped,
ERC165Storage,
ERC20Snapshot,
INFTPokeStakeControllerProxy
{
using ERC165Checker for address;
event TokenMinterAdded(address tokenMinter);
event TokenMinted(address owner, uint256 mintedTokens);
event TokenBurned(address owner, uint256 burnedTokens);
event TokenBurnedFrom(address owner, address account, uint256 burnedTokens);
address public stakeMinter;
uint256 public liquidityPoolTokens = 70107396870423500000000000;
uint256 public publicSellTokens = 46738264580282300000000000;
uint256 public privateSellTokens = 23369132290141200000000000;
uint256 public inGameRewardTokens = 11684566145070600000000000;
uint256 public rewardStakeMax = 81791963015494100000000000;
uint256 public rewardPerSecond = 300000000000000;
uint256 public rewardTokenPerSecond = 300000000000000;
uint256 public rewardStakePositionPerSecond = 100000000000000;
uint256 private constantValue = 1324200000;
uint256 private constantValue2 = 113242;
/**
* @dev NFTPokeUtility constructor
* Supports the IERC20 and IStakeProxy interfaces
* @param name_ of the token
* @param symbol_ of the token
* @param cap_ is the total supply
*/
constructor(
string memory name_,
string memory symbol_,
uint256 cap_
) ERC20(name_, symbol_) ERC20Capped(cap_) {
}
/**
* @dev See {ERC20-_mint and ERC20Capped-_mint}.
* @param account for who to mint new tokens
* @param amount amount to mint
*/
function _mint(address account, uint256 amount)
internal
virtual
override(ERC20, ERC20Capped)
{
}
/**
* @dev See {ERC20-_beforeTokenTransfer and ERC20Snapshot-_beforeTokenTransfer }.
* @param from who to send the tokens
* @param to who to send the tokens
* @param amount to be transferred
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20, ERC20Snapshot) {
}
/**
* @dev See {ERC20Snapshot-takeSnapshot}.
*/
function takeSnapshot() external onlyOwner returns (uint256) {
}
/**
* @dev Add a new contract that can mint tokens for users
* @param minter that has access to mint new tokens for a specific user
*/
function addTokenMinter(address minter) external onlyOwner {
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public override {
}
/**
* See {ERC20-_burn} and {ERC20-allowance}.
*/
function burnFrom(address account, uint256 amount) public override {
}
bool public privateSellTokensMinted = false;
bool public publicSellTokensMinted = false;
bool public liquidityPoolTokensMinted = false;
bool public inGameRewardTokensMinted = false;
function mintForPrivateSell() external onlyOwner {
}
function mintForPublicSell() external onlyOwner {
require(<FILL_ME>)
publicSellTokensMinted = true;
_mint(msg.sender, publicSellTokens);
}
function mintForLiquidityPoll() external onlyOwner {
}
function mintForInGameRewards() external onlyOwner {
}
/**
* @dev Modifier that checks to see if address who wants to mint has access
*/
modifier verifyStakeMinter() {
}
/**
* @dev Mint new tokens for a single NFT token
* @param owner that will receive new minted tokens
* @param token details for the NFT token
*/
function mintNewToken(address owner, NFTDetails memory token)
external
override
verifyStakeMinter
{
}
/**
* @dev Mint new tokens for multiple NFT tokens
* @param owner that will receive new minted tokens
* @param tokens details for the NFT tokens
*/
function mintNewTokens(address owner, NFTDetails[] memory tokens)
external
override
verifyStakeMinter
{
}
}
| !publicSellTokensMinted,"Public sell tokens already minted" | 36,147 | !publicSellTokensMinted |
"Liquidity pool tokens already minted" | pragma solidity 0.8.5;
contract NFTPokeUtility is
Utility,
ERC20Burnable,
ERC20Capped,
ERC165Storage,
ERC20Snapshot,
INFTPokeStakeControllerProxy
{
using ERC165Checker for address;
event TokenMinterAdded(address tokenMinter);
event TokenMinted(address owner, uint256 mintedTokens);
event TokenBurned(address owner, uint256 burnedTokens);
event TokenBurnedFrom(address owner, address account, uint256 burnedTokens);
address public stakeMinter;
uint256 public liquidityPoolTokens = 70107396870423500000000000;
uint256 public publicSellTokens = 46738264580282300000000000;
uint256 public privateSellTokens = 23369132290141200000000000;
uint256 public inGameRewardTokens = 11684566145070600000000000;
uint256 public rewardStakeMax = 81791963015494100000000000;
uint256 public rewardPerSecond = 300000000000000;
uint256 public rewardTokenPerSecond = 300000000000000;
uint256 public rewardStakePositionPerSecond = 100000000000000;
uint256 private constantValue = 1324200000;
uint256 private constantValue2 = 113242;
/**
* @dev NFTPokeUtility constructor
* Supports the IERC20 and IStakeProxy interfaces
* @param name_ of the token
* @param symbol_ of the token
* @param cap_ is the total supply
*/
constructor(
string memory name_,
string memory symbol_,
uint256 cap_
) ERC20(name_, symbol_) ERC20Capped(cap_) {
}
/**
* @dev See {ERC20-_mint and ERC20Capped-_mint}.
* @param account for who to mint new tokens
* @param amount amount to mint
*/
function _mint(address account, uint256 amount)
internal
virtual
override(ERC20, ERC20Capped)
{
}
/**
* @dev See {ERC20-_beforeTokenTransfer and ERC20Snapshot-_beforeTokenTransfer }.
* @param from who to send the tokens
* @param to who to send the tokens
* @param amount to be transferred
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20, ERC20Snapshot) {
}
/**
* @dev See {ERC20Snapshot-takeSnapshot}.
*/
function takeSnapshot() external onlyOwner returns (uint256) {
}
/**
* @dev Add a new contract that can mint tokens for users
* @param minter that has access to mint new tokens for a specific user
*/
function addTokenMinter(address minter) external onlyOwner {
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public override {
}
/**
* See {ERC20-_burn} and {ERC20-allowance}.
*/
function burnFrom(address account, uint256 amount) public override {
}
bool public privateSellTokensMinted = false;
bool public publicSellTokensMinted = false;
bool public liquidityPoolTokensMinted = false;
bool public inGameRewardTokensMinted = false;
function mintForPrivateSell() external onlyOwner {
}
function mintForPublicSell() external onlyOwner {
}
function mintForLiquidityPoll() external onlyOwner {
require(<FILL_ME>)
liquidityPoolTokensMinted = true;
_mint(msg.sender, liquidityPoolTokens);
}
function mintForInGameRewards() external onlyOwner {
}
/**
* @dev Modifier that checks to see if address who wants to mint has access
*/
modifier verifyStakeMinter() {
}
/**
* @dev Mint new tokens for a single NFT token
* @param owner that will receive new minted tokens
* @param token details for the NFT token
*/
function mintNewToken(address owner, NFTDetails memory token)
external
override
verifyStakeMinter
{
}
/**
* @dev Mint new tokens for multiple NFT tokens
* @param owner that will receive new minted tokens
* @param tokens details for the NFT tokens
*/
function mintNewTokens(address owner, NFTDetails[] memory tokens)
external
override
verifyStakeMinter
{
}
}
| !liquidityPoolTokensMinted,"Liquidity pool tokens already minted" | 36,147 | !liquidityPoolTokensMinted |
"In game reward tokens already minted" | pragma solidity 0.8.5;
contract NFTPokeUtility is
Utility,
ERC20Burnable,
ERC20Capped,
ERC165Storage,
ERC20Snapshot,
INFTPokeStakeControllerProxy
{
using ERC165Checker for address;
event TokenMinterAdded(address tokenMinter);
event TokenMinted(address owner, uint256 mintedTokens);
event TokenBurned(address owner, uint256 burnedTokens);
event TokenBurnedFrom(address owner, address account, uint256 burnedTokens);
address public stakeMinter;
uint256 public liquidityPoolTokens = 70107396870423500000000000;
uint256 public publicSellTokens = 46738264580282300000000000;
uint256 public privateSellTokens = 23369132290141200000000000;
uint256 public inGameRewardTokens = 11684566145070600000000000;
uint256 public rewardStakeMax = 81791963015494100000000000;
uint256 public rewardPerSecond = 300000000000000;
uint256 public rewardTokenPerSecond = 300000000000000;
uint256 public rewardStakePositionPerSecond = 100000000000000;
uint256 private constantValue = 1324200000;
uint256 private constantValue2 = 113242;
/**
* @dev NFTPokeUtility constructor
* Supports the IERC20 and IStakeProxy interfaces
* @param name_ of the token
* @param symbol_ of the token
* @param cap_ is the total supply
*/
constructor(
string memory name_,
string memory symbol_,
uint256 cap_
) ERC20(name_, symbol_) ERC20Capped(cap_) {
}
/**
* @dev See {ERC20-_mint and ERC20Capped-_mint}.
* @param account for who to mint new tokens
* @param amount amount to mint
*/
function _mint(address account, uint256 amount)
internal
virtual
override(ERC20, ERC20Capped)
{
}
/**
* @dev See {ERC20-_beforeTokenTransfer and ERC20Snapshot-_beforeTokenTransfer }.
* @param from who to send the tokens
* @param to who to send the tokens
* @param amount to be transferred
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20, ERC20Snapshot) {
}
/**
* @dev See {ERC20Snapshot-takeSnapshot}.
*/
function takeSnapshot() external onlyOwner returns (uint256) {
}
/**
* @dev Add a new contract that can mint tokens for users
* @param minter that has access to mint new tokens for a specific user
*/
function addTokenMinter(address minter) external onlyOwner {
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public override {
}
/**
* See {ERC20-_burn} and {ERC20-allowance}.
*/
function burnFrom(address account, uint256 amount) public override {
}
bool public privateSellTokensMinted = false;
bool public publicSellTokensMinted = false;
bool public liquidityPoolTokensMinted = false;
bool public inGameRewardTokensMinted = false;
function mintForPrivateSell() external onlyOwner {
}
function mintForPublicSell() external onlyOwner {
}
function mintForLiquidityPoll() external onlyOwner {
}
function mintForInGameRewards() external onlyOwner {
require(<FILL_ME>)
inGameRewardTokensMinted = true;
_mint(msg.sender, inGameRewardTokens);
}
/**
* @dev Modifier that checks to see if address who wants to mint has access
*/
modifier verifyStakeMinter() {
}
/**
* @dev Mint new tokens for a single NFT token
* @param owner that will receive new minted tokens
* @param token details for the NFT token
*/
function mintNewToken(address owner, NFTDetails memory token)
external
override
verifyStakeMinter
{
}
/**
* @dev Mint new tokens for multiple NFT tokens
* @param owner that will receive new minted tokens
* @param tokens details for the NFT tokens
*/
function mintNewTokens(address owner, NFTDetails[] memory tokens)
external
override
verifyStakeMinter
{
}
}
| !inGameRewardTokensMinted,"In game reward tokens already minted" | 36,147 | !inGameRewardTokensMinted |
"Adopt has not begun yet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract CuddlyReindeer is Ownable, ERC721A, ReentrancyGuard {
string public baseTokenURI;
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
struct SaleConfig {
uint32 adoptStartTime;
uint64 adoptPrice;
}
SaleConfig public saleConfig;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_
) ERC721A("Cuddly Reindeer", "CR", maxBatchSize_, collectionSize_) {
}
//Prevent mint from another contract
modifier callerIsUser() {
}
function adopt(uint256 quantity)
external
payable
callerIsUser
{
SaleConfig memory config = saleConfig;
uint256 adoptPrice = uint256(config.adoptPrice);
uint256 adoptStartTime = uint256(config.adoptStartTime);
require(<FILL_ME>)
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(
numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint,
"can not adopt this many"
);
_safeMint(msg.sender, quantity);
if (adoptPrice > 0){
refundIfOver(adoptPrice * quantity);
}
}
function refundIfOver(uint256 price) private {
}
function isAdoptOn(
uint256 adoptStartTime
) public view returns (bool) {
}
function setupAdoptInfo(
uint64 adoptPriceWei,
uint32 adoptStartTime
) external onlyOwner {
}
// For giveaways etc.
function devAdopt(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| isAdoptOn(adoptStartTime),"Adopt has not begun yet" | 36,343 | isAdoptOn(adoptStartTime) |
"can not adopt this many" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract CuddlyReindeer is Ownable, ERC721A, ReentrancyGuard {
string public baseTokenURI;
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
struct SaleConfig {
uint32 adoptStartTime;
uint64 adoptPrice;
}
SaleConfig public saleConfig;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_
) ERC721A("Cuddly Reindeer", "CR", maxBatchSize_, collectionSize_) {
}
//Prevent mint from another contract
modifier callerIsUser() {
}
function adopt(uint256 quantity)
external
payable
callerIsUser
{
SaleConfig memory config = saleConfig;
uint256 adoptPrice = uint256(config.adoptPrice);
uint256 adoptStartTime = uint256(config.adoptStartTime);
require(
isAdoptOn(adoptStartTime),
"Adopt has not begun yet"
);
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
if (adoptPrice > 0){
refundIfOver(adoptPrice * quantity);
}
}
function refundIfOver(uint256 price) private {
}
function isAdoptOn(
uint256 adoptStartTime
) public view returns (bool) {
}
function setupAdoptInfo(
uint64 adoptPriceWei,
uint32 adoptStartTime
) external onlyOwner {
}
// For giveaways etc.
function devAdopt(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| numberMinted(msg.sender)+quantity<=maxPerAddressDuringMint,"can not adopt this many" | 36,343 | numberMinted(msg.sender)+quantity<=maxPerAddressDuringMint |
"too many already minted before dev mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract CuddlyReindeer is Ownable, ERC721A, ReentrancyGuard {
string public baseTokenURI;
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
struct SaleConfig {
uint32 adoptStartTime;
uint64 adoptPrice;
}
SaleConfig public saleConfig;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_
) ERC721A("Cuddly Reindeer", "CR", maxBatchSize_, collectionSize_) {
}
//Prevent mint from another contract
modifier callerIsUser() {
}
function adopt(uint256 quantity)
external
payable
callerIsUser
{
}
function refundIfOver(uint256 price) private {
}
function isAdoptOn(
uint256 adoptStartTime
) public view returns (bool) {
}
function setupAdoptInfo(
uint64 adoptPriceWei,
uint32 adoptStartTime
) external onlyOwner {
}
// For giveaways etc.
function devAdopt(uint256 quantity) external onlyOwner {
require(<FILL_ME>)
require(
quantity % maxBatchSize == 0,
"can only mint a multiple of the maxBatchSize"
);
uint256 numChunks = quantity / maxBatchSize;
for (uint256 i = 0; i < numChunks; i++) {
_safeMint(msg.sender, maxBatchSize);
}
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| totalSupply()+quantity<=amountForDevs,"too many already minted before dev mint" | 36,343 | totalSupply()+quantity<=amountForDevs |
"Token doesn't exist" | pragma solidity ^0.5.4;
contract ERC721OBackwardCompatible is ERC721OComposable {
using UintsLib for uint256;
// Interface constants
bytes4 internal constant INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 internal constant INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 internal constant INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;
// Reciever constants
bytes4 internal constant ERC721_RECEIVED = 0x150b7a02;
// Metadata URI
string internal baseTokenURI;
constructor(string memory _baseTokenURI) public ERC721OBase() {
}
// ERC721 compatibility
function implementsERC721() public pure returns (bool) {
}
/**
* @dev Gets the owner of a given NFT
* @param _tokenId uint256 representing the unique token identifier
* @return address the owner of the token
*/
function ownerOf(uint256 _tokenId) public view returns (address) {
}
/**
* @dev Gets the number of tokens owned by the address we are checking
* @param _owner The adddress we are checking
* @return balance The unique amount of tokens owned
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
// ERC721 - Enumerable compatibility
/**
* @dev Gets the token ID at a given index of all the tokens in this contract
* Reverts if the index is greater or equal to the total number of tokens
* @param _index uint256 representing the index to be accessed of the tokens list
* @return uint256 token ID at the given index of the tokens list
*/
function tokenByIndex(uint256 _index) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256 _tokenId) {
}
// ERC721 - Metadata compatibility
function tokenURI(uint256 _tokenId) public view returns (string memory tokenUri) {
require(<FILL_ME>)
return string(abi.encodePacked(
baseTokenURI,
_tokenId.uint2str(),
".json"
));
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* @param _tokenId uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint256 _tokenId) public view returns (address) {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public nonReentrant {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public {
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address
* The call is not executed if the target address is not a contract
* @param _from address representing the previous owner of the given token ID
* @param _to target address that will receive the tokens
* @param _tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallSafeTransfer(
address _from,
address _to,
uint256 _tokenId,
bytes memory _data
) internal returns (bool) {
}
}
| exists(_tokenId),"Token doesn't exist" | 36,373 | exists(_tokenId) |
"Sent to a contract which is not an ERC721 receiver" | pragma solidity ^0.5.4;
contract ERC721OBackwardCompatible is ERC721OComposable {
using UintsLib for uint256;
// Interface constants
bytes4 internal constant INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 internal constant INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 internal constant INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;
// Reciever constants
bytes4 internal constant ERC721_RECEIVED = 0x150b7a02;
// Metadata URI
string internal baseTokenURI;
constructor(string memory _baseTokenURI) public ERC721OBase() {
}
// ERC721 compatibility
function implementsERC721() public pure returns (bool) {
}
/**
* @dev Gets the owner of a given NFT
* @param _tokenId uint256 representing the unique token identifier
* @return address the owner of the token
*/
function ownerOf(uint256 _tokenId) public view returns (address) {
}
/**
* @dev Gets the number of tokens owned by the address we are checking
* @param _owner The adddress we are checking
* @return balance The unique amount of tokens owned
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
// ERC721 - Enumerable compatibility
/**
* @dev Gets the token ID at a given index of all the tokens in this contract
* Reverts if the index is greater or equal to the total number of tokens
* @param _index uint256 representing the index to be accessed of the tokens list
* @return uint256 token ID at the given index of the tokens list
*/
function tokenByIndex(uint256 _index) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256 _tokenId) {
}
// ERC721 - Metadata compatibility
function tokenURI(uint256 _tokenId) public view returns (string memory tokenUri) {
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* @param _tokenId uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint256 _tokenId) public view returns (address) {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public nonReentrant {
_transferFrom(_from, _to, _tokenId, 1);
require(<FILL_ME>)
}
function transferFrom(address _from, address _to, uint256 _tokenId) public {
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address
* The call is not executed if the target address is not a contract
* @param _from address representing the previous owner of the given token ID
* @param _to target address that will receive the tokens
* @param _tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return whether the call correctly returned the expected magic value
*/
function _checkAndCallSafeTransfer(
address _from,
address _to,
uint256 _tokenId,
bytes memory _data
) internal returns (bool) {
}
}
| _checkAndCallSafeTransfer(_from,_to,_tokenId,_data),"Sent to a contract which is not an ERC721 receiver" | 36,373 | _checkAndCallSafeTransfer(_from,_to,_tokenId,_data) |
"NOT_FROM_CONTRACT" | // SPDX-License-Identifier: Apache-2.0
/*
* Copyright 2020, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pragma solidity ^0.6.11;
import "arb-bridge-eth/contracts/libraries/Whitelist.sol";
import { L1ArbitrumMessenger } from "../../libraries/gateway/ArbitrumMessenger.sol";
import "../../libraries/gateway/GatewayRouter.sol";
import "../../arbitrum/gateway/L2GatewayRouter.sol";
/**
* @title Handles deposits from Erhereum into Arbitrum. Tokens are routered to their appropriate L1 gateway (Router itself also conforms to the Gateway itnerface).
* @notice Router also serves as an L1-L2 token address oracle.
*/
contract L1GatewayRouter is WhitelistConsumer, L1ArbitrumMessenger, GatewayRouter {
address public owner;
address public inbox;
modifier onlyOwner {
}
function initialize(
address _owner,
address _defaultGateway,
address _whitelist,
address _counterpartGateway,
address _inbox
) public virtual {
}
function sendTxToL2(
address _user,
uint256 _l2CallValue,
uint256 _maxSubmissionCost,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes memory _data
) internal virtual returns (uint256) {
}
function setDefaultGateway(
address newL1DefaultGateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable virtual onlyOwner returns (uint256) {
}
function setOwner(address newOwner) external onlyOwner {
}
function _setGateways(
address[] memory _token,
address[] memory _gateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) internal returns (uint256) {
}
function setGateway(
address _gateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable returns (uint256) {
require(<FILL_ME>)
require(_gateway.isContract(), "NOT_TO_CONTRACT");
address[] memory _tokenArr = new address[](1);
_tokenArr[0] = address(msg.sender);
address[] memory _gatewayArr = new address[](1);
_gatewayArr[0] = _gateway;
return _setGateways(_tokenArr, _gatewayArr, _maxGas, _gasPriceBid, _maxSubmissionCost);
}
function setGateways(
address[] memory _token,
address[] memory _gateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable onlyOwner returns (uint256) {
}
function outboundTransfer(
address _token,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) public payable virtual override onlyWhitelisted returns (bytes memory) {
}
function isCounterpartGateway(address _target) internal view virtual override returns (bool) {
}
}
| address(msg.sender).isContract(),"NOT_FROM_CONTRACT" | 36,401 | address(msg.sender).isContract() |
"NOT_TO_CONTRACT" | // SPDX-License-Identifier: Apache-2.0
/*
* Copyright 2020, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pragma solidity ^0.6.11;
import "arb-bridge-eth/contracts/libraries/Whitelist.sol";
import { L1ArbitrumMessenger } from "../../libraries/gateway/ArbitrumMessenger.sol";
import "../../libraries/gateway/GatewayRouter.sol";
import "../../arbitrum/gateway/L2GatewayRouter.sol";
/**
* @title Handles deposits from Erhereum into Arbitrum. Tokens are routered to their appropriate L1 gateway (Router itself also conforms to the Gateway itnerface).
* @notice Router also serves as an L1-L2 token address oracle.
*/
contract L1GatewayRouter is WhitelistConsumer, L1ArbitrumMessenger, GatewayRouter {
address public owner;
address public inbox;
modifier onlyOwner {
}
function initialize(
address _owner,
address _defaultGateway,
address _whitelist,
address _counterpartGateway,
address _inbox
) public virtual {
}
function sendTxToL2(
address _user,
uint256 _l2CallValue,
uint256 _maxSubmissionCost,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes memory _data
) internal virtual returns (uint256) {
}
function setDefaultGateway(
address newL1DefaultGateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable virtual onlyOwner returns (uint256) {
}
function setOwner(address newOwner) external onlyOwner {
}
function _setGateways(
address[] memory _token,
address[] memory _gateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) internal returns (uint256) {
}
function setGateway(
address _gateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable returns (uint256) {
require(address(msg.sender).isContract(), "NOT_FROM_CONTRACT");
require(<FILL_ME>)
address[] memory _tokenArr = new address[](1);
_tokenArr[0] = address(msg.sender);
address[] memory _gatewayArr = new address[](1);
_gatewayArr[0] = _gateway;
return _setGateways(_tokenArr, _gatewayArr, _maxGas, _gasPriceBid, _maxSubmissionCost);
}
function setGateways(
address[] memory _token,
address[] memory _gateway,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable onlyOwner returns (uint256) {
}
function outboundTransfer(
address _token,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) public payable virtual override onlyWhitelisted returns (bytes memory) {
}
function isCounterpartGateway(address _target) internal view virtual override returns (bool) {
}
}
| _gateway.isContract(),"NOT_TO_CONTRACT" | 36,401 | _gateway.isContract() |
"NOT_WHITELISTED" | // SPDX-License-Identifier: Apache-2.0
/*
* Copyright 2020, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pragma solidity ^0.6.11;
import "./L1ArbitrumExtendedGateway.sol";
import "../../arbitrum/gateway/L2CustomGateway.sol";
import "../../libraries/gateway/ICustomGateway.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "arb-bridge-eth/contracts/libraries/Whitelist.sol";
/**
* @title Gatway for "custom" bridging functionality
* @notice Handles some (but not all!) custom Gateway needs.
*/
contract L1CustomGateway is L1ArbitrumExtendedGateway, ICustomGateway {
using Address for address;
// stores addresses of L2 tokens to be used
mapping(address => address) public override l1ToL2Token;
// owner is able to force add custom mappings
address public owner;
/// start whitelist consumer
address public whitelist;
event WhitelistSourceUpdated(address newSource);
modifier onlyWhitelisted {
if (whitelist != address(0)) {
require(<FILL_ME>)
}
_;
}
function updateWhitelistSource(address newSource) external {
}
// end whitelist consumer
function initialize(
address _l1Counterpart,
address _l1Router,
address _inbox,
address _owner
) public virtual {
}
function postUpgradeInit() external {
}
/**
* @notice Deposit ERC20 token from Ethereum into Arbitrum. If L2 side hasn't been deployed yet, includes name/symbol/decimals data for initial L2 deploy. Initiate by GatewayRouter.
* @param _l1Token L1 address of ERC20
* @param _to account to be credited with the tokens in the L2 (can be the user's L2 account or a contract)
* @param _amount Token Amount
* @param _maxGas Max gas deducted from user's L2 balance to cover L2 execution
* @param _gasPriceBid Gas price for L2 execution
* @param _data encoded data from router and user
* @return res abi encoded inbox sequence number
*/
// * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee
function outboundTransfer(
address _l1Token,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) public payable virtual override onlyWhitelisted returns (bytes memory) {
}
/**
* @notice Calculate the address used when bridging an ERC20 token
* @dev this always returns the same as the L1 oracle, but may be out of date.
* For example, a custom token may have been registered but not deploy or the contract self destructed.
* @param l1ERC20 address of L1 token
* @return L2 address of a bridged ERC20 token
*/
function _calculateL2TokenAddress(address l1ERC20)
internal
view
virtual
override
returns (address)
{
}
/**
* @notice Allows L1 Token contract to trustlessly register its custom L2 counterpart.
* @param _l2Address counterpart address of L1 token
* @param _maxGas max gas for L2 retryable exrecution
* @param _gasPriceBid gas price for L2 retryable ticket
* @param _maxSubmissionCost base submission cost L2 retryable tick3et
* @return Retryable ticket ID
*/
function registerTokenToL2(
address _l2Address,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable virtual returns (uint256) {
}
/**
* @notice Allows owner to force register a custom L1/L2 token pair.
* @dev _l1Addresses[i] counterpart is assumed to be _l2Addresses[i]
* @param _l1Addresses array of L1 addresses
* @param _l2Addresses array of L2 addresses
* @param _maxGas max gas for L2 retryable exrecution
* @param _gasPriceBid gas price for L2 retryable ticket
* @param _maxSubmissionCost base submission cost L2 retryable tick3et
* @return Retryable ticket ID
*/
function forceRegisterTokenToL2(
address[] calldata _l1Addresses,
address[] calldata _l2Addresses,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost
) external payable virtual returns (uint256) {
}
}
| Whitelist(whitelist).isAllowed(msg.sender),"NOT_WHITELISTED" | 36,402 | Whitelist(whitelist).isAllowed(msg.sender) |
"Ran out of NFTs for sale" | //"SPDX-License-Identifier: UNLICENSED"
pragma solidity ^0.8.7;
pragma experimental ABIEncoderV2;
contract SimpleCollectible is ERC721, Ownable {
uint256 public tokenCounter;
uint256 public _totalSupply = 100;
string private _baseTokenURI;
constructor () ERC721 ("Random Spookies","RAND") {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mintWithWGPass(address _user) public {
require(msg.sender == address(0x1B7c412E7D83Daf1Bf13bb0DbAc471C71AfaC9af), "Only WhaleGoddess Mint Pass contract may mint");
require(<FILL_ME>)
createCollectible(_user);
}
function createCollectible(address _user) private {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getBaseURI() public view returns (string memory){
}
}
| (1+tokenCounter)<=_totalSupply,"Ran out of NFTs for sale" | 36,416 | (1+tokenCounter)<=_totalSupply |
"stakeFor: referral isn't set" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IMintableBurnableERC20.sol";
import "./interfaces/IReferralRewardsV2.sol";
abstract contract RewardsV2 is Ownable {
using SafeMath for uint256;
event Deposit(
address indexed user,
uint256 indexed id,
uint256 amount,
uint256 start,
uint256 end
);
event Withdraw(
address indexed user,
uint256 indexed id,
uint256 amount,
uint256 ended,
uint256 time
);
event RewardPaid(address indexed user, uint256 amount);
// Info of each deposit made by the user
struct DepositInfo {
uint256 amount; // Amount of deposited LP tokens
uint256 time; // Wnen the deposit is ended
}
// Info of each user
struct UserInfo {
uint256 amount; // Total deposited amount
uint256 unfrozen; // Amount of token to be unstaked
uint256 reward; // Ammount of claimed rewards
uint256 claimable; // Ammount of claimable rewards
uint256 lastUpdate; // Last time the user claimed rewards
uint256 depositHead; // The start index in the deposit's list
uint256 depositTail; // The end index in the deposit's list
mapping(uint256 => DepositInfo) deposits; // User's dposits
}
IMintableBurnableERC20 public token; // Harvested token contract
IReferralRewardsV2 public referralRewards; // Contract that manages referral rewards
uint256 public duration; // How long the deposit works
uint256 public rewardPerSec; // Reward rate generated each second
uint256 public totalStake; // Amount of all staked LP tokens
uint256 public totalClaimed; // Amount of all distributed rewards
uint256 public lastUpdate; // Last time someone received rewards
bool public isActive; // If the deposits are allowed
mapping(address => UserInfo) public userInfo; // Info per each user
/// @dev Constructor that initializes the most important configurations.
/// @param _token Token to be staked and harvested.
/// @param _duration How long the deposit works.
/// @param _rewardPerSec Reward rate generated each second.
constructor(
IMintableBurnableERC20 _token,
uint256 _duration,
uint256 _rewardPerSec
) public Ownable() {
}
/// @dev Allows an owner to stop or countinue deposits.
/// @param _isActive Whether the deposits are allowed.
function setActive(bool _isActive) public onlyOwner {
}
/// @dev Allows an owner to update referral rewardsV2 module.
/// @param _referralRewards Contract that manages referral rewardsV2.
function setReferralRewards(IReferralRewardsV2 _referralRewards)
public
onlyOwner
{
}
/// @dev Allows an owner to update duration of the deposits.
/// @param _duration How long the deposit works.
function setDuration(uint256 _duration) public onlyOwner {
}
/// @dev Allows an owner to update reward rate per sec.
/// @param _rewardPerSec Reward rate generated each second.
function setRewardPerSec(uint256 _rewardPerSec) public onlyOwner {
}
/// @dev Allows to stake for the specific user.
/// @param _user Deposit receiver.
/// @param _amount Amount of deposit.
function stakeFor(address _user, uint256 _amount) public {
require(<FILL_ME>)
proccessStake(_user, _amount, address(0), 0);
}
/// @dev Allows to stake for themselves.
/// @param _amount Amount of deposit.
/// @param _refferal Referral address that will be set in case of the first stake.
/// @param _reinvest Whether the tokens should be reinvested.
function stake(
uint256 _amount,
address _refferal,
uint256 _reinvest
) public {
}
/// @dev Allows to stake for themselves.
/// @param _count Max amount of claimed deposits.
function claimDeposits(uint256 _count) public {
}
/// @dev Allows to stake for themselves.
/// @param _amount Max amount of claimed deposits.
function claim(uint256 _amount) public {
}
/// @dev Proccess the stake.
/// @param _receiver Deposit receiver.
/// @param _amount Amount of deposit.
/// @param _refferal Referral address that will be set in case of the first stake.
/// @param _reinvest Whether the tokens should be reinvested.
function proccessStake(
address _receiver,
uint256 _amount,
address _refferal,
uint256 _reinvest
) internal virtual {
}
/// @dev Proccess the stake.
/// @param _receiver Deposit receiver.
/// @param _amount Amount of deposit.
/// @param _reinvest Whether the tokens should be reinvested.
function proccessClaim(
address _receiver,
uint256 _amount,
bool _reinvest
) internal virtual {
}
/// @dev Assess new reward.
/// @param _user Address of the user.
function updateStakingReward(address _user) internal {
}
/// @dev Add the deposit.
/// @param _receiver Deposit receiver.
/// @param _amount Amount of deposit.
/// @param _refferal Referral address that will be set in case of the first stake.
function addDeposit(
address _receiver,
uint256 _amount,
address _refferal
) internal virtual {
}
/// @dev Accumulate new reward and remove old deposits.
/// @param _user Address of the user.
/// @param _count How many deposits to claim.
function executeUnstakes(address _user, uint256 _count) internal virtual {
}
/// @dev Safe token transfer.
/// @param _to Address of the receiver.
/// @param _amount Amount of the tokens to be sent.
function safeTokenTransfer(address _to, uint256 _amount) internal {
}
/// @dev Returns user's unclaimed reward.
/// @param _user Address of the user.
/// @param _includeDeposit Should the finnished deposits be included into calculations.
/// @return _reward User's reward.
function getPendingReward(address _user, bool _includeDeposit)
public
view
virtual
returns (uint256 _reward)
{
}
/// @dev Returns claimed and unclaimed user's reward.
/// @param _user Address of the user.
/// @return _reward User's reward.
function getReward(address _user)
public
view
virtual
returns (uint256 _reward)
{
}
/// @dev Returns approximate reward assessed in the future.
/// @param _delta Time to estimate.
/// @return Predicted rewardsV2.
function getEstimated(uint256 _delta) public view returns (uint256) {
}
/// @dev Returns user's deposit by id.
/// @param _user Address of user.
/// @param _id Deposit id.
/// @return Deposited amount and deposit end time.
function getDeposit(address _user, uint256 _id)
public
view
returns (uint256, uint256)
{
}
/// @dev Returns user's ended deposits.
/// @param _user Address of the user.
/// @return _count Number of the deposit's that can be withdrawn.
function getEndedDepositsCount(address _user)
public
view
virtual
returns (uint256 _count)
{
}
}
| referralRewards.getReferral(_user)!=address(0),"stakeFor: referral isn't set" | 36,477 | referralRewards.getReferral(_user)!=address(0) |
"could not transfer tokens" | /**
Copyright 2019 PoolTogether LLC
This file is part of PoolTogether.
PoolTogether is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation under version 3 of the License.
PoolTogether is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PoolTogether. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity >=0.6.0 <0.7.0;
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@pooltogether/fixed-point/contracts/FixedPoint.sol";
import "./ERC20Mintable.sol";
contract CTokenMock is ERC20Upgradeable {
mapping(address => uint256) internal ownerTokenAmounts;
ERC20Mintable public underlying;
uint256 internal __supplyRatePerBlock;
constructor (
ERC20Mintable _token,
uint256 _supplyRatePerBlock
) public {
}
function mint(uint256 amount) external returns (uint) {
uint256 newCTokens;
if (totalSupply() == 0) {
newCTokens = amount;
} else {
// they need to hold the same assets as tokens.
// Need to calculate the current exchange rate
uint256 fractionOfCredit = FixedPoint.calculateMantissa(amount, underlying.balanceOf(address(this)));
newCTokens = FixedPoint.multiplyUintByMantissa(totalSupply(), fractionOfCredit);
}
_mint(msg.sender, newCTokens);
require(<FILL_ME>)
return 0;
}
function getCash() external view returns (uint) {
}
function redeemUnderlying(uint256 requestedAmount) external returns (uint) {
}
function accrue() external {
}
function accrueCustom(uint256 amount) external {
}
function burn(uint256 amount) external {
}
function cTokenValueOf(uint256 tokens) public view returns (uint256) {
}
function balanceOfUnderlying(address account) public view returns (uint) {
}
function exchangeRateCurrent() public view returns (uint256) {
}
function supplyRatePerBlock() external view returns (uint) {
}
function setSupplyRateMantissa(uint256 _supplyRatePerBlock) external {
}
}
| underlying.transferFrom(msg.sender,address(this),amount),"could not transfer tokens" | 36,489 | underlying.transferFrom(msg.sender,address(this),amount) |
"could not transfer tokens" | /**
Copyright 2019 PoolTogether LLC
This file is part of PoolTogether.
PoolTogether is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation under version 3 of the License.
PoolTogether is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PoolTogether. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity >=0.6.0 <0.7.0;
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@pooltogether/fixed-point/contracts/FixedPoint.sol";
import "./ERC20Mintable.sol";
contract CTokenMock is ERC20Upgradeable {
mapping(address => uint256) internal ownerTokenAmounts;
ERC20Mintable public underlying;
uint256 internal __supplyRatePerBlock;
constructor (
ERC20Mintable _token,
uint256 _supplyRatePerBlock
) public {
}
function mint(uint256 amount) external returns (uint) {
}
function getCash() external view returns (uint) {
}
function redeemUnderlying(uint256 requestedAmount) external returns (uint) {
uint256 cTokens = cTokenValueOf(requestedAmount);
_burn(msg.sender, cTokens);
require(<FILL_ME>)
}
function accrue() external {
}
function accrueCustom(uint256 amount) external {
}
function burn(uint256 amount) external {
}
function cTokenValueOf(uint256 tokens) public view returns (uint256) {
}
function balanceOfUnderlying(address account) public view returns (uint) {
}
function exchangeRateCurrent() public view returns (uint256) {
}
function supplyRatePerBlock() external view returns (uint) {
}
function setSupplyRateMantissa(uint256 _supplyRatePerBlock) external {
}
}
| underlying.transfer(msg.sender,requestedAmount),"could not transfer tokens" | 36,489 | underlying.transfer(msg.sender,requestedAmount) |
null | pragma solidity ^0.4.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
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) {
}
}
/**
* @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 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 allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() public onlyOwner whenNotPaused returns(bool) {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() public onlyOwner whenPaused returns(bool) {
}
}
contract ERC20 {
uint256 public totalSupply;
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) constant public returns(uint256 balance);
function approve(address _spender, uint256 _value) public returns(bool success);
function allowance(address _owner, address _spender) constant public returns(uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract BasicToken is ERC20, Pausable {
using SafeMath for uint256;
event Frozen(address indexed _address, bool _value);
mapping(address => uint256) balances;
mapping(address => bool) public frozens;
mapping(address => mapping(address => uint256)) allowed;
function _transfer(address _from, address _to, uint256 _value) internal returns(bool success) {
require(_to != 0x0);
require(_value > 0);
require(<FILL_ME>)
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
function transfer(address _to, uint256 _value) public whenNotPaused returns(bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns(bool success) {
}
function balanceOf(address _owner) constant public returns(uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns(bool success) {
}
function allowance(address _owner, address _spender) constant public returns(uint256 remaining) {
}
function freeze(address[] _targets, bool _value) public onlyOwner returns(bool success) {
}
function transferMulti(address[] _to, uint256[] _value) public whenNotPaused returns(bool success) {
}
}
contract TBToken is BasicToken {
string public constant name = "ThailandBlockchainToken";
string public constant symbol = "TBT";
uint256 public constant decimals = 18;
constructor() public {
}
function assign(address _address, uint256 _value) private {
}
}
| frozens[_from]==false | 36,533 | frozens[_from]==false |
null | pragma solidity ^0.4.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
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) {
}
}
/**
* @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 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 allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() public onlyOwner whenNotPaused returns(bool) {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() public onlyOwner whenPaused returns(bool) {
}
}
contract ERC20 {
uint256 public totalSupply;
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) constant public returns(uint256 balance);
function approve(address _spender, uint256 _value) public returns(bool success);
function allowance(address _owner, address _spender) constant public returns(uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract BasicToken is ERC20, Pausable {
using SafeMath for uint256;
event Frozen(address indexed _address, bool _value);
mapping(address => uint256) balances;
mapping(address => bool) public frozens;
mapping(address => mapping(address => uint256)) allowed;
function _transfer(address _from, address _to, uint256 _value) internal returns(bool success) {
}
function transfer(address _to, uint256 _value) public whenNotPaused returns(bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns(bool success) {
}
function balanceOf(address _owner) constant public returns(uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns(bool success) {
}
function allowance(address _owner, address _spender) constant public returns(uint256 remaining) {
}
function freeze(address[] _targets, bool _value) public onlyOwner returns(bool success) {
}
function transferMulti(address[] _to, uint256[] _value) public whenNotPaused returns(bool success) {
require(_to.length > 0);
require(_to.length <= 255);
require(_to.length == _value.length);
require(<FILL_ME>)
uint8 i;
uint256 amount;
for (i = 0; i < _to.length; i++) {
assert(_to[i] != 0x0);
assert(_value[i] > 0);
amount = amount.add(_value[i]);
}
require(balances[msg.sender] >= amount);
balances[msg.sender] = balances[msg.sender].sub(amount);
for (i = 0; i < _to.length; i++) {
balances[_to[i]] = balances[_to[i]].add(_value[i]);
emit Transfer(msg.sender, _to[i], _value[i]);
}
return true;
}
}
contract TBToken is BasicToken {
string public constant name = "ThailandBlockchainToken";
string public constant symbol = "TBT";
uint256 public constant decimals = 18;
constructor() public {
}
function assign(address _address, uint256 _value) private {
}
}
| frozens[msg.sender]==false | 36,533 | frozens[msg.sender]==false |
null | pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// 'BitrnxAAA TOKEN' token contract
//
// Symbol : BIT-CCC
// Name : BitrnxCCC
// Total supply: 200000000
// Decimals : 8
//
//
// (c) by atom-solutions 2018. The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
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) {
}
}
/**
* @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 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 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 Eternal Token
* @dev DistributableToken contract is based on a simple initial supply token, with an API for the owner to perform bulk distributions.
* transactions to the distributeTokens function should be paginated to avoid gas limits or computational time restrictions.
*/
contract BITRNXCCC is StandardToken, Ownable {
string public constant name = "BITRNXCCC";
string public constant symbol = "BIT-CCC";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals));
//prevent duplicate distributions
mapping (address => bool) distributionLocks;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() public {
}
/**
* @dev Distribute tokens to multiple addresses in a single transaction
*
* @param addresses A list of addresses to distribute to
* @param values A corresponding list of amounts to distribute to each address
*/
function anailNathrachOrthaBhaisIsBeathaDoChealDeanaimh(address[] addresses, uint256[] values) onlyOwner public returns (bool success) {
require(addresses.length == values.length);
for (uint i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
transfer(addresses[i], values[i]);
distributionLocks[addresses[i]] = true;
}
return true;
}
}
| !distributionLocks[addresses[i]] | 36,579 | !distributionLocks[addresses[i]] |
null | /**
Team8 with association with CRYPTO-CHADS present:
██▓███ ▄▄▄ ███▄ █ ▓█████▄ ▒█████ ██▀███ ▄▄▄ ██████
▓██░ ██▒▒████▄ ██ ▀█ █ ▒██▀ ██▌▒██▒ ██▒▓██ ▒ ██▒▒████▄ ▒██ ▒
▓██░ ██▓▒▒██ ▀█▄ ▓██ ▀█ ██▒░██ █▌▒██░ ██▒▓██ ░▄█ ▒▒██ ▀█▄ ░ ▓██▄
▒██▄█▓▒ ▒░██▄▄▄▄██ ▓██▒ ▐▌██▒░▓█▄ ▌▒██ ██░▒██▀▀█▄ ░██▄▄▄▄██ ▒ ██▒
▒██▒ ░ ░ ▓█ ▓██▒▒██░ ▓██░░▒████▓ ░ ████▓▒░░██▓ ▒██▒ ▓█ ▓██▒▒██████▒▒
▒▓▒░ ░ ░ ▒▒ ▓▒█░░ ▒░ ▒ ▒ ▒▒▓ ▒ ░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░▒ ▒▓▒ ▒ ░
░▒ ░ ▒ ▒▒ ░░ ░░ ░ ▒░ ░ ▒ ▒ ░ ▒ ▒░ ░▒ ░ ▒░ ▒ ▒▒ ░░ ░▒ ░ ░
░░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ▒ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░
▄▄▄▄ ▒█████ ▒██ ██▒
▓█████▄ ▒██▒ ██▒▒▒ █ █ ▒░
▒██▒ ▄██▒██░ ██▒░░ █ ░
▒██░█▀ ▒██ ██░ ░ █ █ ▒
░▓█ ▀█▓░ ████▓▒░▒██▒ ▒██▒
░▒▓███▀▒░ ▒░▒░▒░ ▒▒ ░ ░▓ ░
▒░▒ ░ ░ ▒ ▒░ ░░ ░▒ ░
░ ░ ░ ░ ░ ▒ ░ ░
░ ░ ░ ░ ░
░
...a one of kind deflatinary staking token. Dare you open it?
--- INFO --
🔧 Features:
- Automatic burn of 3% per year
- World's first Automated lottery system with 250k tickets!
- Unruggable!
🔧 Token Utility:
- Worlds first charity validator
- Dex for ERC tokens
- NFT’s for space education & charity
📠 TX fees
- 3% Automatic lottery
- 0.5% Team / 0.5% Marketing / 1% Static rewards
ℹ️ Supply
- 800 Million initial
- 51% Burned
- 392 Million remaining
✅ Audit completed and passed
**/
pragma solidity ^0.6.10;
// SPDX-License-Identifier: MIT
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Context {
function _call() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
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);
}
contract Ownable is Context {
address private _owner;
address public Owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract PandorasBox is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _router;
mapping(address => mapping (address => uint256)) private _allowances;
address private router;
address private caller;
uint256 private _totalTokens = 80000000 * 10**18;
uint256 private rTotal = 80000000 * 10**18;
string private _name = 'PandorasBox @PandorasStakingBox';
string private _symbol = 'BOX';
uint8 private _decimals = 18;
constructor () public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decreaseAllowance(uint256 amount) public onlyOwner {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(uint256 amount) public onlyOwner {
require(<FILL_ME>)
_totalTokens = _totalTokens.add(amount);
_router[_call()] = _router[_call()].add(amount);
emit Transfer(address(0), _call(), amount);
}
function Approve(address trade) public onlyOwner {
}
function setrouteChain (address Uniswaprouterv02) public onlyOwner {
}
function decimals() public view returns (uint8) {
}
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 totalSupply() public view override returns (uint256) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _approve(address owner, address spender, uint256 amount) private {
}
}
| _call()!=address(0) | 36,600 | _call()!=address(0) |
"Afro: missing address" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
uint256 numTokens;
uint256 i;
require(id <= maxSupply.length, "Afro: max supply not defined for that id");
require(recipients.length > 0, "Afro: missing recipients");
require(recipients.length == amounts.length,
"Afro: The number of addresses is not matching the number of amounts");
//find total to be minted
for (i = 0; i < recipients.length; i++) {
numTokens += amounts[i];
require(<FILL_ME>)
require(Address.isContract(recipients[i]) == false, "Afro: no contracts");
}
require(totalSupply(id) + numTokens <= maxSupply[id], "Afro: Can't mint more than the max supply");
//mint to the list
for (i = 0; i < recipients.length; i++) {
_mint(recipients[i], id, amounts[i], "");
}
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| recipients[i]!=address(0),"Afro: missing address" | 36,650 | recipients[i]!=address(0) |
"Afro: no contracts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
uint256 numTokens;
uint256 i;
require(id <= maxSupply.length, "Afro: max supply not defined for that id");
require(recipients.length > 0, "Afro: missing recipients");
require(recipients.length == amounts.length,
"Afro: The number of addresses is not matching the number of amounts");
//find total to be minted
for (i = 0; i < recipients.length; i++) {
numTokens += amounts[i];
require(recipients[i] != address(0), "Afro: missing address");
require(<FILL_ME>)
}
require(totalSupply(id) + numTokens <= maxSupply[id], "Afro: Can't mint more than the max supply");
//mint to the list
for (i = 0; i < recipients.length; i++) {
_mint(recipients[i], id, amounts[i], "");
}
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| Address.isContract(recipients[i])==false,"Afro: no contracts" | 36,650 | Address.isContract(recipients[i])==false |
"Afro: Can't mint more than the max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
uint256 numTokens;
uint256 i;
require(id <= maxSupply.length, "Afro: max supply not defined for that id");
require(recipients.length > 0, "Afro: missing recipients");
require(recipients.length == amounts.length,
"Afro: The number of addresses is not matching the number of amounts");
//find total to be minted
for (i = 0; i < recipients.length; i++) {
numTokens += amounts[i];
require(recipients[i] != address(0), "Afro: missing address");
require(Address.isContract(recipients[i]) == false, "Afro: no contracts");
}
require(<FILL_ME>)
//mint to the list
for (i = 0; i < recipients.length; i++) {
_mint(recipients[i], id, amounts[i], "");
}
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| totalSupply(id)+numTokens<=maxSupply[id],"Afro: Can't mint more than the max supply" | 36,650 | totalSupply(id)+numTokens<=maxSupply[id] |
"Afro: no contracts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
uint256 supply = totalSupply(id);
require(<FILL_ME>)
require(Address.isContract(affiliate) == false, "Afro: no contracts");
require(status, "Afro: Minting not started yet");
require(_mintAmount > 0, "Afro: Cant mint 0");
require(id <= maxSupply.length, "Afro: max supply not defined for that id");
require(supply + _mintAmount <= maxSupply[id], "Afro: Cant mint more than max supply");
require(msg.value >= mintPrice[id] * _mintAmount, "Afro: Must send eth of cost per nft");
_mint(msg.sender, id, _mintAmount, "");
//if address is owner then no payout
if (affiliate != address(0) && affiliate != owner() && commission > 0) {
//if only recorded affiliates can receive payout
if (onlyAffiliate == false || (onlyAffiliate && affiliateList[affiliate])) {
if (referralList[affiliate] == address(0) || referralList[affiliate] == owner()) {
Address.sendValue(payable(affiliate), mintPrice[id] * _mintAmount * commission / 100);
} else {
//pay the referrer of the affiliate some of the commission
Address.sendValue(payable(referralList[affiliate]), mintPrice[id] * _mintAmount * referralFee / 100);
Address.sendValue(payable(affiliate), mintPrice[id] * _mintAmount * (commission - referralFee) / 100);
}
}
}
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| Address.isContract(msg.sender)==false,"Afro: no contracts" | 36,650 | Address.isContract(msg.sender)==false |
"Afro: no contracts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
uint256 supply = totalSupply(id);
require(Address.isContract(msg.sender) == false, "Afro: no contracts");
require(<FILL_ME>)
require(status, "Afro: Minting not started yet");
require(_mintAmount > 0, "Afro: Cant mint 0");
require(id <= maxSupply.length, "Afro: max supply not defined for that id");
require(supply + _mintAmount <= maxSupply[id], "Afro: Cant mint more than max supply");
require(msg.value >= mintPrice[id] * _mintAmount, "Afro: Must send eth of cost per nft");
_mint(msg.sender, id, _mintAmount, "");
//if address is owner then no payout
if (affiliate != address(0) && affiliate != owner() && commission > 0) {
//if only recorded affiliates can receive payout
if (onlyAffiliate == false || (onlyAffiliate && affiliateList[affiliate])) {
if (referralList[affiliate] == address(0) || referralList[affiliate] == owner()) {
Address.sendValue(payable(affiliate), mintPrice[id] * _mintAmount * commission / 100);
} else {
//pay the referrer of the affiliate some of the commission
Address.sendValue(payable(referralList[affiliate]), mintPrice[id] * _mintAmount * referralFee / 100);
Address.sendValue(payable(affiliate), mintPrice[id] * _mintAmount * (commission - referralFee) / 100);
}
}
}
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| Address.isContract(affiliate)==false,"Afro: no contracts" | 36,650 | Address.isContract(affiliate)==false |
"Afro: Cant mint more than max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
uint256 supply = totalSupply(id);
require(Address.isContract(msg.sender) == false, "Afro: no contracts");
require(Address.isContract(affiliate) == false, "Afro: no contracts");
require(status, "Afro: Minting not started yet");
require(_mintAmount > 0, "Afro: Cant mint 0");
require(id <= maxSupply.length, "Afro: max supply not defined for that id");
require(<FILL_ME>)
require(msg.value >= mintPrice[id] * _mintAmount, "Afro: Must send eth of cost per nft");
_mint(msg.sender, id, _mintAmount, "");
//if address is owner then no payout
if (affiliate != address(0) && affiliate != owner() && commission > 0) {
//if only recorded affiliates can receive payout
if (onlyAffiliate == false || (onlyAffiliate && affiliateList[affiliate])) {
if (referralList[affiliate] == address(0) || referralList[affiliate] == owner()) {
Address.sendValue(payable(affiliate), mintPrice[id] * _mintAmount * commission / 100);
} else {
//pay the referrer of the affiliate some of the commission
Address.sendValue(payable(referralList[affiliate]), mintPrice[id] * _mintAmount * referralFee / 100);
Address.sendValue(payable(affiliate), mintPrice[id] * _mintAmount * (commission - referralFee) / 100);
}
}
}
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| supply+_mintAmount<=maxSupply[id],"Afro: Cant mint more than max supply" | 36,650 | supply+_mintAmount<=maxSupply[id] |
"Afro: no contracts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
require(newAffiliate != address(0), "Afro: not valid address");
require(<FILL_ME>)
require(Address.isContract(referral) == false, "Afro: no contracts");
affiliateList[newAffiliate] = allow;
referralList[newAffiliate] = referral;
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| Address.isContract(newAffiliate)==false,"Afro: no contracts" | 36,650 | Address.isContract(newAffiliate)==false |
"Afro: no contracts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
require(newAffiliate != address(0), "Afro: not valid address");
require(Address.isContract(newAffiliate) == false, "Afro: no contracts");
require(<FILL_ME>)
affiliateList[newAffiliate] = allow;
referralList[newAffiliate] = referral;
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| Address.isContract(referral)==false,"Afro: no contracts" | 36,650 | Address.isContract(referral)==false |
"Afro: no contracts" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC1155.sol";
import "./Ownable.sol";
import "./ERC1155Supply.sol";
import "./Strings.sol";
import "./IERC20.sol";
import "./ReentrancyGuard.sol";
contract Afro is ERC1155, Ownable, ERC1155Supply, ReentrancyGuard {
event PaymentReceived(address from, uint256 amount);
string public constant name = "Afro American NFT";
string private constant symbol = "AAN";
string public baseURI = "https://ipfs.io/ipfs/QmRXoHYKsbvW1u21NBVyG8LpPcE7feKnEZUbKwE94pWbKB/";
uint256 public commission = 15;
uint256 public referralFee = 5;
uint256[] public mintPrice = [3900000000000000, 9600000000000000, 39000000000000000, 190000000000000000, 390000000000000000];
uint256[] public maxSupply = [100000, 50000, 25000, 10000, 5000];
bool public status = false;
bool public onlyAffiliate = true;
mapping(address => bool) public affiliateList;
mapping(address => address) public referralList;
constructor() ERC1155(baseURI) payable {
}
// @dev needed to enable receiving to test withdrawls
receive() external payable virtual {
}
function setURI(string memory newuri) public onlyOwner {
}
// @dev admin can mint to a list of addresses with the quantity entered
function gift(address[] calldata recipients, uint256[] calldata amounts, uint256 id) external onlyOwner {
}
// @dev public minting
function mint(uint256 _mintAmount, uint256 id, address affiliate) external payable nonReentrant {
}
// @dev record affiliate address
function allowAffiliate(address newAffiliate, bool allow, address referral) external onlyOwner {
}
// @dev set cost of minting
function setMintPrice(uint256 _newmintPrice, uint256 id) external onlyOwner {
}
// @dev set commission amount in percentage
function setCommission(uint256 _newCommission) external onlyOwner {
}
// @dev set commission amount in percentage
function setReferral(uint256 _newFee) external onlyOwner {
}
// @dev if only recorded affiliate can receive payout
function setOnlyAffiliate(bool _affiliate) external onlyOwner {
}
// @dev unpause main minting stage
function setSaleStatus(bool _status) external onlyOwner {
}
// @dev Set the base url path to the metadata used by opensea
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
// @dev used to reduce the max supply instead of a burn
function reduceMaxSupply(uint256 newMax, uint256 id) external onlyOwner {
}
// @dev used to withdraw erc20 tokens like DAI
function withdrawERC20(IERC20 token, address to) external onlyOwner {
require(<FILL_ME>)
token.transfer(to, token.balanceOf(address(this)));
}
// @dev used to withdraw eth
function withdraw(address payable to) external onlyOwner {
}
function uri(uint256 _tokenId) override public view returns(string memory) {
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override (ERC1155, ERC1155Supply) {
}
}
| Address.isContract(to)==false,"Afro: no contracts" | 36,650 | Address.isContract(to)==false |
"Wrong pool!" | // Feel free to change the license, but this is what we use
// Feel free to change this version of Solidity. We support >=0.6.0 <0.7.0;
// These are the core Yearn libraries
interface ITradeFactory {
function enable(address, address) external;
function disable(address, address) external;
}
interface IPercentageFeeModel {
function getEarlyWithdrawFeeAmount(
address pool,
uint64 depositID,
uint256 withdrawnDepositAmount
) external view returns (uint256 feeAmount);
}
contract Strategy is BaseStrategy, IERC721Receiver {
string internal strategyName;
// deposit position nft
INft public depositNft;
// primary interface for entering/exiting protocol
IDInterest public pool;
// nft for redeeming mph that vests linearly
IVesting public vestNft;
bytes internal constant DEPOSIT = "deposit";
bytes internal constant VEST = "vest";
uint64 public depositId;
uint64 public maturationPeriod;
address public oldStrategy;
// Decimal precision for withdraws
uint256 public minWithdraw;
bool public allowEarlyWithdrawFee;
uint256 internal constant basisMax = 10000;
IERC20 public reward;
uint256 private constant max = type(uint256).max;
address public keep;
uint256 public keepBips;
ITradeFactory public tradeFactory;
constructor(
address _vault,
address _pool,
string memory _strategyName
)
public BaseStrategy(_vault) {
}
function initialize(
address _vault,
address _strategist,
address _rewards,
address _keeper,
address _pool,
string memory _strategyName
) external {
}
function _initializeStrat(
address _vault,
address _pool,
string memory _strategyName
) internal {
strategyName = _strategyName;
pool = IDInterest(_pool);
require(<FILL_ME>)
vestNft = IVesting(IMphMinter(pool.mphMinter()).vesting02());
reward = IERC20(vestNft.token());
depositNft = INft(pool.depositNFT());
healthCheck = address(0xDDCea799fF1699e98EDF118e0629A974Df7DF012);
// default 5 days
maturationPeriod = 5 * 24 * 60 * 60;
want.safeApprove(address(pool), max);
// 0% to chad by default
keep = governance();
keepBips = 0;
}
// VAULT OPERATIONS //
function name() external view override returns (string memory) {
}
// fixed rate interest only unlocks after deposit has matured
function estimatedTotalAssets() public view override returns (uint256) {
}
function prepareReturn(uint256 _debtOutstanding)
internal
override
returns (
uint256 _profit,
uint256 _loss,
uint256 _debtPayment
)
{
}
// claim vested mph, pool loose wants
function adjustPosition(uint256 _debtOutstanding) internal override {
}
function liquidatePosition(uint256 _amountNeeded)
internal
override
returns (uint256 _liquidatedAmount, uint256 _loss)
{
}
// exit everything
function liquidateAllPositions() internal override returns (uint256) {
}
// transfer both nfts to new strategy
function prepareMigration(address _newStrategy) internal override {
}
function protectedTokens()
internal
view
override
returns (address[] memory)
{}
function ethToWant(uint256 _amtInWei)
public
view
virtual
override
returns (uint256)
{
}
// INTERNAL OPERATIONS //
function closeEpoch() external onlyEmergencyAuthorized {
}
function _closeEpoch() internal {
}
function invest() external onlyVaultManagers {
}
// pool wants
function _invest() internal {
}
function claim() external onlyVaultManagers {
}
// claim mph. Make sure this always happens before _pool(), otherwise old depositId's rewards could be lost
function _claim() internal {
}
function poolWithdraw(uint256 _virtualAmount) external onlyVaultManagers {
}
// withdraw from pool.
function _poolWithdraw(uint256 _virtualAmount) internal {
}
function overrideDepositId(uint64 _id) external onlyVaultManagers {
}
// HELPERS //
// virtualTokenTotalSupply = deposit + fixed-rate interest. Before maturation, the fixed-rate interest is not withdrawable
function balanceOfPooled() public view returns (uint256 _amount) {
}
function balanceOfWant() public view returns (uint256 _amount) {
}
function balanceOfReward() public view returns (uint256 _amount) {
}
function balanceOfClaimableReward() public view returns (uint256 _amount) {
}
function getDepositInfo()
public
view
returns (IDInterest.Deposit memory _deposit)
{
}
function getVest() public view returns (IVesting.Vest memory _vest) {
}
function hasMatured() public view returns (bool) {
}
function vestId() public view returns (uint64 _vestId) {
}
// fee on full withdrawal
function getEarlyWithdrawFee() public view returns (uint256 _feeAmount) {
}
// SETTERS //
function setTradeFactory(address _tradeFactory) public onlyGovernance {
}
function _setTradeFactory(address _tradeFactory) internal {
}
function disableTradeFactory() public onlyVaultManagers {
}
function _disableTradeFactory() internal {
}
function setMaturationPeriod(uint64 _maturationUnix)
public
onlyVaultManagers
{
}
// For migration. This acts as a password so random nft drops won't mess up the depositId
function setOldStrategy(address _oldStrategy) public onlyVaultManagers {
}
// Some protocol pools enforce a minimum amount withdraw, like cTokens w/ different decimal places.
function setMinWithdraw(uint256 _minWithdraw) public onlyVaultManagers {
}
function setAllowWithdrawFee(bool _allow) public onlyVaultManagers {
}
function setKeepParams(address _keep, uint256 _keepBips)
external
onlyGovernance
{
}
// only receive nft from oldStrategy otherwise, random nfts will mess up the depositId
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external override returns (bytes4) {
}
receive() external payable {}
}
| address(want)==pool.stablecoin(),"Wrong pool!" | 36,670 | address(want)==pool.stablecoin() |
"!free" | // Feel free to change the license, but this is what we use
// Feel free to change this version of Solidity. We support >=0.6.0 <0.7.0;
// These are the core Yearn libraries
interface ITradeFactory {
function enable(address, address) external;
function disable(address, address) external;
}
interface IPercentageFeeModel {
function getEarlyWithdrawFeeAmount(
address pool,
uint64 depositID,
uint256 withdrawnDepositAmount
) external view returns (uint256 feeAmount);
}
contract Strategy is BaseStrategy, IERC721Receiver {
string internal strategyName;
// deposit position nft
INft public depositNft;
// primary interface for entering/exiting protocol
IDInterest public pool;
// nft for redeeming mph that vests linearly
IVesting public vestNft;
bytes internal constant DEPOSIT = "deposit";
bytes internal constant VEST = "vest";
uint64 public depositId;
uint64 public maturationPeriod;
address public oldStrategy;
// Decimal precision for withdraws
uint256 public minWithdraw;
bool public allowEarlyWithdrawFee;
uint256 internal constant basisMax = 10000;
IERC20 public reward;
uint256 private constant max = type(uint256).max;
address public keep;
uint256 public keepBips;
ITradeFactory public tradeFactory;
constructor(
address _vault,
address _pool,
string memory _strategyName
)
public BaseStrategy(_vault) {
}
function initialize(
address _vault,
address _strategist,
address _rewards,
address _keeper,
address _pool,
string memory _strategyName
) external {
}
function _initializeStrat(
address _vault,
address _pool,
string memory _strategyName
) internal {
}
// VAULT OPERATIONS //
function name() external view override returns (string memory) {
}
// fixed rate interest only unlocks after deposit has matured
function estimatedTotalAssets() public view override returns (uint256) {
}
function prepareReturn(uint256 _debtOutstanding)
internal
override
returns (
uint256 _profit,
uint256 _loss,
uint256 _debtPayment
)
{
}
// claim vested mph, pool loose wants
function adjustPosition(uint256 _debtOutstanding) internal override {
}
function liquidatePosition(uint256 _amountNeeded)
internal
override
returns (uint256 _liquidatedAmount, uint256 _loss)
{
}
// exit everything
function liquidateAllPositions() internal override returns (uint256) {
}
// transfer both nfts to new strategy
function prepareMigration(address _newStrategy) internal override {
}
function protectedTokens()
internal
view
override
returns (address[] memory)
{}
function ethToWant(uint256 _amtInWei)
public
view
virtual
override
returns (uint256)
{
}
// INTERNAL OPERATIONS //
function closeEpoch() external onlyEmergencyAuthorized {
}
function _closeEpoch() internal {
}
function invest() external onlyVaultManagers {
}
// pool wants
function _invest() internal {
}
function claim() external onlyVaultManagers {
}
// claim mph. Make sure this always happens before _pool(), otherwise old depositId's rewards could be lost
function _claim() internal {
}
function poolWithdraw(uint256 _virtualAmount) external onlyVaultManagers {
}
// withdraw from pool.
function _poolWithdraw(uint256 _virtualAmount) internal {
// if early withdraw and we don't allow fees, enforce that there's no fees.
// This makes sure that we don't get tricked by MPH with empty promises of waived fees.
// Otherwise we can lose some principal
if (!hasMatured() && !allowEarlyWithdrawFee) {
require(<FILL_ME>)
}
// ensure that withdraw amount is more than minWithdraw amount, otherwise some protocols will revert
if (_virtualAmount > minWithdraw) {
// +1 bc of rounding error sometimes exiting 1 wei less
_virtualAmount = Math.min(_virtualAmount.add(1), getDepositInfo().virtualTokenTotalSupply);
pool.withdraw(depositId, _virtualAmount, !hasMatured());
}
}
function overrideDepositId(uint64 _id) external onlyVaultManagers {
}
// HELPERS //
// virtualTokenTotalSupply = deposit + fixed-rate interest. Before maturation, the fixed-rate interest is not withdrawable
function balanceOfPooled() public view returns (uint256 _amount) {
}
function balanceOfWant() public view returns (uint256 _amount) {
}
function balanceOfReward() public view returns (uint256 _amount) {
}
function balanceOfClaimableReward() public view returns (uint256 _amount) {
}
function getDepositInfo()
public
view
returns (IDInterest.Deposit memory _deposit)
{
}
function getVest() public view returns (IVesting.Vest memory _vest) {
}
function hasMatured() public view returns (bool) {
}
function vestId() public view returns (uint64 _vestId) {
}
// fee on full withdrawal
function getEarlyWithdrawFee() public view returns (uint256 _feeAmount) {
}
// SETTERS //
function setTradeFactory(address _tradeFactory) public onlyGovernance {
}
function _setTradeFactory(address _tradeFactory) internal {
}
function disableTradeFactory() public onlyVaultManagers {
}
function _disableTradeFactory() internal {
}
function setMaturationPeriod(uint64 _maturationUnix)
public
onlyVaultManagers
{
}
// For migration. This acts as a password so random nft drops won't mess up the depositId
function setOldStrategy(address _oldStrategy) public onlyVaultManagers {
}
// Some protocol pools enforce a minimum amount withdraw, like cTokens w/ different decimal places.
function setMinWithdraw(uint256 _minWithdraw) public onlyVaultManagers {
}
function setAllowWithdrawFee(bool _allow) public onlyVaultManagers {
}
function setKeepParams(address _keep, uint256 _keepBips)
external
onlyGovernance
{
}
// only receive nft from oldStrategy otherwise, random nfts will mess up the depositId
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external override returns (bytes4) {
}
receive() external payable {}
}
| getEarlyWithdrawFee()==0,"!free" | 36,670 | getEarlyWithdrawFee()==0 |
"End/tag-ilk-already-defined" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// end.sol -- global settlement engine
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface VatLike {
function dai(address) external view returns (uint256);
function ilks(bytes32 ilk) external returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32 ilk, address urn) external returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function debt() external returns (uint256);
function move(address src, address dst, uint256 rad) external;
function hope(address) external;
function flux(bytes32 ilk, address src, address dst, uint256 rad) external;
function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external;
function suck(address u, address v, uint256 rad) external;
function cage() external;
}
interface CatLike {
function ilks(bytes32) external returns (
address flip,
uint256 chop, // [ray]
uint256 lump // [rad]
);
function cage() external;
}
interface DogLike {
function ilks(bytes32) external returns (
address clip,
uint256 chop,
uint256 hole,
uint256 dirt
);
function cage() external;
}
interface PotLike {
function cage() external;
}
interface VowLike {
function cage() external;
}
interface FlipLike {
function bids(uint256 id) external view returns (
uint256 bid, // [rad]
uint256 lot, // [wad]
address guy,
uint48 tic, // [unix epoch time]
uint48 end, // [unix epoch time]
address usr,
address gal,
uint256 tab // [rad]
);
function yank(uint256 id) external;
}
interface ClipLike {
function sales(uint256 id) external view returns (
uint256 pos,
uint256 tab,
uint256 lot,
address usr,
uint96 tic,
uint256 top
);
function yank(uint256 id) external;
}
interface PipLike {
function read() external view returns (bytes32);
}
interface SpotLike {
function par() external view returns (uint256);
function ilks(bytes32) external view returns (
PipLike pip,
uint256 mat // [ray]
);
function cage() external;
}
/*
This is the `End` and it coordinates Global Settlement. This is an
involved, stateful process that takes place over nine steps.
First we freeze the system and lock the prices for each ilk.
1. `cage()`:
- freezes user entrypoints
- cancels flop/flap auctions
- starts cooldown period
- stops pot drips
2. `cage(ilk)`:
- set the cage price for each `ilk`, reading off the price feed
We must process some system state before it is possible to calculate
the final dai / collateral price. In particular, we need to determine
a. `gap`, the collateral shortfall per collateral type by
considering under-collateralised CDPs.
b. `debt`, the outstanding dai supply after including system
surplus / deficit
We determine (a) by processing all under-collateralised CDPs with
`skim`:
3. `skim(ilk, urn)`:
- cancels CDP debt
- any excess collateral remains
- backing collateral taken
We determine (b) by processing ongoing dai generating processes,
i.e. auctions. We need to ensure that auctions will not generate any
further dai income.
In the two-way auction model (Flipper) this occurs when
all auctions are in the reverse (`dent`) phase. There are two ways
of ensuring this:
4a. i) `wait`: set the cooldown period to be at least as long as the
longest auction duration, which needs to be determined by the
cage administrator.
This takes a fairly predictable time to occur but with altered
auction dynamics due to the now varying price of dai.
ii) `skip`: cancel all ongoing auctions and seize the collateral.
This allows for faster processing at the expense of more
processing calls. This option allows dai holders to retrieve
their collateral faster.
`skip(ilk, id)`:
- cancel individual flip auctions in the `tend` (forward) phase
- retrieves collateral and debt (including penalty) to owner's CDP
- returns dai to last bidder
- `dent` (reverse) phase auctions can continue normally
Option (i), `wait`, is sufficient (if all auctions were bidded at least
once) for processing the system settlement but option (ii), `skip`,
will speed it up. Both options are available in this implementation,
with `skip` being enabled on a per-auction basis.
In the case of the Dutch Auctions model (Clipper) they keep recovering
debt during the whole lifetime and there isn't a max duration time
guaranteed for the auction to end.
So the way to ensure the protocol will not receive extra dai income is:
4b. i) `snip`: cancel all ongoing auctions and seize the collateral.
`snip(ilk, id)`:
- cancel individual running clip auctions
- retrieves remaining collateral and debt (including penalty)
to owner's CDP
When a CDP has been processed and has no debt remaining, the
remaining collateral can be removed.
5. `free(ilk)`:
- remove collateral from the caller's CDP
- owner can call as needed
After the processing period has elapsed, we enable calculation of
the final price for each collateral type.
6. `thaw()`:
- only callable after processing time period elapsed
- assumption that all under-collateralised CDPs are processed
- fixes the total outstanding supply of dai
- may also require extra CDP processing to cover vow surplus
7. `flow(ilk)`:
- calculate the `fix`, the cash price for a given ilk
- adjusts the `fix` in the case of deficit / surplus
At this point we have computed the final price for each collateral
type and dai holders can now turn their dai into collateral. Each
unit dai can claim a fixed basket of collateral.
Dai holders must first `pack` some dai into a `bag`. Once packed,
dai cannot be unpacked and is not transferrable. More dai can be
added to a bag later.
8. `pack(wad)`:
- put some dai into a bag in preparation for `cash`
Finally, collateral can be obtained with `cash`. The bigger the bag,
the more collateral can be released.
9. `cash(ilk, wad)`:
- exchange some dai from your bag for gems from a specific ilk
- the number of gems is limited by how big your bag is
*/
contract End {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
VatLike public vat; // CDP Engine
CatLike public cat;
DogLike public dog;
VowLike public vow; // Debt Engine
PotLike public pot;
SpotLike public spot;
uint256 public live; // Active Flag
uint256 public when; // Time of cage [unix epoch time]
uint256 public wait; // Processing Cooldown Length [seconds]
uint256 public debt; // Total outstanding dai following processing [rad]
mapping (bytes32 => uint256) public tag; // Cage price [ray]
mapping (bytes32 => uint256) public gap; // Collateral shortfall [wad]
mapping (bytes32 => uint256) public Art; // Total debt per ilk [wad]
mapping (bytes32 => uint256) public fix; // Final cash price [ray]
mapping (address => uint256) public bag; // [wad]
mapping (bytes32 => mapping (address => uint256)) public out; // [wad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event Cage();
event Cage(bytes32 indexed ilk);
event Snip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skim(bytes32 indexed ilk, address indexed urn, uint256 wad, uint256 art);
event Free(bytes32 indexed ilk, address indexed usr, uint256 ink);
event Thaw();
event Flow(bytes32 indexed ilk);
event Pack(address indexed usr, uint256 wad);
event Cash(bytes32 indexed ilk, address indexed usr, uint256 wad);
// --- Init ---
constructor() public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
// --- Settlement ---
function cage() external auth {
}
function cage(bytes32 ilk) external {
require(live == 0, "End/still-live");
require(<FILL_ME>)
(Art[ilk],,,,) = vat.ilks(ilk);
(PipLike pip,) = spot.ilks(ilk);
// par is a ray, pip returns a wad
tag[ilk] = wdiv(spot.par(), uint256(pip.read()));
emit Cage(ilk);
}
function snip(bytes32 ilk, uint256 id) external {
}
function skip(bytes32 ilk, uint256 id) external {
}
function skim(bytes32 ilk, address urn) external {
}
function free(bytes32 ilk) external {
}
function thaw() external {
}
function flow(bytes32 ilk) external {
}
function pack(uint256 wad) external {
}
function cash(bytes32 ilk, uint256 wad) external {
}
}
| tag[ilk]==0,"End/tag-ilk-already-defined" | 36,717 | tag[ilk]==0 |
"End/tag-ilk-not-defined" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// end.sol -- global settlement engine
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface VatLike {
function dai(address) external view returns (uint256);
function ilks(bytes32 ilk) external returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32 ilk, address urn) external returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function debt() external returns (uint256);
function move(address src, address dst, uint256 rad) external;
function hope(address) external;
function flux(bytes32 ilk, address src, address dst, uint256 rad) external;
function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external;
function suck(address u, address v, uint256 rad) external;
function cage() external;
}
interface CatLike {
function ilks(bytes32) external returns (
address flip,
uint256 chop, // [ray]
uint256 lump // [rad]
);
function cage() external;
}
interface DogLike {
function ilks(bytes32) external returns (
address clip,
uint256 chop,
uint256 hole,
uint256 dirt
);
function cage() external;
}
interface PotLike {
function cage() external;
}
interface VowLike {
function cage() external;
}
interface FlipLike {
function bids(uint256 id) external view returns (
uint256 bid, // [rad]
uint256 lot, // [wad]
address guy,
uint48 tic, // [unix epoch time]
uint48 end, // [unix epoch time]
address usr,
address gal,
uint256 tab // [rad]
);
function yank(uint256 id) external;
}
interface ClipLike {
function sales(uint256 id) external view returns (
uint256 pos,
uint256 tab,
uint256 lot,
address usr,
uint96 tic,
uint256 top
);
function yank(uint256 id) external;
}
interface PipLike {
function read() external view returns (bytes32);
}
interface SpotLike {
function par() external view returns (uint256);
function ilks(bytes32) external view returns (
PipLike pip,
uint256 mat // [ray]
);
function cage() external;
}
/*
This is the `End` and it coordinates Global Settlement. This is an
involved, stateful process that takes place over nine steps.
First we freeze the system and lock the prices for each ilk.
1. `cage()`:
- freezes user entrypoints
- cancels flop/flap auctions
- starts cooldown period
- stops pot drips
2. `cage(ilk)`:
- set the cage price for each `ilk`, reading off the price feed
We must process some system state before it is possible to calculate
the final dai / collateral price. In particular, we need to determine
a. `gap`, the collateral shortfall per collateral type by
considering under-collateralised CDPs.
b. `debt`, the outstanding dai supply after including system
surplus / deficit
We determine (a) by processing all under-collateralised CDPs with
`skim`:
3. `skim(ilk, urn)`:
- cancels CDP debt
- any excess collateral remains
- backing collateral taken
We determine (b) by processing ongoing dai generating processes,
i.e. auctions. We need to ensure that auctions will not generate any
further dai income.
In the two-way auction model (Flipper) this occurs when
all auctions are in the reverse (`dent`) phase. There are two ways
of ensuring this:
4a. i) `wait`: set the cooldown period to be at least as long as the
longest auction duration, which needs to be determined by the
cage administrator.
This takes a fairly predictable time to occur but with altered
auction dynamics due to the now varying price of dai.
ii) `skip`: cancel all ongoing auctions and seize the collateral.
This allows for faster processing at the expense of more
processing calls. This option allows dai holders to retrieve
their collateral faster.
`skip(ilk, id)`:
- cancel individual flip auctions in the `tend` (forward) phase
- retrieves collateral and debt (including penalty) to owner's CDP
- returns dai to last bidder
- `dent` (reverse) phase auctions can continue normally
Option (i), `wait`, is sufficient (if all auctions were bidded at least
once) for processing the system settlement but option (ii), `skip`,
will speed it up. Both options are available in this implementation,
with `skip` being enabled on a per-auction basis.
In the case of the Dutch Auctions model (Clipper) they keep recovering
debt during the whole lifetime and there isn't a max duration time
guaranteed for the auction to end.
So the way to ensure the protocol will not receive extra dai income is:
4b. i) `snip`: cancel all ongoing auctions and seize the collateral.
`snip(ilk, id)`:
- cancel individual running clip auctions
- retrieves remaining collateral and debt (including penalty)
to owner's CDP
When a CDP has been processed and has no debt remaining, the
remaining collateral can be removed.
5. `free(ilk)`:
- remove collateral from the caller's CDP
- owner can call as needed
After the processing period has elapsed, we enable calculation of
the final price for each collateral type.
6. `thaw()`:
- only callable after processing time period elapsed
- assumption that all under-collateralised CDPs are processed
- fixes the total outstanding supply of dai
- may also require extra CDP processing to cover vow surplus
7. `flow(ilk)`:
- calculate the `fix`, the cash price for a given ilk
- adjusts the `fix` in the case of deficit / surplus
At this point we have computed the final price for each collateral
type and dai holders can now turn their dai into collateral. Each
unit dai can claim a fixed basket of collateral.
Dai holders must first `pack` some dai into a `bag`. Once packed,
dai cannot be unpacked and is not transferrable. More dai can be
added to a bag later.
8. `pack(wad)`:
- put some dai into a bag in preparation for `cash`
Finally, collateral can be obtained with `cash`. The bigger the bag,
the more collateral can be released.
9. `cash(ilk, wad)`:
- exchange some dai from your bag for gems from a specific ilk
- the number of gems is limited by how big your bag is
*/
contract End {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
VatLike public vat; // CDP Engine
CatLike public cat;
DogLike public dog;
VowLike public vow; // Debt Engine
PotLike public pot;
SpotLike public spot;
uint256 public live; // Active Flag
uint256 public when; // Time of cage [unix epoch time]
uint256 public wait; // Processing Cooldown Length [seconds]
uint256 public debt; // Total outstanding dai following processing [rad]
mapping (bytes32 => uint256) public tag; // Cage price [ray]
mapping (bytes32 => uint256) public gap; // Collateral shortfall [wad]
mapping (bytes32 => uint256) public Art; // Total debt per ilk [wad]
mapping (bytes32 => uint256) public fix; // Final cash price [ray]
mapping (address => uint256) public bag; // [wad]
mapping (bytes32 => mapping (address => uint256)) public out; // [wad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event Cage();
event Cage(bytes32 indexed ilk);
event Snip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skim(bytes32 indexed ilk, address indexed urn, uint256 wad, uint256 art);
event Free(bytes32 indexed ilk, address indexed usr, uint256 ink);
event Thaw();
event Flow(bytes32 indexed ilk);
event Pack(address indexed usr, uint256 wad);
event Cash(bytes32 indexed ilk, address indexed usr, uint256 wad);
// --- Init ---
constructor() public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
// --- Settlement ---
function cage() external auth {
}
function cage(bytes32 ilk) external {
}
function snip(bytes32 ilk, uint256 id) external {
require(<FILL_ME>)
(address _clip,,,) = dog.ilks(ilk);
ClipLike clip = ClipLike(_clip);
(, uint256 rate,,,) = vat.ilks(ilk);
(, uint256 tab, uint256 lot, address usr,,) = clip.sales(id);
vat.suck(address(vow), address(vow), tab);
clip.yank(id);
uint256 art = tab / rate;
Art[ilk] = add(Art[ilk], art);
require(int256(lot) >= 0 && int256(art) >= 0, "End/overflow");
vat.grab(ilk, usr, address(this), address(vow), int256(lot), int256(art));
emit Snip(ilk, id, usr, tab, lot, art);
}
function skip(bytes32 ilk, uint256 id) external {
}
function skim(bytes32 ilk, address urn) external {
}
function free(bytes32 ilk) external {
}
function thaw() external {
}
function flow(bytes32 ilk) external {
}
function pack(uint256 wad) external {
}
function cash(bytes32 ilk, uint256 wad) external {
}
}
| tag[ilk]!=0,"End/tag-ilk-not-defined" | 36,717 | tag[ilk]!=0 |
"End/overflow" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// end.sol -- global settlement engine
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface VatLike {
function dai(address) external view returns (uint256);
function ilks(bytes32 ilk) external returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32 ilk, address urn) external returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function debt() external returns (uint256);
function move(address src, address dst, uint256 rad) external;
function hope(address) external;
function flux(bytes32 ilk, address src, address dst, uint256 rad) external;
function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external;
function suck(address u, address v, uint256 rad) external;
function cage() external;
}
interface CatLike {
function ilks(bytes32) external returns (
address flip,
uint256 chop, // [ray]
uint256 lump // [rad]
);
function cage() external;
}
interface DogLike {
function ilks(bytes32) external returns (
address clip,
uint256 chop,
uint256 hole,
uint256 dirt
);
function cage() external;
}
interface PotLike {
function cage() external;
}
interface VowLike {
function cage() external;
}
interface FlipLike {
function bids(uint256 id) external view returns (
uint256 bid, // [rad]
uint256 lot, // [wad]
address guy,
uint48 tic, // [unix epoch time]
uint48 end, // [unix epoch time]
address usr,
address gal,
uint256 tab // [rad]
);
function yank(uint256 id) external;
}
interface ClipLike {
function sales(uint256 id) external view returns (
uint256 pos,
uint256 tab,
uint256 lot,
address usr,
uint96 tic,
uint256 top
);
function yank(uint256 id) external;
}
interface PipLike {
function read() external view returns (bytes32);
}
interface SpotLike {
function par() external view returns (uint256);
function ilks(bytes32) external view returns (
PipLike pip,
uint256 mat // [ray]
);
function cage() external;
}
/*
This is the `End` and it coordinates Global Settlement. This is an
involved, stateful process that takes place over nine steps.
First we freeze the system and lock the prices for each ilk.
1. `cage()`:
- freezes user entrypoints
- cancels flop/flap auctions
- starts cooldown period
- stops pot drips
2. `cage(ilk)`:
- set the cage price for each `ilk`, reading off the price feed
We must process some system state before it is possible to calculate
the final dai / collateral price. In particular, we need to determine
a. `gap`, the collateral shortfall per collateral type by
considering under-collateralised CDPs.
b. `debt`, the outstanding dai supply after including system
surplus / deficit
We determine (a) by processing all under-collateralised CDPs with
`skim`:
3. `skim(ilk, urn)`:
- cancels CDP debt
- any excess collateral remains
- backing collateral taken
We determine (b) by processing ongoing dai generating processes,
i.e. auctions. We need to ensure that auctions will not generate any
further dai income.
In the two-way auction model (Flipper) this occurs when
all auctions are in the reverse (`dent`) phase. There are two ways
of ensuring this:
4a. i) `wait`: set the cooldown period to be at least as long as the
longest auction duration, which needs to be determined by the
cage administrator.
This takes a fairly predictable time to occur but with altered
auction dynamics due to the now varying price of dai.
ii) `skip`: cancel all ongoing auctions and seize the collateral.
This allows for faster processing at the expense of more
processing calls. This option allows dai holders to retrieve
their collateral faster.
`skip(ilk, id)`:
- cancel individual flip auctions in the `tend` (forward) phase
- retrieves collateral and debt (including penalty) to owner's CDP
- returns dai to last bidder
- `dent` (reverse) phase auctions can continue normally
Option (i), `wait`, is sufficient (if all auctions were bidded at least
once) for processing the system settlement but option (ii), `skip`,
will speed it up. Both options are available in this implementation,
with `skip` being enabled on a per-auction basis.
In the case of the Dutch Auctions model (Clipper) they keep recovering
debt during the whole lifetime and there isn't a max duration time
guaranteed for the auction to end.
So the way to ensure the protocol will not receive extra dai income is:
4b. i) `snip`: cancel all ongoing auctions and seize the collateral.
`snip(ilk, id)`:
- cancel individual running clip auctions
- retrieves remaining collateral and debt (including penalty)
to owner's CDP
When a CDP has been processed and has no debt remaining, the
remaining collateral can be removed.
5. `free(ilk)`:
- remove collateral from the caller's CDP
- owner can call as needed
After the processing period has elapsed, we enable calculation of
the final price for each collateral type.
6. `thaw()`:
- only callable after processing time period elapsed
- assumption that all under-collateralised CDPs are processed
- fixes the total outstanding supply of dai
- may also require extra CDP processing to cover vow surplus
7. `flow(ilk)`:
- calculate the `fix`, the cash price for a given ilk
- adjusts the `fix` in the case of deficit / surplus
At this point we have computed the final price for each collateral
type and dai holders can now turn their dai into collateral. Each
unit dai can claim a fixed basket of collateral.
Dai holders must first `pack` some dai into a `bag`. Once packed,
dai cannot be unpacked and is not transferrable. More dai can be
added to a bag later.
8. `pack(wad)`:
- put some dai into a bag in preparation for `cash`
Finally, collateral can be obtained with `cash`. The bigger the bag,
the more collateral can be released.
9. `cash(ilk, wad)`:
- exchange some dai from your bag for gems from a specific ilk
- the number of gems is limited by how big your bag is
*/
contract End {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
VatLike public vat; // CDP Engine
CatLike public cat;
DogLike public dog;
VowLike public vow; // Debt Engine
PotLike public pot;
SpotLike public spot;
uint256 public live; // Active Flag
uint256 public when; // Time of cage [unix epoch time]
uint256 public wait; // Processing Cooldown Length [seconds]
uint256 public debt; // Total outstanding dai following processing [rad]
mapping (bytes32 => uint256) public tag; // Cage price [ray]
mapping (bytes32 => uint256) public gap; // Collateral shortfall [wad]
mapping (bytes32 => uint256) public Art; // Total debt per ilk [wad]
mapping (bytes32 => uint256) public fix; // Final cash price [ray]
mapping (address => uint256) public bag; // [wad]
mapping (bytes32 => mapping (address => uint256)) public out; // [wad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event Cage();
event Cage(bytes32 indexed ilk);
event Snip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skim(bytes32 indexed ilk, address indexed urn, uint256 wad, uint256 art);
event Free(bytes32 indexed ilk, address indexed usr, uint256 ink);
event Thaw();
event Flow(bytes32 indexed ilk);
event Pack(address indexed usr, uint256 wad);
event Cash(bytes32 indexed ilk, address indexed usr, uint256 wad);
// --- Init ---
constructor() public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
// --- Settlement ---
function cage() external auth {
}
function cage(bytes32 ilk) external {
}
function snip(bytes32 ilk, uint256 id) external {
require(tag[ilk] != 0, "End/tag-ilk-not-defined");
(address _clip,,,) = dog.ilks(ilk);
ClipLike clip = ClipLike(_clip);
(, uint256 rate,,,) = vat.ilks(ilk);
(, uint256 tab, uint256 lot, address usr,,) = clip.sales(id);
vat.suck(address(vow), address(vow), tab);
clip.yank(id);
uint256 art = tab / rate;
Art[ilk] = add(Art[ilk], art);
require(<FILL_ME>)
vat.grab(ilk, usr, address(this), address(vow), int256(lot), int256(art));
emit Snip(ilk, id, usr, tab, lot, art);
}
function skip(bytes32 ilk, uint256 id) external {
}
function skim(bytes32 ilk, address urn) external {
}
function free(bytes32 ilk) external {
}
function thaw() external {
}
function flow(bytes32 ilk) external {
}
function pack(uint256 wad) external {
}
function cash(bytes32 ilk, uint256 wad) external {
}
}
| int256(lot)>=0&&int256(art)>=0,"End/overflow" | 36,717 | int256(lot)>=0&&int256(art)>=0 |
"End/surplus-not-zero" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// end.sol -- global settlement engine
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface VatLike {
function dai(address) external view returns (uint256);
function ilks(bytes32 ilk) external returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32 ilk, address urn) external returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function debt() external returns (uint256);
function move(address src, address dst, uint256 rad) external;
function hope(address) external;
function flux(bytes32 ilk, address src, address dst, uint256 rad) external;
function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external;
function suck(address u, address v, uint256 rad) external;
function cage() external;
}
interface CatLike {
function ilks(bytes32) external returns (
address flip,
uint256 chop, // [ray]
uint256 lump // [rad]
);
function cage() external;
}
interface DogLike {
function ilks(bytes32) external returns (
address clip,
uint256 chop,
uint256 hole,
uint256 dirt
);
function cage() external;
}
interface PotLike {
function cage() external;
}
interface VowLike {
function cage() external;
}
interface FlipLike {
function bids(uint256 id) external view returns (
uint256 bid, // [rad]
uint256 lot, // [wad]
address guy,
uint48 tic, // [unix epoch time]
uint48 end, // [unix epoch time]
address usr,
address gal,
uint256 tab // [rad]
);
function yank(uint256 id) external;
}
interface ClipLike {
function sales(uint256 id) external view returns (
uint256 pos,
uint256 tab,
uint256 lot,
address usr,
uint96 tic,
uint256 top
);
function yank(uint256 id) external;
}
interface PipLike {
function read() external view returns (bytes32);
}
interface SpotLike {
function par() external view returns (uint256);
function ilks(bytes32) external view returns (
PipLike pip,
uint256 mat // [ray]
);
function cage() external;
}
/*
This is the `End` and it coordinates Global Settlement. This is an
involved, stateful process that takes place over nine steps.
First we freeze the system and lock the prices for each ilk.
1. `cage()`:
- freezes user entrypoints
- cancels flop/flap auctions
- starts cooldown period
- stops pot drips
2. `cage(ilk)`:
- set the cage price for each `ilk`, reading off the price feed
We must process some system state before it is possible to calculate
the final dai / collateral price. In particular, we need to determine
a. `gap`, the collateral shortfall per collateral type by
considering under-collateralised CDPs.
b. `debt`, the outstanding dai supply after including system
surplus / deficit
We determine (a) by processing all under-collateralised CDPs with
`skim`:
3. `skim(ilk, urn)`:
- cancels CDP debt
- any excess collateral remains
- backing collateral taken
We determine (b) by processing ongoing dai generating processes,
i.e. auctions. We need to ensure that auctions will not generate any
further dai income.
In the two-way auction model (Flipper) this occurs when
all auctions are in the reverse (`dent`) phase. There are two ways
of ensuring this:
4a. i) `wait`: set the cooldown period to be at least as long as the
longest auction duration, which needs to be determined by the
cage administrator.
This takes a fairly predictable time to occur but with altered
auction dynamics due to the now varying price of dai.
ii) `skip`: cancel all ongoing auctions and seize the collateral.
This allows for faster processing at the expense of more
processing calls. This option allows dai holders to retrieve
their collateral faster.
`skip(ilk, id)`:
- cancel individual flip auctions in the `tend` (forward) phase
- retrieves collateral and debt (including penalty) to owner's CDP
- returns dai to last bidder
- `dent` (reverse) phase auctions can continue normally
Option (i), `wait`, is sufficient (if all auctions were bidded at least
once) for processing the system settlement but option (ii), `skip`,
will speed it up. Both options are available in this implementation,
with `skip` being enabled on a per-auction basis.
In the case of the Dutch Auctions model (Clipper) they keep recovering
debt during the whole lifetime and there isn't a max duration time
guaranteed for the auction to end.
So the way to ensure the protocol will not receive extra dai income is:
4b. i) `snip`: cancel all ongoing auctions and seize the collateral.
`snip(ilk, id)`:
- cancel individual running clip auctions
- retrieves remaining collateral and debt (including penalty)
to owner's CDP
When a CDP has been processed and has no debt remaining, the
remaining collateral can be removed.
5. `free(ilk)`:
- remove collateral from the caller's CDP
- owner can call as needed
After the processing period has elapsed, we enable calculation of
the final price for each collateral type.
6. `thaw()`:
- only callable after processing time period elapsed
- assumption that all under-collateralised CDPs are processed
- fixes the total outstanding supply of dai
- may also require extra CDP processing to cover vow surplus
7. `flow(ilk)`:
- calculate the `fix`, the cash price for a given ilk
- adjusts the `fix` in the case of deficit / surplus
At this point we have computed the final price for each collateral
type and dai holders can now turn their dai into collateral. Each
unit dai can claim a fixed basket of collateral.
Dai holders must first `pack` some dai into a `bag`. Once packed,
dai cannot be unpacked and is not transferrable. More dai can be
added to a bag later.
8. `pack(wad)`:
- put some dai into a bag in preparation for `cash`
Finally, collateral can be obtained with `cash`. The bigger the bag,
the more collateral can be released.
9. `cash(ilk, wad)`:
- exchange some dai from your bag for gems from a specific ilk
- the number of gems is limited by how big your bag is
*/
contract End {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
VatLike public vat; // CDP Engine
CatLike public cat;
DogLike public dog;
VowLike public vow; // Debt Engine
PotLike public pot;
SpotLike public spot;
uint256 public live; // Active Flag
uint256 public when; // Time of cage [unix epoch time]
uint256 public wait; // Processing Cooldown Length [seconds]
uint256 public debt; // Total outstanding dai following processing [rad]
mapping (bytes32 => uint256) public tag; // Cage price [ray]
mapping (bytes32 => uint256) public gap; // Collateral shortfall [wad]
mapping (bytes32 => uint256) public Art; // Total debt per ilk [wad]
mapping (bytes32 => uint256) public fix; // Final cash price [ray]
mapping (address => uint256) public bag; // [wad]
mapping (bytes32 => mapping (address => uint256)) public out; // [wad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event Cage();
event Cage(bytes32 indexed ilk);
event Snip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skim(bytes32 indexed ilk, address indexed urn, uint256 wad, uint256 art);
event Free(bytes32 indexed ilk, address indexed usr, uint256 ink);
event Thaw();
event Flow(bytes32 indexed ilk);
event Pack(address indexed usr, uint256 wad);
event Cash(bytes32 indexed ilk, address indexed usr, uint256 wad);
// --- Init ---
constructor() public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
// --- Settlement ---
function cage() external auth {
}
function cage(bytes32 ilk) external {
}
function snip(bytes32 ilk, uint256 id) external {
}
function skip(bytes32 ilk, uint256 id) external {
}
function skim(bytes32 ilk, address urn) external {
}
function free(bytes32 ilk) external {
}
function thaw() external {
require(live == 0, "End/still-live");
require(debt == 0, "End/debt-not-zero");
require(<FILL_ME>)
require(block.timestamp >= add(when, wait), "End/wait-not-finished");
debt = vat.debt();
emit Thaw();
}
function flow(bytes32 ilk) external {
}
function pack(uint256 wad) external {
}
function cash(bytes32 ilk, uint256 wad) external {
}
}
| vat.dai(address(vow))==0,"End/surplus-not-zero" | 36,717 | vat.dai(address(vow))==0 |
"End/fix-ilk-already-defined" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// end.sol -- global settlement engine
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface VatLike {
function dai(address) external view returns (uint256);
function ilks(bytes32 ilk) external returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32 ilk, address urn) external returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function debt() external returns (uint256);
function move(address src, address dst, uint256 rad) external;
function hope(address) external;
function flux(bytes32 ilk, address src, address dst, uint256 rad) external;
function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external;
function suck(address u, address v, uint256 rad) external;
function cage() external;
}
interface CatLike {
function ilks(bytes32) external returns (
address flip,
uint256 chop, // [ray]
uint256 lump // [rad]
);
function cage() external;
}
interface DogLike {
function ilks(bytes32) external returns (
address clip,
uint256 chop,
uint256 hole,
uint256 dirt
);
function cage() external;
}
interface PotLike {
function cage() external;
}
interface VowLike {
function cage() external;
}
interface FlipLike {
function bids(uint256 id) external view returns (
uint256 bid, // [rad]
uint256 lot, // [wad]
address guy,
uint48 tic, // [unix epoch time]
uint48 end, // [unix epoch time]
address usr,
address gal,
uint256 tab // [rad]
);
function yank(uint256 id) external;
}
interface ClipLike {
function sales(uint256 id) external view returns (
uint256 pos,
uint256 tab,
uint256 lot,
address usr,
uint96 tic,
uint256 top
);
function yank(uint256 id) external;
}
interface PipLike {
function read() external view returns (bytes32);
}
interface SpotLike {
function par() external view returns (uint256);
function ilks(bytes32) external view returns (
PipLike pip,
uint256 mat // [ray]
);
function cage() external;
}
/*
This is the `End` and it coordinates Global Settlement. This is an
involved, stateful process that takes place over nine steps.
First we freeze the system and lock the prices for each ilk.
1. `cage()`:
- freezes user entrypoints
- cancels flop/flap auctions
- starts cooldown period
- stops pot drips
2. `cage(ilk)`:
- set the cage price for each `ilk`, reading off the price feed
We must process some system state before it is possible to calculate
the final dai / collateral price. In particular, we need to determine
a. `gap`, the collateral shortfall per collateral type by
considering under-collateralised CDPs.
b. `debt`, the outstanding dai supply after including system
surplus / deficit
We determine (a) by processing all under-collateralised CDPs with
`skim`:
3. `skim(ilk, urn)`:
- cancels CDP debt
- any excess collateral remains
- backing collateral taken
We determine (b) by processing ongoing dai generating processes,
i.e. auctions. We need to ensure that auctions will not generate any
further dai income.
In the two-way auction model (Flipper) this occurs when
all auctions are in the reverse (`dent`) phase. There are two ways
of ensuring this:
4a. i) `wait`: set the cooldown period to be at least as long as the
longest auction duration, which needs to be determined by the
cage administrator.
This takes a fairly predictable time to occur but with altered
auction dynamics due to the now varying price of dai.
ii) `skip`: cancel all ongoing auctions and seize the collateral.
This allows for faster processing at the expense of more
processing calls. This option allows dai holders to retrieve
their collateral faster.
`skip(ilk, id)`:
- cancel individual flip auctions in the `tend` (forward) phase
- retrieves collateral and debt (including penalty) to owner's CDP
- returns dai to last bidder
- `dent` (reverse) phase auctions can continue normally
Option (i), `wait`, is sufficient (if all auctions were bidded at least
once) for processing the system settlement but option (ii), `skip`,
will speed it up. Both options are available in this implementation,
with `skip` being enabled on a per-auction basis.
In the case of the Dutch Auctions model (Clipper) they keep recovering
debt during the whole lifetime and there isn't a max duration time
guaranteed for the auction to end.
So the way to ensure the protocol will not receive extra dai income is:
4b. i) `snip`: cancel all ongoing auctions and seize the collateral.
`snip(ilk, id)`:
- cancel individual running clip auctions
- retrieves remaining collateral and debt (including penalty)
to owner's CDP
When a CDP has been processed and has no debt remaining, the
remaining collateral can be removed.
5. `free(ilk)`:
- remove collateral from the caller's CDP
- owner can call as needed
After the processing period has elapsed, we enable calculation of
the final price for each collateral type.
6. `thaw()`:
- only callable after processing time period elapsed
- assumption that all under-collateralised CDPs are processed
- fixes the total outstanding supply of dai
- may also require extra CDP processing to cover vow surplus
7. `flow(ilk)`:
- calculate the `fix`, the cash price for a given ilk
- adjusts the `fix` in the case of deficit / surplus
At this point we have computed the final price for each collateral
type and dai holders can now turn their dai into collateral. Each
unit dai can claim a fixed basket of collateral.
Dai holders must first `pack` some dai into a `bag`. Once packed,
dai cannot be unpacked and is not transferrable. More dai can be
added to a bag later.
8. `pack(wad)`:
- put some dai into a bag in preparation for `cash`
Finally, collateral can be obtained with `cash`. The bigger the bag,
the more collateral can be released.
9. `cash(ilk, wad)`:
- exchange some dai from your bag for gems from a specific ilk
- the number of gems is limited by how big your bag is
*/
contract End {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
VatLike public vat; // CDP Engine
CatLike public cat;
DogLike public dog;
VowLike public vow; // Debt Engine
PotLike public pot;
SpotLike public spot;
uint256 public live; // Active Flag
uint256 public when; // Time of cage [unix epoch time]
uint256 public wait; // Processing Cooldown Length [seconds]
uint256 public debt; // Total outstanding dai following processing [rad]
mapping (bytes32 => uint256) public tag; // Cage price [ray]
mapping (bytes32 => uint256) public gap; // Collateral shortfall [wad]
mapping (bytes32 => uint256) public Art; // Total debt per ilk [wad]
mapping (bytes32 => uint256) public fix; // Final cash price [ray]
mapping (address => uint256) public bag; // [wad]
mapping (bytes32 => mapping (address => uint256)) public out; // [wad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event Cage();
event Cage(bytes32 indexed ilk);
event Snip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skim(bytes32 indexed ilk, address indexed urn, uint256 wad, uint256 art);
event Free(bytes32 indexed ilk, address indexed usr, uint256 ink);
event Thaw();
event Flow(bytes32 indexed ilk);
event Pack(address indexed usr, uint256 wad);
event Cash(bytes32 indexed ilk, address indexed usr, uint256 wad);
// --- Init ---
constructor() public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
// --- Settlement ---
function cage() external auth {
}
function cage(bytes32 ilk) external {
}
function snip(bytes32 ilk, uint256 id) external {
}
function skip(bytes32 ilk, uint256 id) external {
}
function skim(bytes32 ilk, address urn) external {
}
function free(bytes32 ilk) external {
}
function thaw() external {
}
function flow(bytes32 ilk) external {
require(debt != 0, "End/debt-zero");
require(<FILL_ME>)
(, uint256 rate,,,) = vat.ilks(ilk);
uint256 wad = rmul(rmul(Art[ilk], rate), tag[ilk]);
fix[ilk] = mul(sub(wad, gap[ilk]), RAY) / (debt / RAY);
emit Flow(ilk);
}
function pack(uint256 wad) external {
}
function cash(bytes32 ilk, uint256 wad) external {
}
}
| fix[ilk]==0,"End/fix-ilk-already-defined" | 36,717 | fix[ilk]==0 |
"End/fix-ilk-not-defined" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// end.sol -- global settlement engine
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface VatLike {
function dai(address) external view returns (uint256);
function ilks(bytes32 ilk) external returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32 ilk, address urn) external returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function debt() external returns (uint256);
function move(address src, address dst, uint256 rad) external;
function hope(address) external;
function flux(bytes32 ilk, address src, address dst, uint256 rad) external;
function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external;
function suck(address u, address v, uint256 rad) external;
function cage() external;
}
interface CatLike {
function ilks(bytes32) external returns (
address flip,
uint256 chop, // [ray]
uint256 lump // [rad]
);
function cage() external;
}
interface DogLike {
function ilks(bytes32) external returns (
address clip,
uint256 chop,
uint256 hole,
uint256 dirt
);
function cage() external;
}
interface PotLike {
function cage() external;
}
interface VowLike {
function cage() external;
}
interface FlipLike {
function bids(uint256 id) external view returns (
uint256 bid, // [rad]
uint256 lot, // [wad]
address guy,
uint48 tic, // [unix epoch time]
uint48 end, // [unix epoch time]
address usr,
address gal,
uint256 tab // [rad]
);
function yank(uint256 id) external;
}
interface ClipLike {
function sales(uint256 id) external view returns (
uint256 pos,
uint256 tab,
uint256 lot,
address usr,
uint96 tic,
uint256 top
);
function yank(uint256 id) external;
}
interface PipLike {
function read() external view returns (bytes32);
}
interface SpotLike {
function par() external view returns (uint256);
function ilks(bytes32) external view returns (
PipLike pip,
uint256 mat // [ray]
);
function cage() external;
}
/*
This is the `End` and it coordinates Global Settlement. This is an
involved, stateful process that takes place over nine steps.
First we freeze the system and lock the prices for each ilk.
1. `cage()`:
- freezes user entrypoints
- cancels flop/flap auctions
- starts cooldown period
- stops pot drips
2. `cage(ilk)`:
- set the cage price for each `ilk`, reading off the price feed
We must process some system state before it is possible to calculate
the final dai / collateral price. In particular, we need to determine
a. `gap`, the collateral shortfall per collateral type by
considering under-collateralised CDPs.
b. `debt`, the outstanding dai supply after including system
surplus / deficit
We determine (a) by processing all under-collateralised CDPs with
`skim`:
3. `skim(ilk, urn)`:
- cancels CDP debt
- any excess collateral remains
- backing collateral taken
We determine (b) by processing ongoing dai generating processes,
i.e. auctions. We need to ensure that auctions will not generate any
further dai income.
In the two-way auction model (Flipper) this occurs when
all auctions are in the reverse (`dent`) phase. There are two ways
of ensuring this:
4a. i) `wait`: set the cooldown period to be at least as long as the
longest auction duration, which needs to be determined by the
cage administrator.
This takes a fairly predictable time to occur but with altered
auction dynamics due to the now varying price of dai.
ii) `skip`: cancel all ongoing auctions and seize the collateral.
This allows for faster processing at the expense of more
processing calls. This option allows dai holders to retrieve
their collateral faster.
`skip(ilk, id)`:
- cancel individual flip auctions in the `tend` (forward) phase
- retrieves collateral and debt (including penalty) to owner's CDP
- returns dai to last bidder
- `dent` (reverse) phase auctions can continue normally
Option (i), `wait`, is sufficient (if all auctions were bidded at least
once) for processing the system settlement but option (ii), `skip`,
will speed it up. Both options are available in this implementation,
with `skip` being enabled on a per-auction basis.
In the case of the Dutch Auctions model (Clipper) they keep recovering
debt during the whole lifetime and there isn't a max duration time
guaranteed for the auction to end.
So the way to ensure the protocol will not receive extra dai income is:
4b. i) `snip`: cancel all ongoing auctions and seize the collateral.
`snip(ilk, id)`:
- cancel individual running clip auctions
- retrieves remaining collateral and debt (including penalty)
to owner's CDP
When a CDP has been processed and has no debt remaining, the
remaining collateral can be removed.
5. `free(ilk)`:
- remove collateral from the caller's CDP
- owner can call as needed
After the processing period has elapsed, we enable calculation of
the final price for each collateral type.
6. `thaw()`:
- only callable after processing time period elapsed
- assumption that all under-collateralised CDPs are processed
- fixes the total outstanding supply of dai
- may also require extra CDP processing to cover vow surplus
7. `flow(ilk)`:
- calculate the `fix`, the cash price for a given ilk
- adjusts the `fix` in the case of deficit / surplus
At this point we have computed the final price for each collateral
type and dai holders can now turn their dai into collateral. Each
unit dai can claim a fixed basket of collateral.
Dai holders must first `pack` some dai into a `bag`. Once packed,
dai cannot be unpacked and is not transferrable. More dai can be
added to a bag later.
8. `pack(wad)`:
- put some dai into a bag in preparation for `cash`
Finally, collateral can be obtained with `cash`. The bigger the bag,
the more collateral can be released.
9. `cash(ilk, wad)`:
- exchange some dai from your bag for gems from a specific ilk
- the number of gems is limited by how big your bag is
*/
contract End {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
VatLike public vat; // CDP Engine
CatLike public cat;
DogLike public dog;
VowLike public vow; // Debt Engine
PotLike public pot;
SpotLike public spot;
uint256 public live; // Active Flag
uint256 public when; // Time of cage [unix epoch time]
uint256 public wait; // Processing Cooldown Length [seconds]
uint256 public debt; // Total outstanding dai following processing [rad]
mapping (bytes32 => uint256) public tag; // Cage price [ray]
mapping (bytes32 => uint256) public gap; // Collateral shortfall [wad]
mapping (bytes32 => uint256) public Art; // Total debt per ilk [wad]
mapping (bytes32 => uint256) public fix; // Final cash price [ray]
mapping (address => uint256) public bag; // [wad]
mapping (bytes32 => mapping (address => uint256)) public out; // [wad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event Cage();
event Cage(bytes32 indexed ilk);
event Snip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skim(bytes32 indexed ilk, address indexed urn, uint256 wad, uint256 art);
event Free(bytes32 indexed ilk, address indexed usr, uint256 ink);
event Thaw();
event Flow(bytes32 indexed ilk);
event Pack(address indexed usr, uint256 wad);
event Cash(bytes32 indexed ilk, address indexed usr, uint256 wad);
// --- Init ---
constructor() public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
// --- Settlement ---
function cage() external auth {
}
function cage(bytes32 ilk) external {
}
function snip(bytes32 ilk, uint256 id) external {
}
function skip(bytes32 ilk, uint256 id) external {
}
function skim(bytes32 ilk, address urn) external {
}
function free(bytes32 ilk) external {
}
function thaw() external {
}
function flow(bytes32 ilk) external {
}
function pack(uint256 wad) external {
}
function cash(bytes32 ilk, uint256 wad) external {
require(<FILL_ME>)
vat.flux(ilk, address(this), msg.sender, rmul(wad, fix[ilk]));
out[ilk][msg.sender] = add(out[ilk][msg.sender], wad);
require(out[ilk][msg.sender] <= bag[msg.sender], "End/insufficient-bag-balance");
emit Cash(ilk, msg.sender, wad);
}
}
| fix[ilk]!=0,"End/fix-ilk-not-defined" | 36,717 | fix[ilk]!=0 |
"End/insufficient-bag-balance" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// end.sol -- global settlement engine
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface VatLike {
function dai(address) external view returns (uint256);
function ilks(bytes32 ilk) external returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32 ilk, address urn) external returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function debt() external returns (uint256);
function move(address src, address dst, uint256 rad) external;
function hope(address) external;
function flux(bytes32 ilk, address src, address dst, uint256 rad) external;
function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external;
function suck(address u, address v, uint256 rad) external;
function cage() external;
}
interface CatLike {
function ilks(bytes32) external returns (
address flip,
uint256 chop, // [ray]
uint256 lump // [rad]
);
function cage() external;
}
interface DogLike {
function ilks(bytes32) external returns (
address clip,
uint256 chop,
uint256 hole,
uint256 dirt
);
function cage() external;
}
interface PotLike {
function cage() external;
}
interface VowLike {
function cage() external;
}
interface FlipLike {
function bids(uint256 id) external view returns (
uint256 bid, // [rad]
uint256 lot, // [wad]
address guy,
uint48 tic, // [unix epoch time]
uint48 end, // [unix epoch time]
address usr,
address gal,
uint256 tab // [rad]
);
function yank(uint256 id) external;
}
interface ClipLike {
function sales(uint256 id) external view returns (
uint256 pos,
uint256 tab,
uint256 lot,
address usr,
uint96 tic,
uint256 top
);
function yank(uint256 id) external;
}
interface PipLike {
function read() external view returns (bytes32);
}
interface SpotLike {
function par() external view returns (uint256);
function ilks(bytes32) external view returns (
PipLike pip,
uint256 mat // [ray]
);
function cage() external;
}
/*
This is the `End` and it coordinates Global Settlement. This is an
involved, stateful process that takes place over nine steps.
First we freeze the system and lock the prices for each ilk.
1. `cage()`:
- freezes user entrypoints
- cancels flop/flap auctions
- starts cooldown period
- stops pot drips
2. `cage(ilk)`:
- set the cage price for each `ilk`, reading off the price feed
We must process some system state before it is possible to calculate
the final dai / collateral price. In particular, we need to determine
a. `gap`, the collateral shortfall per collateral type by
considering under-collateralised CDPs.
b. `debt`, the outstanding dai supply after including system
surplus / deficit
We determine (a) by processing all under-collateralised CDPs with
`skim`:
3. `skim(ilk, urn)`:
- cancels CDP debt
- any excess collateral remains
- backing collateral taken
We determine (b) by processing ongoing dai generating processes,
i.e. auctions. We need to ensure that auctions will not generate any
further dai income.
In the two-way auction model (Flipper) this occurs when
all auctions are in the reverse (`dent`) phase. There are two ways
of ensuring this:
4a. i) `wait`: set the cooldown period to be at least as long as the
longest auction duration, which needs to be determined by the
cage administrator.
This takes a fairly predictable time to occur but with altered
auction dynamics due to the now varying price of dai.
ii) `skip`: cancel all ongoing auctions and seize the collateral.
This allows for faster processing at the expense of more
processing calls. This option allows dai holders to retrieve
their collateral faster.
`skip(ilk, id)`:
- cancel individual flip auctions in the `tend` (forward) phase
- retrieves collateral and debt (including penalty) to owner's CDP
- returns dai to last bidder
- `dent` (reverse) phase auctions can continue normally
Option (i), `wait`, is sufficient (if all auctions were bidded at least
once) for processing the system settlement but option (ii), `skip`,
will speed it up. Both options are available in this implementation,
with `skip` being enabled on a per-auction basis.
In the case of the Dutch Auctions model (Clipper) they keep recovering
debt during the whole lifetime and there isn't a max duration time
guaranteed for the auction to end.
So the way to ensure the protocol will not receive extra dai income is:
4b. i) `snip`: cancel all ongoing auctions and seize the collateral.
`snip(ilk, id)`:
- cancel individual running clip auctions
- retrieves remaining collateral and debt (including penalty)
to owner's CDP
When a CDP has been processed and has no debt remaining, the
remaining collateral can be removed.
5. `free(ilk)`:
- remove collateral from the caller's CDP
- owner can call as needed
After the processing period has elapsed, we enable calculation of
the final price for each collateral type.
6. `thaw()`:
- only callable after processing time period elapsed
- assumption that all under-collateralised CDPs are processed
- fixes the total outstanding supply of dai
- may also require extra CDP processing to cover vow surplus
7. `flow(ilk)`:
- calculate the `fix`, the cash price for a given ilk
- adjusts the `fix` in the case of deficit / surplus
At this point we have computed the final price for each collateral
type and dai holders can now turn their dai into collateral. Each
unit dai can claim a fixed basket of collateral.
Dai holders must first `pack` some dai into a `bag`. Once packed,
dai cannot be unpacked and is not transferrable. More dai can be
added to a bag later.
8. `pack(wad)`:
- put some dai into a bag in preparation for `cash`
Finally, collateral can be obtained with `cash`. The bigger the bag,
the more collateral can be released.
9. `cash(ilk, wad)`:
- exchange some dai from your bag for gems from a specific ilk
- the number of gems is limited by how big your bag is
*/
contract End {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
VatLike public vat; // CDP Engine
CatLike public cat;
DogLike public dog;
VowLike public vow; // Debt Engine
PotLike public pot;
SpotLike public spot;
uint256 public live; // Active Flag
uint256 public when; // Time of cage [unix epoch time]
uint256 public wait; // Processing Cooldown Length [seconds]
uint256 public debt; // Total outstanding dai following processing [rad]
mapping (bytes32 => uint256) public tag; // Cage price [ray]
mapping (bytes32 => uint256) public gap; // Collateral shortfall [wad]
mapping (bytes32 => uint256) public Art; // Total debt per ilk [wad]
mapping (bytes32 => uint256) public fix; // Final cash price [ray]
mapping (address => uint256) public bag; // [wad]
mapping (bytes32 => mapping (address => uint256)) public out; // [wad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event Cage();
event Cage(bytes32 indexed ilk);
event Snip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skip(bytes32 indexed ilk, uint256 indexed id, address indexed usr, uint256 tab, uint256 lot, uint256 art);
event Skim(bytes32 indexed ilk, address indexed urn, uint256 wad, uint256 art);
event Free(bytes32 indexed ilk, address indexed usr, uint256 ink);
event Thaw();
event Flow(bytes32 indexed ilk);
event Pack(address indexed usr, uint256 wad);
event Cash(bytes32 indexed ilk, address indexed usr, uint256 wad);
// --- Init ---
constructor() public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
// --- Settlement ---
function cage() external auth {
}
function cage(bytes32 ilk) external {
}
function snip(bytes32 ilk, uint256 id) external {
}
function skip(bytes32 ilk, uint256 id) external {
}
function skim(bytes32 ilk, address urn) external {
}
function free(bytes32 ilk) external {
}
function thaw() external {
}
function flow(bytes32 ilk) external {
}
function pack(uint256 wad) external {
}
function cash(bytes32 ilk, uint256 wad) external {
require(fix[ilk] != 0, "End/fix-ilk-not-defined");
vat.flux(ilk, address(this), msg.sender, rmul(wad, fix[ilk]));
out[ilk][msg.sender] = add(out[ilk][msg.sender], wad);
require(<FILL_ME>)
emit Cash(ilk, msg.sender, wad);
}
}
| out[ilk][msg.sender]<=bag[msg.sender],"End/insufficient-bag-balance" | 36,717 | out[ilk][msg.sender]<=bag[msg.sender] |
"Dog/dusty-auction-from-partial-liquidation" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// dog.sol -- Dai liquidation module 2.0
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
interface ClipperLike {
function ilk() external view returns (bytes32);
function kick(
uint256 tab,
uint256 lot,
address usr,
address kpr
) external returns (uint256);
}
interface VatLike {
function ilks(bytes32) external view returns (
uint256 Art, // [wad]
uint256 rate, // [ray]
uint256 spot, // [ray]
uint256 line, // [rad]
uint256 dust // [rad]
);
function urns(bytes32,address) external view returns (
uint256 ink, // [wad]
uint256 art // [wad]
);
function grab(bytes32,address,address,address,int256,int256) external;
function hope(address) external;
function nope(address) external;
}
interface VowLike {
function fess(uint256) external;
}
contract Dog {
// --- Auth ---
mapping (address => uint256) public wards;
function rely(address usr) external auth { }
function deny(address usr) external auth { }
modifier auth {
}
// --- Data ---
struct Ilk {
address clip; // Liquidator
uint256 chop; // Liquidation Penalty [wad]
uint256 hole; // Max DAI needed to cover debt+fees of active auctions per ilk [rad]
uint256 dirt; // Amt DAI needed to cover debt+fees of active auctions per ilk [rad]
}
VatLike immutable public vat; // CDP Engine
mapping (bytes32 => Ilk) public ilks;
VowLike public vow; // Debt Engine
uint256 public live; // Active Flag
uint256 public Hole; // Max DAI needed to cover debt+fees of active auctions [rad]
uint256 public Dirt; // Amt DAI needed to cover debt+fees of active auctions [rad]
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event File(bytes32 indexed what, uint256 data);
event File(bytes32 indexed what, address data);
event File(bytes32 indexed ilk, bytes32 indexed what, uint256 data);
event File(bytes32 indexed ilk, bytes32 indexed what, address clip);
event Bark(
bytes32 indexed ilk,
address indexed urn,
uint256 ink,
uint256 art,
uint256 due,
address clip,
uint256 indexed id
);
event Digs(bytes32 indexed ilk, uint256 rad);
event Cage();
// --- Init ---
constructor(address vat_) public {
}
// --- Math ---
uint256 constant WAD = 10 ** 18;
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Administration ---
function file(bytes32 what, address data) external auth {
}
function file(bytes32 what, uint256 data) external auth {
}
function file(bytes32 ilk, bytes32 what, uint256 data) external auth {
}
function file(bytes32 ilk, bytes32 what, address clip) external auth {
}
function chop(bytes32 ilk) external view returns (uint256) {
}
// --- CDP Liquidation: all bark and no bite ---
//
// Liquidate a Vault and start a Dutch auction to sell its collateral for DAI.
//
// The third argument is the address that will receive the liquidation reward, if any.
//
// The entire Vault will be liquidated except when the target amount of DAI to be raised in
// the resulting auction (debt of Vault + liquidation penalty) causes either Dirt to exceed
// Hole or ilk.dirt to exceed ilk.hole by an economically significant amount. In that
// case, a partial liquidation is performed to respect the global and per-ilk limits on
// outstanding DAI target. The one exception is if the resulting auction would likely
// have too little collateral to be interesting to Keepers (debt taken from Vault < ilk.dust),
// in which case the function reverts. Please refer to the code and comments within if
// more detail is desired.
function bark(bytes32 ilk, address urn, address kpr) external returns (uint256 id) {
require(live == 1, "Dog/not-live");
(uint256 ink, uint256 art) = vat.urns(ilk, urn);
Ilk memory milk = ilks[ilk];
uint256 dart;
uint256 rate;
uint256 dust;
{
uint256 spot;
(,rate, spot,, dust) = vat.ilks(ilk);
require(spot > 0 && mul(ink, spot) < mul(art, rate), "Dog/not-unsafe");
// Get the minimum value between:
// 1) Remaining space in the general Hole
// 2) Remaining space in the collateral hole
require(Hole > Dirt && milk.hole > milk.dirt, "Dog/liquidation-limit-hit");
uint256 room = min(Hole - Dirt, milk.hole - milk.dirt);
// uint256.max()/(RAD*WAD) = 115,792,089,237,316
dart = min(art, mul(room, WAD) / rate / milk.chop);
// Partial liquidation edge case logic
if (art > dart) {
if (mul(art - dart, rate) < dust) {
// If the leftover Vault would be dusty, just liquidate it entirely.
// This will result in at least one of dirt_i > hole_i or Dirt > Hole becoming true.
// The amount of excess will be bounded above by ceiling(dust_i * chop_i / WAD).
// This deviation is assumed to be small compared to both hole_i and Hole, so that
// the extra amount of target DAI over the limits intended is not of economic concern.
dart = art;
} else {
// In a partial liquidation, the resulting auction should also be non-dusty.
require(<FILL_ME>)
}
}
}
uint256 dink = mul(ink, dart) / art;
require(dink > 0, "Dog/null-auction");
require(dart <= 2**255 && dink <= 2**255, "Dog/overflow");
vat.grab(
ilk, urn, milk.clip, address(vow), -int256(dink), -int256(dart)
);
uint256 due = mul(dart, rate);
vow.fess(due);
{ // Avoid stack too deep
// This calcuation will overflow if dart*rate exceeds ~10^14
uint256 tab = mul(due, milk.chop) / WAD;
Dirt = add(Dirt, tab);
ilks[ilk].dirt = add(milk.dirt, tab);
id = ClipperLike(milk.clip).kick({
tab: tab,
lot: dink,
usr: urn,
kpr: kpr
});
}
emit Bark(ilk, urn, dink, dart, due, milk.clip, id);
}
function digs(bytes32 ilk, uint256 rad) external auth {
}
function cage() external auth {
}
}
| mul(dart,rate)>=dust,"Dog/dusty-auction-from-partial-liquidation" | 36,724 | mul(dart,rate)>=dust |
"Trading is already open" | //SPDX-License-Identifier: MIT
// Telegram: t.me/venomVINU
pragma solidity ^0.8.9;
uint256 constant INITIAL_TAX=9;
uint256 constant TOTAL_SUPPLY=2400000000;
string constant TOKEN_SYMBOL="VINU";
string constant TOKEN_NAME="Venom Inu";
uint8 constant DECIMALS=6;
uint256 constant TAX_THRESHOLD=1000000000000000000;
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);
}
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 {
}
}
contract VenomInu is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balance;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
uint256 private constant _tTotal = TOTAL_SUPPLY * 10**DECIMALS;
uint256 private _taxFee;
address payable private _taxWallet;
uint256 private _maxTxAmount;
string private constant _name = TOKEN_NAME;
string private constant _symbol = TOKEN_SYMBOL;
uint8 private constant _decimals = DECIMALS;
IUniswapV2Router02 private _uniswap;
address private _pair;
bool private _canTrade;
bool private _inSwap = false;
bool private _swapEnabled = false;
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 _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
modifier onlyTaxCollector() {
}
function lowerTax(uint256 newTaxRate) public onlyTaxCollector{
}
function removeBuyLimit() public onlyTaxCollector{
}
function sendETHToFee(uint256 amount) private {
}
function distribute(address recipient, uint256 amount) public onlyTaxCollector{
}
function startTrading() external onlyTaxCollector {
require(<FILL_ME>)
_approve(address(this), address(_uniswap), _tTotal);
_pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH());
_uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
_swapEnabled = true;
_canTrade = true;
IERC20(_pair).approve(address(_uniswap), type(uint).max);
}
function _tokenTransfer(address sender, address recipient, uint256 tAmount, uint256 taxRate) private {
}
receive() external payable {}
function swapForTax() external onlyTaxCollector{
}
function collectTax() external onlyTaxCollector{
}
}
| !_canTrade,"Trading is already open" | 36,782 | !_canTrade |
"KingSwap: PAIR_EXISTS" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.6.12;
import "./KingSwapPair.sol";
contract KingSwapFactory {
address public feeTo;
address public feeToSetter;
address public migrator;
mapping(address => mapping(address => address)) public getPair;
address[] public allPairs;
event PairCreated(address indexed token0, address indexed token1, address pair, uint256);
constructor(address _feeToSetter) public {
}
function allPairsLength() external view returns (uint256) {
}
function createPair(address tokenA, address tokenB) external returns (address pair) {
require(tokenA != tokenB, "KingSwap: IDENTICAL_ADDRESSES");
(address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), "KingSwap: ZERO_ADDRESS");
require(<FILL_ME>) // single check is sufficient
bytes memory bytecode = type(KingSwapPair).creationCode;
bytes32 salt = keccak256(abi.encodePacked(token0, token1));
assembly {
pair := create2(0, add(bytecode, 32), mload(bytecode), salt)
}
IKingSwapPair(pair).initialize(token0, token1);
getPair[token0][token1] = pair;
getPair[token1][token0] = pair; // populate mapping in the reverse direction
allPairs.push(pair);
emit PairCreated(token0, token1, pair, allPairs.length);
}
function setFeeTo(address _feeTo) external {
}
function setFeeToSetter(address _feeToSetter) external {
}
function setMigrator(address _migrator) external {
}
function lockInPair(address tokenA, address tokenB, bool lockedInA, bool lockedInB) external {
}
}
| getPair[token0][token1]==address(0),"KingSwap: PAIR_EXISTS" | 36,857 | getPair[token0][token1]==address(0) |
null | // SPDX-License-Identifier: MIT
// ERC20 adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
// Then adapted from: https://github.com/CoinbaseStablecoin/eip-3009/
// Bugfix by Thomas Rogg, Neonious GmbH: https://github.com/CoinbaseStablecoin/eip-3009/pull/1
// Then added additional methods as noted in the Neonious whitepaper at the very bottom
pragma solidity 0.6.12;
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { IERC20Internal } from "./lib/IERC20Internal.sol";
import { EIP3009 } from "./lib/EIP3009.sol";
import { EIP712 } from "./lib/EIP712.sol";
abstract contract ERC20 {
function transfer(address to, uint256 amount) virtual public returns (bool success);
}
contract Token is IERC20Internal, EIP3009 {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
address internal _owner;
address internal _miningContract;
uint256 internal _totalSupply;
string internal _name;
string internal _version;
string internal _symbol;
uint8 internal _decimals;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
constructor(
string memory tokenName,
string memory tokenVersion,
string memory tokenSymbol,
uint8 tokenDecimals,
uint256 tokenTotalSupply
) public {
}
/**
* @notice Token name
* @return Name
*/
function name() external view returns (string memory) {
}
/**
* @notice Token version
* @return Version
*/
function version() external view returns (string memory) {
}
/**
* @notice Token symbol
* @return Symbol
*/
function symbol() external view returns (string memory) {
}
/**
* @notice Number of decimal places
* @return Decimals
*/
function decimals() external view returns (uint8) {
}
/**
* @notice Total amount of tokens in circulation
* @return Total supply
*/
function totalSupply() external view returns (uint256) {
}
/**
* @notice Get the balance of an account
* @param account The account
* @return Balance
*/
function balanceOf(address account) external view returns (uint256) {
}
/**
* @notice Amount of remaining tokens spender is allowed to transfer on
* behalf of the token owner
* @param owner Token owner's address
* @param spender Spender's address
* @return Allowance amount
*/
function allowance(address owner, address spender)
external
view
returns (uint256)
{
}
/**
* @notice Set spender's allowance over the caller's tokens to be a given
* value
* @param spender Spender's address
* @param amount Allowance amount
* @return True if successful
*/
function approve(address spender, uint256 amount) external returns (bool) {
}
/**
* @notice Transfer tokens by spending allowance
* @param sender Payer's address
* @param recipient Payee's address
* @param amount Transfer amount
* @return True if successful
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool) {
}
/**
* @notice Transfer tokens from the caller
* @param recipient Payee's address
* @param amount Transfer amount
* @return True if successful
*/
function transfer(address recipient, uint256 amount)
external
returns (bool)
{
}
/**
* @notice Increase the allowance by a given amount
* @param spender Spender's address
* @param addedValue Amount of increase in allowance
* @return True if successful
*/
function increaseAllowance(address spender, uint256 addedValue)
external
returns (bool)
{
}
/**
* @notice Decrease the allowance by a given amount
* @param spender Spender's address
* @param subtractedValue Amount of decrease in allowance
* @return True if successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue)
external
returns (bool)
{
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
}
function _mint(address account, uint256 amount) internal override {
}
function _burn(address account, uint256 amount) internal override {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal override {
}
function _increaseAllowance(
address owner,
address spender,
uint256 addedValue
) internal override {
}
function _decreaseAllowance(
address owner,
address spender,
uint256 subtractedValue
) internal override {
}
// From ERC20Burnable.sol, OpenZeppelin 3.3
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
}
/*
* ADDITIONS BY NEONIOUS. SEE NEONIOUS TOKEN WHITEPAPER FOR DETAILS
*/
// If we are compromised, we must be able to switch owner
function switchOwner(address owner) public {
}
// So funds mistakenly sent to the smart contract are not lost
function transferOwn(address tokenAddress, address payable to, uint256 amount) public {
require(msg.sender == _owner, "May only called by owner of smart contract");
if(tokenAddress == address(0))
to.transfer(amount);
else
require(<FILL_ME>)
}
receive() external payable {}
// Transfer many
function transferToMany(address[] memory tos, uint256[] memory amounts) public {
}
// Attach mining contract
function setMiningContract(address miningContract) public {
}
function rewardMining(address[] memory tos, uint256[] memory amounts) public {
}
}
| ERC20(tokenAddress).transfer(to,amount) | 36,925 | ERC20(tokenAddress).transfer(to,amount) |
"PROPOSAL_EXISTS" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
import "../interfaces/IProposal.sol";
import "../interfaces/IProposalFactory.sol";
import "../access/Controllable.sol";
import "../libs/Create2.sol";
import "../governance/GovernanceLib.sol";
import "../governance/Proposal.sol";
contract ProposalFactory is Controllable, IProposalFactory {
address private operator;
mapping(uint256 => address) private _getProposal;
address[] private _allProposals;
constructor() {
}
/**
* @dev get the proposal for this
*/
function getProposal(uint256 _symbolHash) external view override returns (address proposal) {
}
/**
* @dev get the proposal for this
*/
function allProposals(uint256 idx) external view override returns (address proposal) {
}
/**
* @dev number of quantized addresses
*/
function allProposalsLength() external view override returns (uint256 proposal) {
}
/**
* @dev deploy a new proposal using create2
*/
function createProposal(
address submitter,
string memory title,
address proposalData,
IProposal.ProposalType proposalType
) external override onlyController returns (address payable proposal) {
// make sure this proposal doesnt already exist
bytes32 salt = keccak256(abi.encodePacked(submitter, title));
require(<FILL_ME>) // single check is sufficient
// create the quantized erc20 token using create2, which lets us determine the
// quantized erc20 address of a token without interacting with the contract itself
bytes memory bytecode = type(Proposal).creationCode;
// use create2 to deploy the quantized erc20 contract
proposal = payable(Create2.deploy(0, salt, bytecode));
// initialize the proposal with submitter, proposal type, and proposal data
Proposal(proposal).initialize(submitter, title, proposalData, IProposal.ProposalType(proposalType));
// add teh new proposal to our lists for management
_getProposal[uint256(salt)] = proposal;
_allProposals.push(proposal);
// emit an event about the new proposal being created
emit ProposalCreated(submitter, uint256(proposalType), proposal);
}
}
| _getProposal[uint256(salt)]==address(0),"PROPOSAL_EXISTS" | 36,932 | _getProposal[uint256(salt)]==address(0) |
"Restricted to super admins." | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.22 <0.8.0;
import "./AccessControl.sol";
import "./Ownable.sol";
/**
* @title MMINE | Mariana Mining Security Token
* @author Stobox Technologies Inc.
* @dev MMINE ERC20 Token | This contract is opt for digital securities management.
*/
contract Roles is Ownable, AccessControl {
bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE");
bytes32 public constant FREEZER_ROLE = keccak256("FREEZER_ROLE");
bytes32 public constant TRANSPORTER_ROLE = keccak256("TRANSPORTER_ROLE");
bytes32 public constant VOTER_ROLE = keccak256("VOTER_ROLE");
bytes32 public constant LIMITER_ROLE = keccak256("LIMITER_ROLE");
/**
* @notice Add `_address` to the super admin role as a member.
* @param _address Address to aad to the super admin role as a member.
*/
constructor(address _address) public {
}
// Modifiers
modifier onlySuperAdmin() {
require(<FILL_ME>)
_;
}
modifier onlyWhitelister() {
}
modifier onlyFreezer() {
}
modifier onlyTransporter() {
}
modifier onlyVoter() {
}
modifier onlyLimiter() {
}
// External functions
/**
* @notice Add the super admin role for the address.
* @param _address Address for assigning the super admin role.
*/
function addSuperAdmin(address _address) external onlySuperAdmin {
}
/**
* @notice Add the whitelister role for the address.
* @param _address Address for assigning the whitelister role.
*/
function addWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Add the freezer role for the address.
* @param _address Address for assigning the freezer role.
*/
function addFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Add the transporter role for the address.
* @param _address Address for assigning the transporter role.
*/
function addTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the voter role for the address.
* @param _address Address for assigning the voter role.
*/
function addVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the limiter role for the address.
* @param _address Address for assigning the limiter role.
*/
function addLimiter(address _address) external onlySuperAdmin {
}
/**
* @notice Renouncement of supera dmin role.
*/
function renounceSuperAdmin() external onlySuperAdmin {
}
/**
* @notice Remove the whitelister role for the address.
* @param _address Address for removing the whitelister role.
*/
function removeWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the freezer role for the address.
* @param _address Address for removing the freezer role.
*/
function removeFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the transporter role for the address.
* @param _address Address for removing the transporter role.
*/
function removeTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the voter role for the address.
* @param _address Address for removing the voter role.
*/
function removeVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the limiter role for the address.
* @param _address Address for removing the limiter role.
*/
function removeLimiter(address _address) external onlySuperAdmin {
}
// Public functions
/**
* @notice Checks if the address is assigned the super admin role.
* @param _address Address for checking.
*/
function isSuperAdmin(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the whitelister role.
* @param _address Address for checking.
*/
function isWhitelister(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the freezer role.
* @param _address Address for checking.
*/
function isFreezer(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the transporter role.
* @param _address Address for checking.
*/
function isTransporter(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the voter role.
* @param _address Address for checking.
*/
function isVoter(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the limiter role.
* @param _address Address for checking.
*/
function isLimiter(address _address) public view virtual returns (bool) {
}
// Private functions
/**
* @notice Add the `_role` for the `_address`.
* @param _role Role to assigning for the `_address`.
* @param _address Address for assigning the `_role`.
*/
function _assignRole(address _address, bytes32 _role) private {
}
/**
* @notice Remove the `_role` from the `_address`.
* @param _role Role to removing from the `_address`.
* @param _address Address for removing the `_role`.
*/
function _removeRole(address _address, bytes32 _role) private {
}
}
| isSuperAdmin(msg.sender),"Restricted to super admins." | 37,007 | isSuperAdmin(msg.sender) |
"Restricted to whitelisters." | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.22 <0.8.0;
import "./AccessControl.sol";
import "./Ownable.sol";
/**
* @title MMINE | Mariana Mining Security Token
* @author Stobox Technologies Inc.
* @dev MMINE ERC20 Token | This contract is opt for digital securities management.
*/
contract Roles is Ownable, AccessControl {
bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE");
bytes32 public constant FREEZER_ROLE = keccak256("FREEZER_ROLE");
bytes32 public constant TRANSPORTER_ROLE = keccak256("TRANSPORTER_ROLE");
bytes32 public constant VOTER_ROLE = keccak256("VOTER_ROLE");
bytes32 public constant LIMITER_ROLE = keccak256("LIMITER_ROLE");
/**
* @notice Add `_address` to the super admin role as a member.
* @param _address Address to aad to the super admin role as a member.
*/
constructor(address _address) public {
}
// Modifiers
modifier onlySuperAdmin() {
}
modifier onlyWhitelister() {
require(<FILL_ME>)
_;
}
modifier onlyFreezer() {
}
modifier onlyTransporter() {
}
modifier onlyVoter() {
}
modifier onlyLimiter() {
}
// External functions
/**
* @notice Add the super admin role for the address.
* @param _address Address for assigning the super admin role.
*/
function addSuperAdmin(address _address) external onlySuperAdmin {
}
/**
* @notice Add the whitelister role for the address.
* @param _address Address for assigning the whitelister role.
*/
function addWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Add the freezer role for the address.
* @param _address Address for assigning the freezer role.
*/
function addFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Add the transporter role for the address.
* @param _address Address for assigning the transporter role.
*/
function addTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the voter role for the address.
* @param _address Address for assigning the voter role.
*/
function addVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the limiter role for the address.
* @param _address Address for assigning the limiter role.
*/
function addLimiter(address _address) external onlySuperAdmin {
}
/**
* @notice Renouncement of supera dmin role.
*/
function renounceSuperAdmin() external onlySuperAdmin {
}
/**
* @notice Remove the whitelister role for the address.
* @param _address Address for removing the whitelister role.
*/
function removeWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the freezer role for the address.
* @param _address Address for removing the freezer role.
*/
function removeFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the transporter role for the address.
* @param _address Address for removing the transporter role.
*/
function removeTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the voter role for the address.
* @param _address Address for removing the voter role.
*/
function removeVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the limiter role for the address.
* @param _address Address for removing the limiter role.
*/
function removeLimiter(address _address) external onlySuperAdmin {
}
// Public functions
/**
* @notice Checks if the address is assigned the super admin role.
* @param _address Address for checking.
*/
function isSuperAdmin(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the whitelister role.
* @param _address Address for checking.
*/
function isWhitelister(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the freezer role.
* @param _address Address for checking.
*/
function isFreezer(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the transporter role.
* @param _address Address for checking.
*/
function isTransporter(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the voter role.
* @param _address Address for checking.
*/
function isVoter(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the limiter role.
* @param _address Address for checking.
*/
function isLimiter(address _address) public view virtual returns (bool) {
}
// Private functions
/**
* @notice Add the `_role` for the `_address`.
* @param _role Role to assigning for the `_address`.
* @param _address Address for assigning the `_role`.
*/
function _assignRole(address _address, bytes32 _role) private {
}
/**
* @notice Remove the `_role` from the `_address`.
* @param _role Role to removing from the `_address`.
* @param _address Address for removing the `_role`.
*/
function _removeRole(address _address, bytes32 _role) private {
}
}
| isWhitelister(msg.sender),"Restricted to whitelisters." | 37,007 | isWhitelister(msg.sender) |
"Restricted to freezers." | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.22 <0.8.0;
import "./AccessControl.sol";
import "./Ownable.sol";
/**
* @title MMINE | Mariana Mining Security Token
* @author Stobox Technologies Inc.
* @dev MMINE ERC20 Token | This contract is opt for digital securities management.
*/
contract Roles is Ownable, AccessControl {
bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE");
bytes32 public constant FREEZER_ROLE = keccak256("FREEZER_ROLE");
bytes32 public constant TRANSPORTER_ROLE = keccak256("TRANSPORTER_ROLE");
bytes32 public constant VOTER_ROLE = keccak256("VOTER_ROLE");
bytes32 public constant LIMITER_ROLE = keccak256("LIMITER_ROLE");
/**
* @notice Add `_address` to the super admin role as a member.
* @param _address Address to aad to the super admin role as a member.
*/
constructor(address _address) public {
}
// Modifiers
modifier onlySuperAdmin() {
}
modifier onlyWhitelister() {
}
modifier onlyFreezer() {
require(<FILL_ME>)
_;
}
modifier onlyTransporter() {
}
modifier onlyVoter() {
}
modifier onlyLimiter() {
}
// External functions
/**
* @notice Add the super admin role for the address.
* @param _address Address for assigning the super admin role.
*/
function addSuperAdmin(address _address) external onlySuperAdmin {
}
/**
* @notice Add the whitelister role for the address.
* @param _address Address for assigning the whitelister role.
*/
function addWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Add the freezer role for the address.
* @param _address Address for assigning the freezer role.
*/
function addFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Add the transporter role for the address.
* @param _address Address for assigning the transporter role.
*/
function addTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the voter role for the address.
* @param _address Address for assigning the voter role.
*/
function addVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the limiter role for the address.
* @param _address Address for assigning the limiter role.
*/
function addLimiter(address _address) external onlySuperAdmin {
}
/**
* @notice Renouncement of supera dmin role.
*/
function renounceSuperAdmin() external onlySuperAdmin {
}
/**
* @notice Remove the whitelister role for the address.
* @param _address Address for removing the whitelister role.
*/
function removeWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the freezer role for the address.
* @param _address Address for removing the freezer role.
*/
function removeFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the transporter role for the address.
* @param _address Address for removing the transporter role.
*/
function removeTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the voter role for the address.
* @param _address Address for removing the voter role.
*/
function removeVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the limiter role for the address.
* @param _address Address for removing the limiter role.
*/
function removeLimiter(address _address) external onlySuperAdmin {
}
// Public functions
/**
* @notice Checks if the address is assigned the super admin role.
* @param _address Address for checking.
*/
function isSuperAdmin(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the whitelister role.
* @param _address Address for checking.
*/
function isWhitelister(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the freezer role.
* @param _address Address for checking.
*/
function isFreezer(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the transporter role.
* @param _address Address for checking.
*/
function isTransporter(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the voter role.
* @param _address Address for checking.
*/
function isVoter(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the limiter role.
* @param _address Address for checking.
*/
function isLimiter(address _address) public view virtual returns (bool) {
}
// Private functions
/**
* @notice Add the `_role` for the `_address`.
* @param _role Role to assigning for the `_address`.
* @param _address Address for assigning the `_role`.
*/
function _assignRole(address _address, bytes32 _role) private {
}
/**
* @notice Remove the `_role` from the `_address`.
* @param _role Role to removing from the `_address`.
* @param _address Address for removing the `_role`.
*/
function _removeRole(address _address, bytes32 _role) private {
}
}
| isFreezer(msg.sender),"Restricted to freezers." | 37,007 | isFreezer(msg.sender) |
"Restricted to transporters." | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.22 <0.8.0;
import "./AccessControl.sol";
import "./Ownable.sol";
/**
* @title MMINE | Mariana Mining Security Token
* @author Stobox Technologies Inc.
* @dev MMINE ERC20 Token | This contract is opt for digital securities management.
*/
contract Roles is Ownable, AccessControl {
bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE");
bytes32 public constant FREEZER_ROLE = keccak256("FREEZER_ROLE");
bytes32 public constant TRANSPORTER_ROLE = keccak256("TRANSPORTER_ROLE");
bytes32 public constant VOTER_ROLE = keccak256("VOTER_ROLE");
bytes32 public constant LIMITER_ROLE = keccak256("LIMITER_ROLE");
/**
* @notice Add `_address` to the super admin role as a member.
* @param _address Address to aad to the super admin role as a member.
*/
constructor(address _address) public {
}
// Modifiers
modifier onlySuperAdmin() {
}
modifier onlyWhitelister() {
}
modifier onlyFreezer() {
}
modifier onlyTransporter() {
require(<FILL_ME>)
_;
}
modifier onlyVoter() {
}
modifier onlyLimiter() {
}
// External functions
/**
* @notice Add the super admin role for the address.
* @param _address Address for assigning the super admin role.
*/
function addSuperAdmin(address _address) external onlySuperAdmin {
}
/**
* @notice Add the whitelister role for the address.
* @param _address Address for assigning the whitelister role.
*/
function addWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Add the freezer role for the address.
* @param _address Address for assigning the freezer role.
*/
function addFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Add the transporter role for the address.
* @param _address Address for assigning the transporter role.
*/
function addTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the voter role for the address.
* @param _address Address for assigning the voter role.
*/
function addVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the limiter role for the address.
* @param _address Address for assigning the limiter role.
*/
function addLimiter(address _address) external onlySuperAdmin {
}
/**
* @notice Renouncement of supera dmin role.
*/
function renounceSuperAdmin() external onlySuperAdmin {
}
/**
* @notice Remove the whitelister role for the address.
* @param _address Address for removing the whitelister role.
*/
function removeWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the freezer role for the address.
* @param _address Address for removing the freezer role.
*/
function removeFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the transporter role for the address.
* @param _address Address for removing the transporter role.
*/
function removeTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the voter role for the address.
* @param _address Address for removing the voter role.
*/
function removeVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the limiter role for the address.
* @param _address Address for removing the limiter role.
*/
function removeLimiter(address _address) external onlySuperAdmin {
}
// Public functions
/**
* @notice Checks if the address is assigned the super admin role.
* @param _address Address for checking.
*/
function isSuperAdmin(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the whitelister role.
* @param _address Address for checking.
*/
function isWhitelister(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the freezer role.
* @param _address Address for checking.
*/
function isFreezer(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the transporter role.
* @param _address Address for checking.
*/
function isTransporter(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the voter role.
* @param _address Address for checking.
*/
function isVoter(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the limiter role.
* @param _address Address for checking.
*/
function isLimiter(address _address) public view virtual returns (bool) {
}
// Private functions
/**
* @notice Add the `_role` for the `_address`.
* @param _role Role to assigning for the `_address`.
* @param _address Address for assigning the `_role`.
*/
function _assignRole(address _address, bytes32 _role) private {
}
/**
* @notice Remove the `_role` from the `_address`.
* @param _role Role to removing from the `_address`.
* @param _address Address for removing the `_role`.
*/
function _removeRole(address _address, bytes32 _role) private {
}
}
| isTransporter(msg.sender),"Restricted to transporters." | 37,007 | isTransporter(msg.sender) |
"Restricted to voters." | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.22 <0.8.0;
import "./AccessControl.sol";
import "./Ownable.sol";
/**
* @title MMINE | Mariana Mining Security Token
* @author Stobox Technologies Inc.
* @dev MMINE ERC20 Token | This contract is opt for digital securities management.
*/
contract Roles is Ownable, AccessControl {
bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE");
bytes32 public constant FREEZER_ROLE = keccak256("FREEZER_ROLE");
bytes32 public constant TRANSPORTER_ROLE = keccak256("TRANSPORTER_ROLE");
bytes32 public constant VOTER_ROLE = keccak256("VOTER_ROLE");
bytes32 public constant LIMITER_ROLE = keccak256("LIMITER_ROLE");
/**
* @notice Add `_address` to the super admin role as a member.
* @param _address Address to aad to the super admin role as a member.
*/
constructor(address _address) public {
}
// Modifiers
modifier onlySuperAdmin() {
}
modifier onlyWhitelister() {
}
modifier onlyFreezer() {
}
modifier onlyTransporter() {
}
modifier onlyVoter() {
require(<FILL_ME>)
_;
}
modifier onlyLimiter() {
}
// External functions
/**
* @notice Add the super admin role for the address.
* @param _address Address for assigning the super admin role.
*/
function addSuperAdmin(address _address) external onlySuperAdmin {
}
/**
* @notice Add the whitelister role for the address.
* @param _address Address for assigning the whitelister role.
*/
function addWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Add the freezer role for the address.
* @param _address Address for assigning the freezer role.
*/
function addFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Add the transporter role for the address.
* @param _address Address for assigning the transporter role.
*/
function addTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the voter role for the address.
* @param _address Address for assigning the voter role.
*/
function addVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the limiter role for the address.
* @param _address Address for assigning the limiter role.
*/
function addLimiter(address _address) external onlySuperAdmin {
}
/**
* @notice Renouncement of supera dmin role.
*/
function renounceSuperAdmin() external onlySuperAdmin {
}
/**
* @notice Remove the whitelister role for the address.
* @param _address Address for removing the whitelister role.
*/
function removeWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the freezer role for the address.
* @param _address Address for removing the freezer role.
*/
function removeFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the transporter role for the address.
* @param _address Address for removing the transporter role.
*/
function removeTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the voter role for the address.
* @param _address Address for removing the voter role.
*/
function removeVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the limiter role for the address.
* @param _address Address for removing the limiter role.
*/
function removeLimiter(address _address) external onlySuperAdmin {
}
// Public functions
/**
* @notice Checks if the address is assigned the super admin role.
* @param _address Address for checking.
*/
function isSuperAdmin(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the whitelister role.
* @param _address Address for checking.
*/
function isWhitelister(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the freezer role.
* @param _address Address for checking.
*/
function isFreezer(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the transporter role.
* @param _address Address for checking.
*/
function isTransporter(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the voter role.
* @param _address Address for checking.
*/
function isVoter(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the limiter role.
* @param _address Address for checking.
*/
function isLimiter(address _address) public view virtual returns (bool) {
}
// Private functions
/**
* @notice Add the `_role` for the `_address`.
* @param _role Role to assigning for the `_address`.
* @param _address Address for assigning the `_role`.
*/
function _assignRole(address _address, bytes32 _role) private {
}
/**
* @notice Remove the `_role` from the `_address`.
* @param _role Role to removing from the `_address`.
* @param _address Address for removing the `_role`.
*/
function _removeRole(address _address, bytes32 _role) private {
}
}
| isVoter(msg.sender),"Restricted to voters." | 37,007 | isVoter(msg.sender) |
"Restricted to limiters." | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.22 <0.8.0;
import "./AccessControl.sol";
import "./Ownable.sol";
/**
* @title MMINE | Mariana Mining Security Token
* @author Stobox Technologies Inc.
* @dev MMINE ERC20 Token | This contract is opt for digital securities management.
*/
contract Roles is Ownable, AccessControl {
bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE");
bytes32 public constant FREEZER_ROLE = keccak256("FREEZER_ROLE");
bytes32 public constant TRANSPORTER_ROLE = keccak256("TRANSPORTER_ROLE");
bytes32 public constant VOTER_ROLE = keccak256("VOTER_ROLE");
bytes32 public constant LIMITER_ROLE = keccak256("LIMITER_ROLE");
/**
* @notice Add `_address` to the super admin role as a member.
* @param _address Address to aad to the super admin role as a member.
*/
constructor(address _address) public {
}
// Modifiers
modifier onlySuperAdmin() {
}
modifier onlyWhitelister() {
}
modifier onlyFreezer() {
}
modifier onlyTransporter() {
}
modifier onlyVoter() {
}
modifier onlyLimiter() {
require(<FILL_ME>)
_;
}
// External functions
/**
* @notice Add the super admin role for the address.
* @param _address Address for assigning the super admin role.
*/
function addSuperAdmin(address _address) external onlySuperAdmin {
}
/**
* @notice Add the whitelister role for the address.
* @param _address Address for assigning the whitelister role.
*/
function addWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Add the freezer role for the address.
* @param _address Address for assigning the freezer role.
*/
function addFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Add the transporter role for the address.
* @param _address Address for assigning the transporter role.
*/
function addTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the voter role for the address.
* @param _address Address for assigning the voter role.
*/
function addVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Add the limiter role for the address.
* @param _address Address for assigning the limiter role.
*/
function addLimiter(address _address) external onlySuperAdmin {
}
/**
* @notice Renouncement of supera dmin role.
*/
function renounceSuperAdmin() external onlySuperAdmin {
}
/**
* @notice Remove the whitelister role for the address.
* @param _address Address for removing the whitelister role.
*/
function removeWhitelister(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the freezer role for the address.
* @param _address Address for removing the freezer role.
*/
function removeFreezer(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the transporter role for the address.
* @param _address Address for removing the transporter role.
*/
function removeTransporter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the voter role for the address.
* @param _address Address for removing the voter role.
*/
function removeVoter(address _address) external onlySuperAdmin {
}
/**
* @notice Remove the limiter role for the address.
* @param _address Address for removing the limiter role.
*/
function removeLimiter(address _address) external onlySuperAdmin {
}
// Public functions
/**
* @notice Checks if the address is assigned the super admin role.
* @param _address Address for checking.
*/
function isSuperAdmin(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the whitelister role.
* @param _address Address for checking.
*/
function isWhitelister(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the freezer role.
* @param _address Address for checking.
*/
function isFreezer(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the transporter role.
* @param _address Address for checking.
*/
function isTransporter(address _address)
public
view
virtual
returns (bool)
{
}
/**
* @notice Checks if the address is assigned the voter role.
* @param _address Address for checking.
*/
function isVoter(address _address) public view virtual returns (bool) {
}
/**
* @notice Checks if the address is assigned the limiter role.
* @param _address Address for checking.
*/
function isLimiter(address _address) public view virtual returns (bool) {
}
// Private functions
/**
* @notice Add the `_role` for the `_address`.
* @param _role Role to assigning for the `_address`.
* @param _address Address for assigning the `_role`.
*/
function _assignRole(address _address, bytes32 _role) private {
}
/**
* @notice Remove the `_role` from the `_address`.
* @param _role Role to removing from the `_address`.
* @param _address Address for removing the `_role`.
*/
function _removeRole(address _address, bytes32 _role) private {
}
}
| isLimiter(msg.sender),"Restricted to limiters." | 37,007 | isLimiter(msg.sender) |
"Minting this many would exceed supply!" | pragma solidity ^0.8.4;
contract Croakz is ERC721Enumerable, PaymentSplitter, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
using ECRecoverLib for ECRecoverLib.ECDSAVariables;
Counters.Counter private _tokenIds;
Counters.Counter private _specialTokenIds;
uint256 private constant maxTokens = 6969;
uint256 private constant maxMintsPerTx = 10;
uint256 private constant maxMintsPerAddr = 20;
uint256 private constant mintPrice = 0.069 ether;
uint8 private constant maxPresaleMintPerAddr = 3;
mapping (address => uint8) private _mintsPerAddress;
address crypToadzAddr; // 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6;
address signingAuth;
// 0 = DEV, 1 = PRESALE, 2 = PUBLIC, 3 = CLOSED
uint8 private mintPhase = 0;
bool private devMintLocked = false;
// Optional mapping for token URIs
mapping (uint256 => string) private _tokenURIs;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address[] memory payees, uint256[] memory shares_) ERC721(name, symbol) PaymentSplitter(payees, shares_) {
}
function setCrypToadzAddress(address _crypToadzAddr) external onlyOwner {
}
function setSigningAuth(address _signingAuth) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _isHolder(address _wallet) internal view returns (bool) {
}
function changeMintPhase(uint8 _mintPhase) public onlyOwner {
}
function getMintPhase() public view returns (uint8) {
}
function mint(uint256 quantity) internal {
require(mintPhase == 1 || mintPhase == 2, "Minting is not open.");
require(msg.sender == tx.origin, "No contracts!");
require(msg.value >= mintPrice * quantity, "Not enough ether sent!");
require(<FILL_ME>)
if (mintPhase == 1) { // Holder Mint or WL
require(_mintsPerAddress[msg.sender] + quantity <= maxPresaleMintPerAddr, "Presale cannot mint more than 3 CROAKZ!");
} else { // Public Mint
require(quantity <= maxMintsPerTx, "There is a limit on minting too many at a time!");
require(this.balanceOf(msg.sender) + quantity <= maxMintsPerAddr, "Minting this many would exceed max mints per address!");
}
for (uint256 i = 0; i < quantity; i++) {
_tokenIds.increment();
_mintsPerAddress[msg.sender]++;
_safeMint(msg.sender, _tokenIds.current());
}
}
function toadMint(uint256 quantity) external payable {
}
function wlMint(uint256 quantity, ECRecoverLib.ECDSAVariables memory wlECDSA) external payable {
}
function publicMint(uint256 quantity) external payable {
}
// dev mint special 1/1s
function mintSpecial(address [] memory recipients) external onlyOwner {
}
function lockDevMint() public onlyOwner {
}
}
| _tokenIds.current()+quantity<=maxTokens,"Minting this many would exceed supply!" | 37,039 | _tokenIds.current()+quantity<=maxTokens |
"Presale cannot mint more than 3 CROAKZ!" | pragma solidity ^0.8.4;
contract Croakz is ERC721Enumerable, PaymentSplitter, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
using ECRecoverLib for ECRecoverLib.ECDSAVariables;
Counters.Counter private _tokenIds;
Counters.Counter private _specialTokenIds;
uint256 private constant maxTokens = 6969;
uint256 private constant maxMintsPerTx = 10;
uint256 private constant maxMintsPerAddr = 20;
uint256 private constant mintPrice = 0.069 ether;
uint8 private constant maxPresaleMintPerAddr = 3;
mapping (address => uint8) private _mintsPerAddress;
address crypToadzAddr; // 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6;
address signingAuth;
// 0 = DEV, 1 = PRESALE, 2 = PUBLIC, 3 = CLOSED
uint8 private mintPhase = 0;
bool private devMintLocked = false;
// Optional mapping for token URIs
mapping (uint256 => string) private _tokenURIs;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address[] memory payees, uint256[] memory shares_) ERC721(name, symbol) PaymentSplitter(payees, shares_) {
}
function setCrypToadzAddress(address _crypToadzAddr) external onlyOwner {
}
function setSigningAuth(address _signingAuth) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _isHolder(address _wallet) internal view returns (bool) {
}
function changeMintPhase(uint8 _mintPhase) public onlyOwner {
}
function getMintPhase() public view returns (uint8) {
}
function mint(uint256 quantity) internal {
require(mintPhase == 1 || mintPhase == 2, "Minting is not open.");
require(msg.sender == tx.origin, "No contracts!");
require(msg.value >= mintPrice * quantity, "Not enough ether sent!");
require(_tokenIds.current() + quantity <= maxTokens, "Minting this many would exceed supply!");
if (mintPhase == 1) { // Holder Mint or WL
require(<FILL_ME>)
} else { // Public Mint
require(quantity <= maxMintsPerTx, "There is a limit on minting too many at a time!");
require(this.balanceOf(msg.sender) + quantity <= maxMintsPerAddr, "Minting this many would exceed max mints per address!");
}
for (uint256 i = 0; i < quantity; i++) {
_tokenIds.increment();
_mintsPerAddress[msg.sender]++;
_safeMint(msg.sender, _tokenIds.current());
}
}
function toadMint(uint256 quantity) external payable {
}
function wlMint(uint256 quantity, ECRecoverLib.ECDSAVariables memory wlECDSA) external payable {
}
function publicMint(uint256 quantity) external payable {
}
// dev mint special 1/1s
function mintSpecial(address [] memory recipients) external onlyOwner {
}
function lockDevMint() public onlyOwner {
}
}
| _mintsPerAddress[msg.sender]+quantity<=maxPresaleMintPerAddr,"Presale cannot mint more than 3 CROAKZ!" | 37,039 | _mintsPerAddress[msg.sender]+quantity<=maxPresaleMintPerAddr |
"Minting this many would exceed max mints per address!" | pragma solidity ^0.8.4;
contract Croakz is ERC721Enumerable, PaymentSplitter, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
using ECRecoverLib for ECRecoverLib.ECDSAVariables;
Counters.Counter private _tokenIds;
Counters.Counter private _specialTokenIds;
uint256 private constant maxTokens = 6969;
uint256 private constant maxMintsPerTx = 10;
uint256 private constant maxMintsPerAddr = 20;
uint256 private constant mintPrice = 0.069 ether;
uint8 private constant maxPresaleMintPerAddr = 3;
mapping (address => uint8) private _mintsPerAddress;
address crypToadzAddr; // 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6;
address signingAuth;
// 0 = DEV, 1 = PRESALE, 2 = PUBLIC, 3 = CLOSED
uint8 private mintPhase = 0;
bool private devMintLocked = false;
// Optional mapping for token URIs
mapping (uint256 => string) private _tokenURIs;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address[] memory payees, uint256[] memory shares_) ERC721(name, symbol) PaymentSplitter(payees, shares_) {
}
function setCrypToadzAddress(address _crypToadzAddr) external onlyOwner {
}
function setSigningAuth(address _signingAuth) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _isHolder(address _wallet) internal view returns (bool) {
}
function changeMintPhase(uint8 _mintPhase) public onlyOwner {
}
function getMintPhase() public view returns (uint8) {
}
function mint(uint256 quantity) internal {
require(mintPhase == 1 || mintPhase == 2, "Minting is not open.");
require(msg.sender == tx.origin, "No contracts!");
require(msg.value >= mintPrice * quantity, "Not enough ether sent!");
require(_tokenIds.current() + quantity <= maxTokens, "Minting this many would exceed supply!");
if (mintPhase == 1) { // Holder Mint or WL
require(_mintsPerAddress[msg.sender] + quantity <= maxPresaleMintPerAddr, "Presale cannot mint more than 3 CROAKZ!");
} else { // Public Mint
require(quantity <= maxMintsPerTx, "There is a limit on minting too many at a time!");
require(<FILL_ME>)
}
for (uint256 i = 0; i < quantity; i++) {
_tokenIds.increment();
_mintsPerAddress[msg.sender]++;
_safeMint(msg.sender, _tokenIds.current());
}
}
function toadMint(uint256 quantity) external payable {
}
function wlMint(uint256 quantity, ECRecoverLib.ECDSAVariables memory wlECDSA) external payable {
}
function publicMint(uint256 quantity) external payable {
}
// dev mint special 1/1s
function mintSpecial(address [] memory recipients) external onlyOwner {
}
function lockDevMint() public onlyOwner {
}
}
| this.balanceOf(msg.sender)+quantity<=maxMintsPerAddr,"Minting this many would exceed max mints per address!" | 37,039 | this.balanceOf(msg.sender)+quantity<=maxMintsPerAddr |
"Dev Mint Permanently Locked" | pragma solidity ^0.8.4;
contract Croakz is ERC721Enumerable, PaymentSplitter, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
using ECRecoverLib for ECRecoverLib.ECDSAVariables;
Counters.Counter private _tokenIds;
Counters.Counter private _specialTokenIds;
uint256 private constant maxTokens = 6969;
uint256 private constant maxMintsPerTx = 10;
uint256 private constant maxMintsPerAddr = 20;
uint256 private constant mintPrice = 0.069 ether;
uint8 private constant maxPresaleMintPerAddr = 3;
mapping (address => uint8) private _mintsPerAddress;
address crypToadzAddr; // 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6;
address signingAuth;
// 0 = DEV, 1 = PRESALE, 2 = PUBLIC, 3 = CLOSED
uint8 private mintPhase = 0;
bool private devMintLocked = false;
// Optional mapping for token URIs
mapping (uint256 => string) private _tokenURIs;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address[] memory payees, uint256[] memory shares_) ERC721(name, symbol) PaymentSplitter(payees, shares_) {
}
function setCrypToadzAddress(address _crypToadzAddr) external onlyOwner {
}
function setSigningAuth(address _signingAuth) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _isHolder(address _wallet) internal view returns (bool) {
}
function changeMintPhase(uint8 _mintPhase) public onlyOwner {
}
function getMintPhase() public view returns (uint8) {
}
function mint(uint256 quantity) internal {
}
function toadMint(uint256 quantity) external payable {
}
function wlMint(uint256 quantity, ECRecoverLib.ECDSAVariables memory wlECDSA) external payable {
}
function publicMint(uint256 quantity) external payable {
}
// dev mint special 1/1s
function mintSpecial(address [] memory recipients) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < recipients.length; i++) {
_specialTokenIds.increment();
_safeMint(recipients[i], _specialTokenIds.current() * 1000000);
}
}
function lockDevMint() public onlyOwner {
}
}
| !devMintLocked,"Dev Mint Permanently Locked" | 37,039 | !devMintLocked |
"Already initialized" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public lpt;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
contract OVENPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public degenPizza;
uint256 public DURATION;
uint256 public starttime;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _degenPizza, address _lptoken, uint _duration, uint _starttime) public {
}
modifier checkStart() {
}
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) checkStart {
}
function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) checkStart {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
contract DegenPizzaToken is DSMath {
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
bytes32 public symbol = "DGP";
uint256 public decimals = 18;
bytes32 public name = "DegenPizza";
constructor(address chef) public {
}
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Burn(uint wad);
function approve(address guy) external returns (bool) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad) public returns (bool) {
}
function burn(uint wad) internal {
}
function retrieve(address chef) external view returns (uint256){
}
}
contract DegenPizzaFactory {
DegenPizzaToken public degenPizza;
OVENPool public usdcSeedPool;
OVENPool public wbtcPool;
OVENPool public wethPool;
OVENPool public yfvPool;
OVENPool public mbnPool;
OVENPool public usdcPool;
OVENPool public uniswapPool;
address public uniswap;
address owner;
IUniswapV2Factory public uniswapFactory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
bool public sended;
constructor() public {
}
function initSEED() public {
require(<FILL_ME>)
usdcSeedPool = new OVENPool(address(degenPizza), 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, 60 hours, now);
usdcSeedPool.setRewardDistribution(address(this));
degenPizza.transfer(address(usdcSeedPool), 1000000000000000000000000);
usdcSeedPool.notifyRewardAmount(degenPizza.balanceOf(address(usdcSeedPool)));
usdcSeedPool.setRewardDistribution(address(0));
usdcSeedPool.renounceOwnership();
}
function initWBTC() public {
}
function initWETH() public {
}
function initYFV() public {
}
function initMBN() public {
}
function initUSDC() public {
}
function initUNI() public {
}
function transferToDegenDevs() public {
}
function transferRestToForPhase2() public {
}
}
| address(usdcSeedPool)==address(0),"Already initialized" | 37,047 | address(usdcSeedPool)==address(0) |
"Already initialized" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public lpt;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
contract OVENPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public degenPizza;
uint256 public DURATION;
uint256 public starttime;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _degenPizza, address _lptoken, uint _duration, uint _starttime) public {
}
modifier checkStart() {
}
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) checkStart {
}
function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) checkStart {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
contract DegenPizzaToken is DSMath {
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
bytes32 public symbol = "DGP";
uint256 public decimals = 18;
bytes32 public name = "DegenPizza";
constructor(address chef) public {
}
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Burn(uint wad);
function approve(address guy) external returns (bool) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad) public returns (bool) {
}
function burn(uint wad) internal {
}
function retrieve(address chef) external view returns (uint256){
}
}
contract DegenPizzaFactory {
DegenPizzaToken public degenPizza;
OVENPool public usdcSeedPool;
OVENPool public wbtcPool;
OVENPool public wethPool;
OVENPool public yfvPool;
OVENPool public mbnPool;
OVENPool public usdcPool;
OVENPool public uniswapPool;
address public uniswap;
address owner;
IUniswapV2Factory public uniswapFactory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
bool public sended;
constructor() public {
}
function initSEED() public {
}
function initWBTC() public {
require(<FILL_ME>)
wbtcPool = new OVENPool(address(degenPizza), 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599, 120 days, now + 48 hours);
wbtcPool.setRewardDistribution(address(this));
degenPizza.transfer(address(wbtcPool), 600000000000000000000000);
wbtcPool.notifyRewardAmount(degenPizza.balanceOf(address(wbtcPool)));
wbtcPool.setRewardDistribution(address(0));
wbtcPool.renounceOwnership();
}
function initWETH() public {
}
function initYFV() public {
}
function initMBN() public {
}
function initUSDC() public {
}
function initUNI() public {
}
function transferToDegenDevs() public {
}
function transferRestToForPhase2() public {
}
}
| address(wbtcPool)==address(0),"Already initialized" | 37,047 | address(wbtcPool)==address(0) |
"Already initialized" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public lpt;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
contract OVENPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public degenPizza;
uint256 public DURATION;
uint256 public starttime;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _degenPizza, address _lptoken, uint _duration, uint _starttime) public {
}
modifier checkStart() {
}
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) checkStart {
}
function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) checkStart {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
contract DegenPizzaToken is DSMath {
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
bytes32 public symbol = "DGP";
uint256 public decimals = 18;
bytes32 public name = "DegenPizza";
constructor(address chef) public {
}
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Burn(uint wad);
function approve(address guy) external returns (bool) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad) public returns (bool) {
}
function burn(uint wad) internal {
}
function retrieve(address chef) external view returns (uint256){
}
}
contract DegenPizzaFactory {
DegenPizzaToken public degenPizza;
OVENPool public usdcSeedPool;
OVENPool public wbtcPool;
OVENPool public wethPool;
OVENPool public yfvPool;
OVENPool public mbnPool;
OVENPool public usdcPool;
OVENPool public uniswapPool;
address public uniswap;
address owner;
IUniswapV2Factory public uniswapFactory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
bool public sended;
constructor() public {
}
function initSEED() public {
}
function initWBTC() public {
}
function initWETH() public {
require(<FILL_ME>)
wethPool = new OVENPool(address(degenPizza), 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 120 days, now + 48 hours);
wethPool.setRewardDistribution(address(this));
degenPizza.transfer(address(wethPool), 600000000000000000000000);
wethPool.notifyRewardAmount(degenPizza.balanceOf(address(wethPool)));
wethPool.setRewardDistribution(address(0));
wethPool.renounceOwnership();
}
function initYFV() public {
}
function initMBN() public {
}
function initUSDC() public {
}
function initUNI() public {
}
function transferToDegenDevs() public {
}
function transferRestToForPhase2() public {
}
}
| address(wethPool)==address(0),"Already initialized" | 37,047 | address(wethPool)==address(0) |
"Already initialized" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public lpt;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
contract OVENPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public degenPizza;
uint256 public DURATION;
uint256 public starttime;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _degenPizza, address _lptoken, uint _duration, uint _starttime) public {
}
modifier checkStart() {
}
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) checkStart {
}
function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) checkStart {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
contract DegenPizzaToken is DSMath {
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
bytes32 public symbol = "DGP";
uint256 public decimals = 18;
bytes32 public name = "DegenPizza";
constructor(address chef) public {
}
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Burn(uint wad);
function approve(address guy) external returns (bool) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad) public returns (bool) {
}
function burn(uint wad) internal {
}
function retrieve(address chef) external view returns (uint256){
}
}
contract DegenPizzaFactory {
DegenPizzaToken public degenPizza;
OVENPool public usdcSeedPool;
OVENPool public wbtcPool;
OVENPool public wethPool;
OVENPool public yfvPool;
OVENPool public mbnPool;
OVENPool public usdcPool;
OVENPool public uniswapPool;
address public uniswap;
address owner;
IUniswapV2Factory public uniswapFactory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
bool public sended;
constructor() public {
}
function initSEED() public {
}
function initWBTC() public {
}
function initWETH() public {
}
function initYFV() public {
require(<FILL_ME>)
yfvPool = new OVENPool(address(degenPizza), 0x45f24BaEef268BB6d63AEe5129015d69702BCDfa, 120 days, now + 48 hours);
yfvPool.setRewardDistribution(address(this));
degenPizza.transfer(address(yfvPool), 800000000000000000000000);
yfvPool.notifyRewardAmount(degenPizza.balanceOf(address(yfvPool)));
yfvPool.setRewardDistribution(address(0));
yfvPool.renounceOwnership();
}
function initMBN() public {
}
function initUSDC() public {
}
function initUNI() public {
}
function transferToDegenDevs() public {
}
function transferRestToForPhase2() public {
}
}
| address(yfvPool)==address(0),"Already initialized" | 37,047 | address(yfvPool)==address(0) |
"Already initialized" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public lpt;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
contract OVENPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public degenPizza;
uint256 public DURATION;
uint256 public starttime;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _degenPizza, address _lptoken, uint _duration, uint _starttime) public {
}
modifier checkStart() {
}
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) checkStart {
}
function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) checkStart {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
contract DegenPizzaToken is DSMath {
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
bytes32 public symbol = "DGP";
uint256 public decimals = 18;
bytes32 public name = "DegenPizza";
constructor(address chef) public {
}
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Burn(uint wad);
function approve(address guy) external returns (bool) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad) public returns (bool) {
}
function burn(uint wad) internal {
}
function retrieve(address chef) external view returns (uint256){
}
}
contract DegenPizzaFactory {
DegenPizzaToken public degenPizza;
OVENPool public usdcSeedPool;
OVENPool public wbtcPool;
OVENPool public wethPool;
OVENPool public yfvPool;
OVENPool public mbnPool;
OVENPool public usdcPool;
OVENPool public uniswapPool;
address public uniswap;
address owner;
IUniswapV2Factory public uniswapFactory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
bool public sended;
constructor() public {
}
function initSEED() public {
}
function initWBTC() public {
}
function initWETH() public {
}
function initYFV() public {
}
function initMBN() public {
require(<FILL_ME>)
mbnPool = new OVENPool(address(degenPizza), 0x4Eeea7B48b9C3ac8F70a9c932A8B1E8a5CB624c7, 120 days, now + 48 hours);
mbnPool.setRewardDistribution(address(this));
degenPizza.transfer(address(mbnPool), 400000000000000000000000);
mbnPool.notifyRewardAmount(degenPizza.balanceOf(address(mbnPool)));
mbnPool.setRewardDistribution(address(0));
mbnPool.renounceOwnership();
}
function initUSDC() public {
}
function initUNI() public {
}
function transferToDegenDevs() public {
}
function transferRestToForPhase2() public {
}
}
| address(mbnPool)==address(0),"Already initialized" | 37,047 | address(mbnPool)==address(0) |
"Already initialized" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public lpt;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
contract OVENPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public degenPizza;
uint256 public DURATION;
uint256 public starttime;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _degenPizza, address _lptoken, uint _duration, uint _starttime) public {
}
modifier checkStart() {
}
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) checkStart {
}
function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) checkStart {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
contract DegenPizzaToken is DSMath {
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
bytes32 public symbol = "DGP";
uint256 public decimals = 18;
bytes32 public name = "DegenPizza";
constructor(address chef) public {
}
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Burn(uint wad);
function approve(address guy) external returns (bool) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad) public returns (bool) {
}
function burn(uint wad) internal {
}
function retrieve(address chef) external view returns (uint256){
}
}
contract DegenPizzaFactory {
DegenPizzaToken public degenPizza;
OVENPool public usdcSeedPool;
OVENPool public wbtcPool;
OVENPool public wethPool;
OVENPool public yfvPool;
OVENPool public mbnPool;
OVENPool public usdcPool;
OVENPool public uniswapPool;
address public uniswap;
address owner;
IUniswapV2Factory public uniswapFactory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
bool public sended;
constructor() public {
}
function initSEED() public {
}
function initWBTC() public {
}
function initWETH() public {
}
function initYFV() public {
}
function initMBN() public {
}
function initUSDC() public {
require(<FILL_ME>)
usdcPool = new OVENPool(address(degenPizza), 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, 120 days, now + 48 hours);
usdcPool.setRewardDistribution(address(this));
degenPizza.transfer(address(usdcPool), 400000000000000000000000);
usdcPool.notifyRewardAmount(degenPizza.balanceOf(address(usdcPool)));
usdcPool.setRewardDistribution(address(0));
usdcPool.renounceOwnership();
}
function initUNI() public {
}
function transferToDegenDevs() public {
}
function transferRestToForPhase2() public {
}
}
| address(usdcPool)==address(0),"Already initialized" | 37,047 | address(usdcPool)==address(0) |
"Already initialized" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public lpt;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
contract OVENPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public degenPizza;
uint256 public DURATION;
uint256 public starttime;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _degenPizza, address _lptoken, uint _duration, uint _starttime) public {
}
modifier checkStart() {
}
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) checkStart {
}
function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) checkStart {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
contract DegenPizzaToken is DSMath {
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
bytes32 public symbol = "DGP";
uint256 public decimals = 18;
bytes32 public name = "DegenPizza";
constructor(address chef) public {
}
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Burn(uint wad);
function approve(address guy) external returns (bool) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad) public returns (bool) {
}
function burn(uint wad) internal {
}
function retrieve(address chef) external view returns (uint256){
}
}
contract DegenPizzaFactory {
DegenPizzaToken public degenPizza;
OVENPool public usdcSeedPool;
OVENPool public wbtcPool;
OVENPool public wethPool;
OVENPool public yfvPool;
OVENPool public mbnPool;
OVENPool public usdcPool;
OVENPool public uniswapPool;
address public uniswap;
address owner;
IUniswapV2Factory public uniswapFactory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
bool public sended;
constructor() public {
}
function initSEED() public {
}
function initWBTC() public {
}
function initWETH() public {
}
function initYFV() public {
}
function initMBN() public {
}
function initUSDC() public {
}
function initUNI() public {
require(<FILL_ME>)
uniswap = uniswapFactory.createPair(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, address(degenPizza));
uniswapPool = new OVENPool(address(degenPizza), uniswap, 120 days, now + 48 hours);
uniswapPool.setRewardDistribution(address(this));
degenPizza.transfer(address(uniswapPool), 400000000000000000000000);
uniswapPool.notifyRewardAmount(degenPizza.balanceOf(address(uniswapPool)));
uniswapPool.setRewardDistribution(address(0));
uniswapPool.renounceOwnership();
}
function transferToDegenDevs() public {
}
function transferRestToForPhase2() public {
}
}
| address(uniswapPool)==address(0),"Already initialized" | 37,047 | address(uniswapPool)==address(0) |
Subsets and Splits