comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"DSP_INITIALIZED" | /**
* @title DODO StablePool
* @author DODO Breeder
*
* @notice DODOStablePool initialization
*/
contract DSP is DSPTrader, DSPFunding {
function init(
address maintainer,
address baseTokenAddress,
address quoteTokenAddress,
uint256 lpFeeRate,
address mtFeeRateModel,
uint256 i,
uint256 k,
bool isOpenTWAP
) external {
require(<FILL_ME>)
_DSP_INITIALIZED_ = true;
require(baseTokenAddress != quoteTokenAddress, "BASE_QUOTE_CAN_NOT_BE_SAME");
_BASE_TOKEN_ = IERC20(baseTokenAddress);
_QUOTE_TOKEN_ = IERC20(quoteTokenAddress);
require(i > 0 && i <= 10**36);
_I_ = i;
require(k <= 10**18);
_K_ = k;
_LP_FEE_RATE_ = lpFeeRate;
_MT_FEE_RATE_MODEL_ = IFeeRateModel(mtFeeRateModel);
_MAINTAINER_ = maintainer;
_IS_OPEN_TWAP_ = isOpenTWAP;
if (isOpenTWAP) _BLOCK_TIMESTAMP_LAST_ = uint32(block.timestamp % 2**32);
string memory connect = "_";
string memory suffix = "DLP";
name = string(abi.encodePacked(suffix, connect, addressToShortString(address(this))));
symbol = "DLP";
decimals = _BASE_TOKEN_.decimals();
// ============================== Permit ====================================
uint256 chainId;
assembly {
chainId := chainid()
}
DOMAIN_SEPARATOR = keccak256(
abi.encode(
// keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f,
keccak256(bytes(name)),
keccak256(bytes("1")),
chainId,
address(this)
)
);
// ==========================================================================
}
function addressToShortString(address _addr) public pure returns (string memory) {
}
// ============ Version Control ============
function version() external pure returns (string memory) {
}
}
| !_DSP_INITIALIZED_,"DSP_INITIALIZED" | 51,144 | !_DSP_INITIALIZED_ |
null | pragma solidity ^0.4.20;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant 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);
}
contract XOXOCoin is ERC20 {
using SafeMath for uint256;
address owner1 = msg.sender;
address owner2;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
mapping (address => uint256) times;//Ͷ�Ŵ���T
mapping (address => mapping (uint256 => uint256)) dorpnum;//��ӦT��ŵ�Ͷ����Ŀ
mapping (address => mapping (uint256 => uint256)) dorptime;//��ӦT��ŵ�Ͷ��ʱ���
mapping (address => mapping (uint256 => uint256)) freeday;//��ӦT��ŵĶ���ʱ��
mapping (address => bool) public frozenAccount;
mapping (address => bool) public airlist;
string public constant name = "XOXOCoin";
string public constant symbol = "XOX";
uint public constant decimals = 8;
uint256 _Rate = 10 ** decimals;
uint256 public totalSupply = 200000000 * _Rate;
uint256 public totalDistributed = 0;
uint256 public totalRemaining = totalSupply.sub(totalDistributed);
uint256 public value;
uint256 public _per = 1;
bool public distributionClosed = true;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event FrozenFunds(address target, bool frozen);
event Distr(address indexed to, uint256 amount);
event DistrClosed(bool Closed);
modifier onlyOwner() {
}
modifier onlyPayloadSize(uint size) {
}
function XOXOCoin (address _owner) public {
}
function nowInSeconds() returns (uint256){
}
function transferOwnership(address newOwner) onlyOwner public {
}
function closeDistribution(bool Closed) onlyOwner public returns (bool) {
}
function Set_per(uint256 per) onlyOwner public returns (bool) {
}
function distr(address _to, uint256 _amount, uint256 _freeday) private returns (bool) {
}
function distribute(address[] addresses, uint256[] amounts, uint256 _freeday) onlyOwner public {
require(addresses.length <= 255);
require(addresses.length == amounts.length);
for (uint8 i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
distr(addresses[i], amounts[i] * _Rate, _freeday);
}
}
function () external payable {
}
function getTokens() payable public {
}
//
function freeze(address[] addresses,bool locked) onlyOwner public {
}
function freezeAccount(address target, bool B) private {
}
function balanceOf(address _owner) constant public returns (uint256) {
}
//��ѯ��ַ��������
function lockOf(address _owner) constant public returns (uint256) {
}
function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) constant public returns (uint256) {
}
function withdraw() onlyOwner public {
}
}
| amounts[i]*_Rate<=totalRemaining | 51,150 | amounts[i]*_Rate<=totalRemaining |
null | pragma solidity ^0.4.20;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant 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);
}
contract XOXOCoin is ERC20 {
using SafeMath for uint256;
address owner1 = msg.sender;
address owner2;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
mapping (address => uint256) times;//Ͷ�Ŵ���T
mapping (address => mapping (uint256 => uint256)) dorpnum;//��ӦT��ŵ�Ͷ����Ŀ
mapping (address => mapping (uint256 => uint256)) dorptime;//��ӦT��ŵ�Ͷ��ʱ���
mapping (address => mapping (uint256 => uint256)) freeday;//��ӦT��ŵĶ���ʱ��
mapping (address => bool) public frozenAccount;
mapping (address => bool) public airlist;
string public constant name = "XOXOCoin";
string public constant symbol = "XOX";
uint public constant decimals = 8;
uint256 _Rate = 10 ** decimals;
uint256 public totalSupply = 200000000 * _Rate;
uint256 public totalDistributed = 0;
uint256 public totalRemaining = totalSupply.sub(totalDistributed);
uint256 public value;
uint256 public _per = 1;
bool public distributionClosed = true;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event FrozenFunds(address target, bool frozen);
event Distr(address indexed to, uint256 amount);
event DistrClosed(bool Closed);
modifier onlyOwner() {
}
modifier onlyPayloadSize(uint size) {
}
function XOXOCoin (address _owner) public {
}
function nowInSeconds() returns (uint256){
}
function transferOwnership(address newOwner) onlyOwner public {
}
function closeDistribution(bool Closed) onlyOwner public returns (bool) {
}
function Set_per(uint256 per) onlyOwner public returns (bool) {
}
function distr(address _to, uint256 _amount, uint256 _freeday) private returns (bool) {
}
function distribute(address[] addresses, uint256[] amounts, uint256 _freeday) onlyOwner public {
}
function () external payable {
}
function getTokens() payable public {
}
//
function freeze(address[] addresses,bool locked) onlyOwner public {
}
function freezeAccount(address target, bool B) private {
}
function balanceOf(address _owner) constant public returns (uint256) {
}
//��ѯ��ַ��������
function lockOf(address _owner) constant public returns (uint256) {
}
function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) {
require(_to != address(0));
require(<FILL_ME>)
require(!frozenAccount[msg.sender]);
require(!frozenAccount[_to]);
balances[msg.sender] = balances[msg.sender].sub(_amount);
balances[_to] = balances[_to].add(_amount);
Transfer(msg.sender, _to, _amount);
return true;
}
function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) constant public returns (uint256) {
}
function withdraw() onlyOwner public {
}
}
| _amount<=(balances[msg.sender]-lockOf(msg.sender)) | 51,150 | _amount<=(balances[msg.sender]-lockOf(msg.sender)) |
null | pragma solidity ^0.4.20;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant 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);
}
contract XOXOCoin is ERC20 {
using SafeMath for uint256;
address owner1 = msg.sender;
address owner2;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
mapping (address => uint256) times;//Ͷ�Ŵ���T
mapping (address => mapping (uint256 => uint256)) dorpnum;//��ӦT��ŵ�Ͷ����Ŀ
mapping (address => mapping (uint256 => uint256)) dorptime;//��ӦT��ŵ�Ͷ��ʱ���
mapping (address => mapping (uint256 => uint256)) freeday;//��ӦT��ŵĶ���ʱ��
mapping (address => bool) public frozenAccount;
mapping (address => bool) public airlist;
string public constant name = "XOXOCoin";
string public constant symbol = "XOX";
uint public constant decimals = 8;
uint256 _Rate = 10 ** decimals;
uint256 public totalSupply = 200000000 * _Rate;
uint256 public totalDistributed = 0;
uint256 public totalRemaining = totalSupply.sub(totalDistributed);
uint256 public value;
uint256 public _per = 1;
bool public distributionClosed = true;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event FrozenFunds(address target, bool frozen);
event Distr(address indexed to, uint256 amount);
event DistrClosed(bool Closed);
modifier onlyOwner() {
}
modifier onlyPayloadSize(uint size) {
}
function XOXOCoin (address _owner) public {
}
function nowInSeconds() returns (uint256){
}
function transferOwnership(address newOwner) onlyOwner public {
}
function closeDistribution(bool Closed) onlyOwner public returns (bool) {
}
function Set_per(uint256 per) onlyOwner public returns (bool) {
}
function distr(address _to, uint256 _amount, uint256 _freeday) private returns (bool) {
}
function distribute(address[] addresses, uint256[] amounts, uint256 _freeday) onlyOwner public {
}
function () external payable {
}
function getTokens() payable public {
}
//
function freeze(address[] addresses,bool locked) onlyOwner public {
}
function freezeAccount(address target, bool B) private {
}
function balanceOf(address _owner) constant public returns (uint256) {
}
//��ѯ��ַ��������
function lockOf(address _owner) constant public returns (uint256) {
}
function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) {
require(_to != address(0));
require(_amount <= balances[_from]);
require(<FILL_ME>)
balances[_from] = balances[_from].sub(_amount);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount);
balances[_to] = balances[_to].add(_amount);
Transfer(_from, _to, _amount);
return true;
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) constant public returns (uint256) {
}
function withdraw() onlyOwner public {
}
}
| _amount<=(allowed[_from][msg.sender]-lockOf(msg.sender)) | 51,150 | _amount<=(allowed[_from][msg.sender]-lockOf(msg.sender)) |
"StrategyCommon: oneToken is unknown" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.6;
import "../interface/IOneTokenFactory.sol";
import "../interface/IStrategy.sol";
import "../interface/IOneTokenV1Base.sol";
import "../_openzeppelin/token/ERC20/IERC20.sol";
import "../_openzeppelin/token/ERC20/SafeERC20.sol";
import "../common/ICHIModuleCommon.sol";
abstract contract StrategyCommon is IStrategy, ICHIModuleCommon {
using SafeERC20 for IERC20;
address public override oneToken;
bytes32 constant public override MODULE_TYPE = keccak256(abi.encodePacked("ICHI V1 Strategy Implementation"));
event StrategyDeployed(address sender, address oneTokenFactory, address oneToken_, string description);
event StrategyInitialized(address sender);
event StrategyExecuted(address indexed sender, address indexed token);
event VaultAllowance(address indexed sender, address indexed token, uint256 amount);
event FromVault(address indexed sender, address indexed token, uint256 amount);
event ToVault(address indexed sender, address indexed token, uint256 amount);
modifier onlyToken {
}
/**
@dev oneToken governance has privileges that may be delegated to a controller
*/
modifier strategyOwnerTokenOrController {
}
/**
@notice a strategy is dedicated to exactly one oneToken instance
@param oneTokenFactory_ bind this instance to oneTokenFactory instance
@param oneToken_ bind this instance to one oneToken vault
@param description_ metadata has no impact on logic
*/
constructor(address oneTokenFactory_, address oneToken_, string memory description_)
ICHIModuleCommon(oneTokenFactory_, ModuleType.Strategy, description_)
{
require(oneToken_ != NULL_ADDRESS, "StrategyCommon: oneToken cannot be NULL");
require(<FILL_ME>)
oneToken = oneToken_;
emit StrategyDeployed(msg.sender, oneTokenFactory_, oneToken_, description_);
}
/**
@notice a strategy is dedicated to exactly one oneToken instance and must be re-initializable
*/
function init() external onlyToken virtual override {
}
/**
@notice a controller invokes execute() to trigger automated logic within the strategy.
@dev called from oneToken governance or the active controller. Overriding function should emit the event.
*/
function execute() external virtual strategyOwnerTokenOrController override {
}
/**
@notice gives the oneToken control of tokens deposited in the strategy
@dev called from oneToken governance or the active controller
@param token the asset
@param amount the allowance. 0 = infinte
*/
function setAllowance(address token, uint256 amount) external strategyOwnerTokenOrController override {
}
/**
@notice closes all positions and returns the funds to the oneToken vault
@dev override this function to withdraw funds from external contracts. Return false if any funds are unrecovered.
*/
function closeAllPositions() external virtual strategyOwnerTokenOrController override returns(bool success) {
}
/**
@notice closes all positions and returns the funds to the oneToken vault
@dev override this function to withdraw funds from external contracts. Return false if any funds are unrecovered.
*/
function _closeAllPositions() internal virtual returns(bool success) {
}
/**
@notice closes token positions and returns the funds to the oneToken vault
@dev override this function to redeem and withdraw related funds from external contracts. Return false if any funds are unrecovered.
@param token asset to recover
@param success true, complete success, false, 1 or more failed operations
*/
function closePositions(address token) public strategyOwnerTokenOrController override virtual returns(bool success) {
}
/**
@notice let's the oneToken controller instance send funds to the oneToken vault
@dev implementations must close external positions and return all related assets to the vault
@param token the ecr20 token to send
@param amount the amount of tokens to send
*/
function toVault(address token, uint256 amount) external strategyOwnerTokenOrController override {
}
/**
@notice close external positions send all related funds to the oneToken vault
@param token the ecr20 token to send
@param amount the amount of tokens to send
*/
function _toVault(address token, uint256 amount) internal {
}
/**
@notice let's the oneToken controller instance draw funds from the oneToken vault allowance
@param token the ecr20 token to send
@param amount the amount of tokens to send
*/
function fromVault(address token, uint256 amount) external strategyOwnerTokenOrController override {
}
/**
@notice draw funds from the oneToken vault
@param token the ecr20 token to send
@param amount the amount of tokens to send
*/
function _fromVault(address token, uint256 amount) internal {
}
}
| IOneTokenFactory(IOneTokenV1Base(oneToken_).oneTokenFactory()).isOneToken(oneToken_),"StrategyCommon: oneToken is unknown" | 51,160 | IOneTokenFactory(IOneTokenV1Base(oneToken_).oneTokenFactory()).isOneToken(oneToken_) |
null | pragma solidity 0.4.24;
interface IMintableToken {
function mint(address _to, uint256 _amount) public returns (bool);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant 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.
*/
function Ownable() {
}
/**
* @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) onlyOwner public {
}
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract preICO is Ownable, Pausable {
event Approved(address _address, uint _tokensAmount);
event Declined(address _address, uint _tokensAmount);
event weiReceived(address _address, uint _weiAmount);
event RateChanged(uint _newRate);
uint public constant startTime = 1529431200; // June, 19. 07:00 PM (UTC)
uint public endTime = 1532973600; // July, 30. 07:00 PM (UTC)
uint public rate;
uint public tokensHardCap = 10000000 * 1 ether; // 10 million tokens
uint public tokensMintedDuringPreICO = 0;
uint public tokensToMintInHold = 0;
mapping(address=>uint) public tokensHoldMap;
IMintableToken public DXC;
function preICO(address _DXC) {
}
/**
* @dev Handles incoming eth transfers
* and mints tokens to msg.sender
*/
function () payable ongoingPreICO whenNotPaused {
}
/**
* @dev Approves token minting for specified investor
* @param _address Address of investor in `holdMap`
*/
function approve(address _address) public onlyOwner capWasNotReached(_address) {
}
/**
* @dev Declines token minting for specified investor
* @param _address Address of investor in `holdMap`
*/
function decline(address _address) public onlyOwner {
}
/**
* @dev Sets rate if it was not set earlier
* @param _rate preICO wei to tokens rate
*/
function setRate(uint _rate) public onlyOwner {
}
/**
* @dev Transfer specified amount of wei the owner
* @param _weiToWithdraw Amount of wei to transfer
*/
function withdraw(uint _weiToWithdraw) public onlyOwner {
}
/**
* @dev Increases end time by specified amount of seconds
* @param _secondsToIncrease Amount of second to increase end time
*/
function increaseDuration(uint _secondsToIncrease) public onlyOwner {
}
/**
* @dev Throws if crowdsale time is not started or finished
*/
modifier ongoingPreICO {
}
/**
* @dev Throws if preICO hard cap will be exceeded after minting
*/
modifier capWasNotReached(address _address) {
require(<FILL_ME>)
_;
}
}
| SafeMath.add(tokensMintedDuringPreICO,tokensHoldMap[_address])<=tokensHardCap | 51,168 | SafeMath.add(tokensMintedDuringPreICO,tokensHoldMap[_address])<=tokensHardCap |
"Purchase would exceed current limit max tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
contract SBREN is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string public PROVENANCE;
uint256 public constant MAX_SUPPLY=10000;
uint256 public constant MAX_BATCH_SIZE=1000;
uint256 public limit_total_supply = 9000; // 9000
uint256 public price_per_token = 0.01 ether; //0.01, 0.015, 0.03
bool public paused = true;
bool public isTotalSupplyLimitActive = true;
bool public isWhiteListActiveList1 = true;
bool public isWhiteListActiveNoLimit = false;
bool public isFreeMintActive = false;
uint256 public max_whitelist_mint_list1 =2;
mapping (address => bool) public whitelistedAddressList1;
mapping (address => uint256) public _whitelist_mint_max_list1;
mapping (address => bool) public whitelistedAddressNoLimit;
string public baseExtension = ".json";
string baseURI; // not used actually
// string private _baseURIextended;
string public notRevealedUri;
address public owner_address;
address public admin_address;
address public sysadm_address;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address ownerAddress,
address adminAddress,
address sysadmAddress
) ERC721A(_name, _symbol, MAX_BATCH_SIZE, MAX_SUPPLY) {
}
function setProvenance(string memory provenance) public {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setNotRevealedURIExternal(string memory _notRevealedURI) external {
}
function reveal() public {
}
function changeAdmin(address newAdminAddress) external {
}
function setMaxWhiteListMintList1(uint16 _max_whitelist_mint) external {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
modifier callerIsUser() {
}
function setNewCost(uint256 _newCost) public {
}
function setBaseExtension(string memory _newBaseExtension) public {
}
event WhitelistedList1(address indexed account, bool isWhitelisted);
event WhitelistedNoLimit(address indexed account, bool isWhitelisted);
event RemoveWhitelistedList1(address indexed account, bool isWhitelisted);
event RemoveWhitelistedNoLimit(address indexed account, bool isWhitelisted);
event MintedTokenId(address indexed _address, uint256 _price_per_token);
event Minted(address indexed _address, uint256 quantity);
event WhiteListMintedTokenIdList1(address indexed _address, uint256 _price_per_token);
event WhiteListMintedTokenIdNoLimit(address indexed _address, uint256 _price_per_token);
event WhiteListMintedList1(address indexed _address, uint256 quantity);
event WhiteListMintedNoLimit(address indexed _address, uint256 quantity);
event SetWhiteListMintMaxGeneralList1(uint256 WhiteListMintMax);
function pause(bool _state) public nonReentrant {
}
function mint(uint256 numberOfTokens) external payable callerIsUser {
uint256 ts = totalSupply();
require(!paused, "Contract paused");
// require( numberMinted(msg.sender) + numberOfTokens <= maxPerAddressDuringMint, "cannot mint this many");
// default is activated
if (isTotalSupplyLimitActive) {
require(<FILL_ME>)
}
require(ts + numberOfTokens <= collectionSize, "Purchase would exceed max tokens");
if(!isFreeMintActive){
require(price_per_token * numberOfTokens <= msg.value, "Ether value sent is not correct");
}
if(isFreeMintActive){
require(msg.sender == owner_address || msg.sender == admin_address,"Not Owner nor Admin");
}
if (isWhiteListActiveNoLimit){
require(!isWhiteListActiveList1, "White List 1 is not deactivated");
require(whitelistedAddressNoLimit[msg.sender], "Client is not on White list");
}
if (isWhiteListActiveList1){
require(!isWhiteListActiveNoLimit, "White List No Limit is not deactivated"); // default is deactivated
require(whitelistedAddressList1[msg.sender], "Client is not on White List 1");
require(numberOfTokens <= _whitelist_mint_max_list1[msg.sender], "Exceeded max token purchase for White List 1");
_whitelist_mint_max_list1[msg.sender] -= numberOfTokens;
}
_safeMint(msg.sender, numberOfTokens);
if (isWhiteListActiveList1 || isWhiteListActiveNoLimit) {
if (isWhiteListActiveList1){
emit WhiteListMintedTokenIdList1(msg.sender, price_per_token);
emit WhiteListMintedList1(msg.sender, numberOfTokens);
} else if (isWhiteListActiveNoLimit) {
emit WhiteListMintedTokenIdNoLimit(msg.sender, price_per_token);
emit WhiteListMintedNoLimit(msg.sender, numberOfTokens);
}
} else {
if (isFreeMintActive){
emit MintedTokenId(msg.sender, msg.value);
} else {
emit MintedTokenId(msg.sender, price_per_token);
}
emit Minted(msg.sender, numberOfTokens);
}
}
function setWhiteListActiveStatusList1(bool _status) external nonReentrant {
}
function setWhiteListActiveStatusNoLimit(bool _status) external nonReentrant {
}
function setTotalSupplyLimitActive(bool _status) external nonReentrant {
}
function setFreeMintActive(bool _status) external nonReentrant {
}
function setLimitTotalSupply(uint256 _limit_total_supply) public nonReentrant {
}
function whiteListUserArrayWithIdList1(address[] calldata _address) public {
}
function whiteListUserArrayWithIdNoLimit(address[] calldata _address) public {
}
function whiteListNumAvailableToMintList1(address addr) external view returns (uint256) {
}
function viewWhiteListStatusList1(address _address) public view returns (bool) {
}
function viewWhiteListStatusNoLimit(address _address) public view returns (bool) {
}
function removeSingleWhiteListStatusWithIdList1(address _address) public {
}
function removeSingleWhiteListStatusWithIdNoLimit(address _address) public {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
// function setBaseURI(string calldata baseURI) external onlyOwner {
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function setBaseURIExternal(string memory baseURI_) external nonReentrant {
}
function withdrawContractBalance() 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)
{
}
}
| ts+numberOfTokens<=limit_total_supply,"Purchase would exceed current limit max tokens" | 51,206 | ts+numberOfTokens<=limit_total_supply |
"Purchase would exceed max tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
contract SBREN is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string public PROVENANCE;
uint256 public constant MAX_SUPPLY=10000;
uint256 public constant MAX_BATCH_SIZE=1000;
uint256 public limit_total_supply = 9000; // 9000
uint256 public price_per_token = 0.01 ether; //0.01, 0.015, 0.03
bool public paused = true;
bool public isTotalSupplyLimitActive = true;
bool public isWhiteListActiveList1 = true;
bool public isWhiteListActiveNoLimit = false;
bool public isFreeMintActive = false;
uint256 public max_whitelist_mint_list1 =2;
mapping (address => bool) public whitelistedAddressList1;
mapping (address => uint256) public _whitelist_mint_max_list1;
mapping (address => bool) public whitelistedAddressNoLimit;
string public baseExtension = ".json";
string baseURI; // not used actually
// string private _baseURIextended;
string public notRevealedUri;
address public owner_address;
address public admin_address;
address public sysadm_address;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address ownerAddress,
address adminAddress,
address sysadmAddress
) ERC721A(_name, _symbol, MAX_BATCH_SIZE, MAX_SUPPLY) {
}
function setProvenance(string memory provenance) public {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setNotRevealedURIExternal(string memory _notRevealedURI) external {
}
function reveal() public {
}
function changeAdmin(address newAdminAddress) external {
}
function setMaxWhiteListMintList1(uint16 _max_whitelist_mint) external {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
modifier callerIsUser() {
}
function setNewCost(uint256 _newCost) public {
}
function setBaseExtension(string memory _newBaseExtension) public {
}
event WhitelistedList1(address indexed account, bool isWhitelisted);
event WhitelistedNoLimit(address indexed account, bool isWhitelisted);
event RemoveWhitelistedList1(address indexed account, bool isWhitelisted);
event RemoveWhitelistedNoLimit(address indexed account, bool isWhitelisted);
event MintedTokenId(address indexed _address, uint256 _price_per_token);
event Minted(address indexed _address, uint256 quantity);
event WhiteListMintedTokenIdList1(address indexed _address, uint256 _price_per_token);
event WhiteListMintedTokenIdNoLimit(address indexed _address, uint256 _price_per_token);
event WhiteListMintedList1(address indexed _address, uint256 quantity);
event WhiteListMintedNoLimit(address indexed _address, uint256 quantity);
event SetWhiteListMintMaxGeneralList1(uint256 WhiteListMintMax);
function pause(bool _state) public nonReentrant {
}
function mint(uint256 numberOfTokens) external payable callerIsUser {
uint256 ts = totalSupply();
require(!paused, "Contract paused");
// require( numberMinted(msg.sender) + numberOfTokens <= maxPerAddressDuringMint, "cannot mint this many");
// default is activated
if (isTotalSupplyLimitActive) {
require(ts + numberOfTokens <= limit_total_supply, "Purchase would exceed current limit max tokens");
}
require(<FILL_ME>)
if(!isFreeMintActive){
require(price_per_token * numberOfTokens <= msg.value, "Ether value sent is not correct");
}
if(isFreeMintActive){
require(msg.sender == owner_address || msg.sender == admin_address,"Not Owner nor Admin");
}
if (isWhiteListActiveNoLimit){
require(!isWhiteListActiveList1, "White List 1 is not deactivated");
require(whitelistedAddressNoLimit[msg.sender], "Client is not on White list");
}
if (isWhiteListActiveList1){
require(!isWhiteListActiveNoLimit, "White List No Limit is not deactivated"); // default is deactivated
require(whitelistedAddressList1[msg.sender], "Client is not on White List 1");
require(numberOfTokens <= _whitelist_mint_max_list1[msg.sender], "Exceeded max token purchase for White List 1");
_whitelist_mint_max_list1[msg.sender] -= numberOfTokens;
}
_safeMint(msg.sender, numberOfTokens);
if (isWhiteListActiveList1 || isWhiteListActiveNoLimit) {
if (isWhiteListActiveList1){
emit WhiteListMintedTokenIdList1(msg.sender, price_per_token);
emit WhiteListMintedList1(msg.sender, numberOfTokens);
} else if (isWhiteListActiveNoLimit) {
emit WhiteListMintedTokenIdNoLimit(msg.sender, price_per_token);
emit WhiteListMintedNoLimit(msg.sender, numberOfTokens);
}
} else {
if (isFreeMintActive){
emit MintedTokenId(msg.sender, msg.value);
} else {
emit MintedTokenId(msg.sender, price_per_token);
}
emit Minted(msg.sender, numberOfTokens);
}
}
function setWhiteListActiveStatusList1(bool _status) external nonReentrant {
}
function setWhiteListActiveStatusNoLimit(bool _status) external nonReentrant {
}
function setTotalSupplyLimitActive(bool _status) external nonReentrant {
}
function setFreeMintActive(bool _status) external nonReentrant {
}
function setLimitTotalSupply(uint256 _limit_total_supply) public nonReentrant {
}
function whiteListUserArrayWithIdList1(address[] calldata _address) public {
}
function whiteListUserArrayWithIdNoLimit(address[] calldata _address) public {
}
function whiteListNumAvailableToMintList1(address addr) external view returns (uint256) {
}
function viewWhiteListStatusList1(address _address) public view returns (bool) {
}
function viewWhiteListStatusNoLimit(address _address) public view returns (bool) {
}
function removeSingleWhiteListStatusWithIdList1(address _address) public {
}
function removeSingleWhiteListStatusWithIdNoLimit(address _address) public {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
// function setBaseURI(string calldata baseURI) external onlyOwner {
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function setBaseURIExternal(string memory baseURI_) external nonReentrant {
}
function withdrawContractBalance() 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)
{
}
}
| ts+numberOfTokens<=collectionSize,"Purchase would exceed max tokens" | 51,206 | ts+numberOfTokens<=collectionSize |
"Ether value sent is not correct" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
contract SBREN is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string public PROVENANCE;
uint256 public constant MAX_SUPPLY=10000;
uint256 public constant MAX_BATCH_SIZE=1000;
uint256 public limit_total_supply = 9000; // 9000
uint256 public price_per_token = 0.01 ether; //0.01, 0.015, 0.03
bool public paused = true;
bool public isTotalSupplyLimitActive = true;
bool public isWhiteListActiveList1 = true;
bool public isWhiteListActiveNoLimit = false;
bool public isFreeMintActive = false;
uint256 public max_whitelist_mint_list1 =2;
mapping (address => bool) public whitelistedAddressList1;
mapping (address => uint256) public _whitelist_mint_max_list1;
mapping (address => bool) public whitelistedAddressNoLimit;
string public baseExtension = ".json";
string baseURI; // not used actually
// string private _baseURIextended;
string public notRevealedUri;
address public owner_address;
address public admin_address;
address public sysadm_address;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address ownerAddress,
address adminAddress,
address sysadmAddress
) ERC721A(_name, _symbol, MAX_BATCH_SIZE, MAX_SUPPLY) {
}
function setProvenance(string memory provenance) public {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setNotRevealedURIExternal(string memory _notRevealedURI) external {
}
function reveal() public {
}
function changeAdmin(address newAdminAddress) external {
}
function setMaxWhiteListMintList1(uint16 _max_whitelist_mint) external {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
modifier callerIsUser() {
}
function setNewCost(uint256 _newCost) public {
}
function setBaseExtension(string memory _newBaseExtension) public {
}
event WhitelistedList1(address indexed account, bool isWhitelisted);
event WhitelistedNoLimit(address indexed account, bool isWhitelisted);
event RemoveWhitelistedList1(address indexed account, bool isWhitelisted);
event RemoveWhitelistedNoLimit(address indexed account, bool isWhitelisted);
event MintedTokenId(address indexed _address, uint256 _price_per_token);
event Minted(address indexed _address, uint256 quantity);
event WhiteListMintedTokenIdList1(address indexed _address, uint256 _price_per_token);
event WhiteListMintedTokenIdNoLimit(address indexed _address, uint256 _price_per_token);
event WhiteListMintedList1(address indexed _address, uint256 quantity);
event WhiteListMintedNoLimit(address indexed _address, uint256 quantity);
event SetWhiteListMintMaxGeneralList1(uint256 WhiteListMintMax);
function pause(bool _state) public nonReentrant {
}
function mint(uint256 numberOfTokens) external payable callerIsUser {
uint256 ts = totalSupply();
require(!paused, "Contract paused");
// require( numberMinted(msg.sender) + numberOfTokens <= maxPerAddressDuringMint, "cannot mint this many");
// default is activated
if (isTotalSupplyLimitActive) {
require(ts + numberOfTokens <= limit_total_supply, "Purchase would exceed current limit max tokens");
}
require(ts + numberOfTokens <= collectionSize, "Purchase would exceed max tokens");
if(!isFreeMintActive){
require(<FILL_ME>)
}
if(isFreeMintActive){
require(msg.sender == owner_address || msg.sender == admin_address,"Not Owner nor Admin");
}
if (isWhiteListActiveNoLimit){
require(!isWhiteListActiveList1, "White List 1 is not deactivated");
require(whitelistedAddressNoLimit[msg.sender], "Client is not on White list");
}
if (isWhiteListActiveList1){
require(!isWhiteListActiveNoLimit, "White List No Limit is not deactivated"); // default is deactivated
require(whitelistedAddressList1[msg.sender], "Client is not on White List 1");
require(numberOfTokens <= _whitelist_mint_max_list1[msg.sender], "Exceeded max token purchase for White List 1");
_whitelist_mint_max_list1[msg.sender] -= numberOfTokens;
}
_safeMint(msg.sender, numberOfTokens);
if (isWhiteListActiveList1 || isWhiteListActiveNoLimit) {
if (isWhiteListActiveList1){
emit WhiteListMintedTokenIdList1(msg.sender, price_per_token);
emit WhiteListMintedList1(msg.sender, numberOfTokens);
} else if (isWhiteListActiveNoLimit) {
emit WhiteListMintedTokenIdNoLimit(msg.sender, price_per_token);
emit WhiteListMintedNoLimit(msg.sender, numberOfTokens);
}
} else {
if (isFreeMintActive){
emit MintedTokenId(msg.sender, msg.value);
} else {
emit MintedTokenId(msg.sender, price_per_token);
}
emit Minted(msg.sender, numberOfTokens);
}
}
function setWhiteListActiveStatusList1(bool _status) external nonReentrant {
}
function setWhiteListActiveStatusNoLimit(bool _status) external nonReentrant {
}
function setTotalSupplyLimitActive(bool _status) external nonReentrant {
}
function setFreeMintActive(bool _status) external nonReentrant {
}
function setLimitTotalSupply(uint256 _limit_total_supply) public nonReentrant {
}
function whiteListUserArrayWithIdList1(address[] calldata _address) public {
}
function whiteListUserArrayWithIdNoLimit(address[] calldata _address) public {
}
function whiteListNumAvailableToMintList1(address addr) external view returns (uint256) {
}
function viewWhiteListStatusList1(address _address) public view returns (bool) {
}
function viewWhiteListStatusNoLimit(address _address) public view returns (bool) {
}
function removeSingleWhiteListStatusWithIdList1(address _address) public {
}
function removeSingleWhiteListStatusWithIdNoLimit(address _address) public {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
// function setBaseURI(string calldata baseURI) external onlyOwner {
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function setBaseURIExternal(string memory baseURI_) external nonReentrant {
}
function withdrawContractBalance() 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)
{
}
}
| price_per_token*numberOfTokens<=msg.value,"Ether value sent is not correct" | 51,206 | price_per_token*numberOfTokens<=msg.value |
"White List 1 is not deactivated" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
contract SBREN is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string public PROVENANCE;
uint256 public constant MAX_SUPPLY=10000;
uint256 public constant MAX_BATCH_SIZE=1000;
uint256 public limit_total_supply = 9000; // 9000
uint256 public price_per_token = 0.01 ether; //0.01, 0.015, 0.03
bool public paused = true;
bool public isTotalSupplyLimitActive = true;
bool public isWhiteListActiveList1 = true;
bool public isWhiteListActiveNoLimit = false;
bool public isFreeMintActive = false;
uint256 public max_whitelist_mint_list1 =2;
mapping (address => bool) public whitelistedAddressList1;
mapping (address => uint256) public _whitelist_mint_max_list1;
mapping (address => bool) public whitelistedAddressNoLimit;
string public baseExtension = ".json";
string baseURI; // not used actually
// string private _baseURIextended;
string public notRevealedUri;
address public owner_address;
address public admin_address;
address public sysadm_address;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address ownerAddress,
address adminAddress,
address sysadmAddress
) ERC721A(_name, _symbol, MAX_BATCH_SIZE, MAX_SUPPLY) {
}
function setProvenance(string memory provenance) public {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setNotRevealedURIExternal(string memory _notRevealedURI) external {
}
function reveal() public {
}
function changeAdmin(address newAdminAddress) external {
}
function setMaxWhiteListMintList1(uint16 _max_whitelist_mint) external {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
modifier callerIsUser() {
}
function setNewCost(uint256 _newCost) public {
}
function setBaseExtension(string memory _newBaseExtension) public {
}
event WhitelistedList1(address indexed account, bool isWhitelisted);
event WhitelistedNoLimit(address indexed account, bool isWhitelisted);
event RemoveWhitelistedList1(address indexed account, bool isWhitelisted);
event RemoveWhitelistedNoLimit(address indexed account, bool isWhitelisted);
event MintedTokenId(address indexed _address, uint256 _price_per_token);
event Minted(address indexed _address, uint256 quantity);
event WhiteListMintedTokenIdList1(address indexed _address, uint256 _price_per_token);
event WhiteListMintedTokenIdNoLimit(address indexed _address, uint256 _price_per_token);
event WhiteListMintedList1(address indexed _address, uint256 quantity);
event WhiteListMintedNoLimit(address indexed _address, uint256 quantity);
event SetWhiteListMintMaxGeneralList1(uint256 WhiteListMintMax);
function pause(bool _state) public nonReentrant {
}
function mint(uint256 numberOfTokens) external payable callerIsUser {
uint256 ts = totalSupply();
require(!paused, "Contract paused");
// require( numberMinted(msg.sender) + numberOfTokens <= maxPerAddressDuringMint, "cannot mint this many");
// default is activated
if (isTotalSupplyLimitActive) {
require(ts + numberOfTokens <= limit_total_supply, "Purchase would exceed current limit max tokens");
}
require(ts + numberOfTokens <= collectionSize, "Purchase would exceed max tokens");
if(!isFreeMintActive){
require(price_per_token * numberOfTokens <= msg.value, "Ether value sent is not correct");
}
if(isFreeMintActive){
require(msg.sender == owner_address || msg.sender == admin_address,"Not Owner nor Admin");
}
if (isWhiteListActiveNoLimit){
require(<FILL_ME>)
require(whitelistedAddressNoLimit[msg.sender], "Client is not on White list");
}
if (isWhiteListActiveList1){
require(!isWhiteListActiveNoLimit, "White List No Limit is not deactivated"); // default is deactivated
require(whitelistedAddressList1[msg.sender], "Client is not on White List 1");
require(numberOfTokens <= _whitelist_mint_max_list1[msg.sender], "Exceeded max token purchase for White List 1");
_whitelist_mint_max_list1[msg.sender] -= numberOfTokens;
}
_safeMint(msg.sender, numberOfTokens);
if (isWhiteListActiveList1 || isWhiteListActiveNoLimit) {
if (isWhiteListActiveList1){
emit WhiteListMintedTokenIdList1(msg.sender, price_per_token);
emit WhiteListMintedList1(msg.sender, numberOfTokens);
} else if (isWhiteListActiveNoLimit) {
emit WhiteListMintedTokenIdNoLimit(msg.sender, price_per_token);
emit WhiteListMintedNoLimit(msg.sender, numberOfTokens);
}
} else {
if (isFreeMintActive){
emit MintedTokenId(msg.sender, msg.value);
} else {
emit MintedTokenId(msg.sender, price_per_token);
}
emit Minted(msg.sender, numberOfTokens);
}
}
function setWhiteListActiveStatusList1(bool _status) external nonReentrant {
}
function setWhiteListActiveStatusNoLimit(bool _status) external nonReentrant {
}
function setTotalSupplyLimitActive(bool _status) external nonReentrant {
}
function setFreeMintActive(bool _status) external nonReentrant {
}
function setLimitTotalSupply(uint256 _limit_total_supply) public nonReentrant {
}
function whiteListUserArrayWithIdList1(address[] calldata _address) public {
}
function whiteListUserArrayWithIdNoLimit(address[] calldata _address) public {
}
function whiteListNumAvailableToMintList1(address addr) external view returns (uint256) {
}
function viewWhiteListStatusList1(address _address) public view returns (bool) {
}
function viewWhiteListStatusNoLimit(address _address) public view returns (bool) {
}
function removeSingleWhiteListStatusWithIdList1(address _address) public {
}
function removeSingleWhiteListStatusWithIdNoLimit(address _address) public {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
// function setBaseURI(string calldata baseURI) external onlyOwner {
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function setBaseURIExternal(string memory baseURI_) external nonReentrant {
}
function withdrawContractBalance() 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)
{
}
}
| !isWhiteListActiveList1,"White List 1 is not deactivated" | 51,206 | !isWhiteListActiveList1 |
"Client is not on White list" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
contract SBREN is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string public PROVENANCE;
uint256 public constant MAX_SUPPLY=10000;
uint256 public constant MAX_BATCH_SIZE=1000;
uint256 public limit_total_supply = 9000; // 9000
uint256 public price_per_token = 0.01 ether; //0.01, 0.015, 0.03
bool public paused = true;
bool public isTotalSupplyLimitActive = true;
bool public isWhiteListActiveList1 = true;
bool public isWhiteListActiveNoLimit = false;
bool public isFreeMintActive = false;
uint256 public max_whitelist_mint_list1 =2;
mapping (address => bool) public whitelistedAddressList1;
mapping (address => uint256) public _whitelist_mint_max_list1;
mapping (address => bool) public whitelistedAddressNoLimit;
string public baseExtension = ".json";
string baseURI; // not used actually
// string private _baseURIextended;
string public notRevealedUri;
address public owner_address;
address public admin_address;
address public sysadm_address;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address ownerAddress,
address adminAddress,
address sysadmAddress
) ERC721A(_name, _symbol, MAX_BATCH_SIZE, MAX_SUPPLY) {
}
function setProvenance(string memory provenance) public {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setNotRevealedURIExternal(string memory _notRevealedURI) external {
}
function reveal() public {
}
function changeAdmin(address newAdminAddress) external {
}
function setMaxWhiteListMintList1(uint16 _max_whitelist_mint) external {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
modifier callerIsUser() {
}
function setNewCost(uint256 _newCost) public {
}
function setBaseExtension(string memory _newBaseExtension) public {
}
event WhitelistedList1(address indexed account, bool isWhitelisted);
event WhitelistedNoLimit(address indexed account, bool isWhitelisted);
event RemoveWhitelistedList1(address indexed account, bool isWhitelisted);
event RemoveWhitelistedNoLimit(address indexed account, bool isWhitelisted);
event MintedTokenId(address indexed _address, uint256 _price_per_token);
event Minted(address indexed _address, uint256 quantity);
event WhiteListMintedTokenIdList1(address indexed _address, uint256 _price_per_token);
event WhiteListMintedTokenIdNoLimit(address indexed _address, uint256 _price_per_token);
event WhiteListMintedList1(address indexed _address, uint256 quantity);
event WhiteListMintedNoLimit(address indexed _address, uint256 quantity);
event SetWhiteListMintMaxGeneralList1(uint256 WhiteListMintMax);
function pause(bool _state) public nonReentrant {
}
function mint(uint256 numberOfTokens) external payable callerIsUser {
uint256 ts = totalSupply();
require(!paused, "Contract paused");
// require( numberMinted(msg.sender) + numberOfTokens <= maxPerAddressDuringMint, "cannot mint this many");
// default is activated
if (isTotalSupplyLimitActive) {
require(ts + numberOfTokens <= limit_total_supply, "Purchase would exceed current limit max tokens");
}
require(ts + numberOfTokens <= collectionSize, "Purchase would exceed max tokens");
if(!isFreeMintActive){
require(price_per_token * numberOfTokens <= msg.value, "Ether value sent is not correct");
}
if(isFreeMintActive){
require(msg.sender == owner_address || msg.sender == admin_address,"Not Owner nor Admin");
}
if (isWhiteListActiveNoLimit){
require(!isWhiteListActiveList1, "White List 1 is not deactivated");
require(<FILL_ME>)
}
if (isWhiteListActiveList1){
require(!isWhiteListActiveNoLimit, "White List No Limit is not deactivated"); // default is deactivated
require(whitelistedAddressList1[msg.sender], "Client is not on White List 1");
require(numberOfTokens <= _whitelist_mint_max_list1[msg.sender], "Exceeded max token purchase for White List 1");
_whitelist_mint_max_list1[msg.sender] -= numberOfTokens;
}
_safeMint(msg.sender, numberOfTokens);
if (isWhiteListActiveList1 || isWhiteListActiveNoLimit) {
if (isWhiteListActiveList1){
emit WhiteListMintedTokenIdList1(msg.sender, price_per_token);
emit WhiteListMintedList1(msg.sender, numberOfTokens);
} else if (isWhiteListActiveNoLimit) {
emit WhiteListMintedTokenIdNoLimit(msg.sender, price_per_token);
emit WhiteListMintedNoLimit(msg.sender, numberOfTokens);
}
} else {
if (isFreeMintActive){
emit MintedTokenId(msg.sender, msg.value);
} else {
emit MintedTokenId(msg.sender, price_per_token);
}
emit Minted(msg.sender, numberOfTokens);
}
}
function setWhiteListActiveStatusList1(bool _status) external nonReentrant {
}
function setWhiteListActiveStatusNoLimit(bool _status) external nonReentrant {
}
function setTotalSupplyLimitActive(bool _status) external nonReentrant {
}
function setFreeMintActive(bool _status) external nonReentrant {
}
function setLimitTotalSupply(uint256 _limit_total_supply) public nonReentrant {
}
function whiteListUserArrayWithIdList1(address[] calldata _address) public {
}
function whiteListUserArrayWithIdNoLimit(address[] calldata _address) public {
}
function whiteListNumAvailableToMintList1(address addr) external view returns (uint256) {
}
function viewWhiteListStatusList1(address _address) public view returns (bool) {
}
function viewWhiteListStatusNoLimit(address _address) public view returns (bool) {
}
function removeSingleWhiteListStatusWithIdList1(address _address) public {
}
function removeSingleWhiteListStatusWithIdNoLimit(address _address) public {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
// function setBaseURI(string calldata baseURI) external onlyOwner {
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function setBaseURIExternal(string memory baseURI_) external nonReentrant {
}
function withdrawContractBalance() 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)
{
}
}
| whitelistedAddressNoLimit[msg.sender],"Client is not on White list" | 51,206 | whitelistedAddressNoLimit[msg.sender] |
"White List No Limit is not deactivated" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
contract SBREN is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string public PROVENANCE;
uint256 public constant MAX_SUPPLY=10000;
uint256 public constant MAX_BATCH_SIZE=1000;
uint256 public limit_total_supply = 9000; // 9000
uint256 public price_per_token = 0.01 ether; //0.01, 0.015, 0.03
bool public paused = true;
bool public isTotalSupplyLimitActive = true;
bool public isWhiteListActiveList1 = true;
bool public isWhiteListActiveNoLimit = false;
bool public isFreeMintActive = false;
uint256 public max_whitelist_mint_list1 =2;
mapping (address => bool) public whitelistedAddressList1;
mapping (address => uint256) public _whitelist_mint_max_list1;
mapping (address => bool) public whitelistedAddressNoLimit;
string public baseExtension = ".json";
string baseURI; // not used actually
// string private _baseURIextended;
string public notRevealedUri;
address public owner_address;
address public admin_address;
address public sysadm_address;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address ownerAddress,
address adminAddress,
address sysadmAddress
) ERC721A(_name, _symbol, MAX_BATCH_SIZE, MAX_SUPPLY) {
}
function setProvenance(string memory provenance) public {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setNotRevealedURIExternal(string memory _notRevealedURI) external {
}
function reveal() public {
}
function changeAdmin(address newAdminAddress) external {
}
function setMaxWhiteListMintList1(uint16 _max_whitelist_mint) external {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
modifier callerIsUser() {
}
function setNewCost(uint256 _newCost) public {
}
function setBaseExtension(string memory _newBaseExtension) public {
}
event WhitelistedList1(address indexed account, bool isWhitelisted);
event WhitelistedNoLimit(address indexed account, bool isWhitelisted);
event RemoveWhitelistedList1(address indexed account, bool isWhitelisted);
event RemoveWhitelistedNoLimit(address indexed account, bool isWhitelisted);
event MintedTokenId(address indexed _address, uint256 _price_per_token);
event Minted(address indexed _address, uint256 quantity);
event WhiteListMintedTokenIdList1(address indexed _address, uint256 _price_per_token);
event WhiteListMintedTokenIdNoLimit(address indexed _address, uint256 _price_per_token);
event WhiteListMintedList1(address indexed _address, uint256 quantity);
event WhiteListMintedNoLimit(address indexed _address, uint256 quantity);
event SetWhiteListMintMaxGeneralList1(uint256 WhiteListMintMax);
function pause(bool _state) public nonReentrant {
}
function mint(uint256 numberOfTokens) external payable callerIsUser {
uint256 ts = totalSupply();
require(!paused, "Contract paused");
// require( numberMinted(msg.sender) + numberOfTokens <= maxPerAddressDuringMint, "cannot mint this many");
// default is activated
if (isTotalSupplyLimitActive) {
require(ts + numberOfTokens <= limit_total_supply, "Purchase would exceed current limit max tokens");
}
require(ts + numberOfTokens <= collectionSize, "Purchase would exceed max tokens");
if(!isFreeMintActive){
require(price_per_token * numberOfTokens <= msg.value, "Ether value sent is not correct");
}
if(isFreeMintActive){
require(msg.sender == owner_address || msg.sender == admin_address,"Not Owner nor Admin");
}
if (isWhiteListActiveNoLimit){
require(!isWhiteListActiveList1, "White List 1 is not deactivated");
require(whitelistedAddressNoLimit[msg.sender], "Client is not on White list");
}
if (isWhiteListActiveList1){
require(<FILL_ME>) // default is deactivated
require(whitelistedAddressList1[msg.sender], "Client is not on White List 1");
require(numberOfTokens <= _whitelist_mint_max_list1[msg.sender], "Exceeded max token purchase for White List 1");
_whitelist_mint_max_list1[msg.sender] -= numberOfTokens;
}
_safeMint(msg.sender, numberOfTokens);
if (isWhiteListActiveList1 || isWhiteListActiveNoLimit) {
if (isWhiteListActiveList1){
emit WhiteListMintedTokenIdList1(msg.sender, price_per_token);
emit WhiteListMintedList1(msg.sender, numberOfTokens);
} else if (isWhiteListActiveNoLimit) {
emit WhiteListMintedTokenIdNoLimit(msg.sender, price_per_token);
emit WhiteListMintedNoLimit(msg.sender, numberOfTokens);
}
} else {
if (isFreeMintActive){
emit MintedTokenId(msg.sender, msg.value);
} else {
emit MintedTokenId(msg.sender, price_per_token);
}
emit Minted(msg.sender, numberOfTokens);
}
}
function setWhiteListActiveStatusList1(bool _status) external nonReentrant {
}
function setWhiteListActiveStatusNoLimit(bool _status) external nonReentrant {
}
function setTotalSupplyLimitActive(bool _status) external nonReentrant {
}
function setFreeMintActive(bool _status) external nonReentrant {
}
function setLimitTotalSupply(uint256 _limit_total_supply) public nonReentrant {
}
function whiteListUserArrayWithIdList1(address[] calldata _address) public {
}
function whiteListUserArrayWithIdNoLimit(address[] calldata _address) public {
}
function whiteListNumAvailableToMintList1(address addr) external view returns (uint256) {
}
function viewWhiteListStatusList1(address _address) public view returns (bool) {
}
function viewWhiteListStatusNoLimit(address _address) public view returns (bool) {
}
function removeSingleWhiteListStatusWithIdList1(address _address) public {
}
function removeSingleWhiteListStatusWithIdNoLimit(address _address) public {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
// function setBaseURI(string calldata baseURI) external onlyOwner {
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function setBaseURIExternal(string memory baseURI_) external nonReentrant {
}
function withdrawContractBalance() 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)
{
}
}
| !isWhiteListActiveNoLimit,"White List No Limit is not deactivated" | 51,206 | !isWhiteListActiveNoLimit |
"Client is not on White List 1" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
contract SBREN is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string public PROVENANCE;
uint256 public constant MAX_SUPPLY=10000;
uint256 public constant MAX_BATCH_SIZE=1000;
uint256 public limit_total_supply = 9000; // 9000
uint256 public price_per_token = 0.01 ether; //0.01, 0.015, 0.03
bool public paused = true;
bool public isTotalSupplyLimitActive = true;
bool public isWhiteListActiveList1 = true;
bool public isWhiteListActiveNoLimit = false;
bool public isFreeMintActive = false;
uint256 public max_whitelist_mint_list1 =2;
mapping (address => bool) public whitelistedAddressList1;
mapping (address => uint256) public _whitelist_mint_max_list1;
mapping (address => bool) public whitelistedAddressNoLimit;
string public baseExtension = ".json";
string baseURI; // not used actually
// string private _baseURIextended;
string public notRevealedUri;
address public owner_address;
address public admin_address;
address public sysadm_address;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address ownerAddress,
address adminAddress,
address sysadmAddress
) ERC721A(_name, _symbol, MAX_BATCH_SIZE, MAX_SUPPLY) {
}
function setProvenance(string memory provenance) public {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setNotRevealedURIExternal(string memory _notRevealedURI) external {
}
function reveal() public {
}
function changeAdmin(address newAdminAddress) external {
}
function setMaxWhiteListMintList1(uint16 _max_whitelist_mint) external {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
modifier callerIsUser() {
}
function setNewCost(uint256 _newCost) public {
}
function setBaseExtension(string memory _newBaseExtension) public {
}
event WhitelistedList1(address indexed account, bool isWhitelisted);
event WhitelistedNoLimit(address indexed account, bool isWhitelisted);
event RemoveWhitelistedList1(address indexed account, bool isWhitelisted);
event RemoveWhitelistedNoLimit(address indexed account, bool isWhitelisted);
event MintedTokenId(address indexed _address, uint256 _price_per_token);
event Minted(address indexed _address, uint256 quantity);
event WhiteListMintedTokenIdList1(address indexed _address, uint256 _price_per_token);
event WhiteListMintedTokenIdNoLimit(address indexed _address, uint256 _price_per_token);
event WhiteListMintedList1(address indexed _address, uint256 quantity);
event WhiteListMintedNoLimit(address indexed _address, uint256 quantity);
event SetWhiteListMintMaxGeneralList1(uint256 WhiteListMintMax);
function pause(bool _state) public nonReentrant {
}
function mint(uint256 numberOfTokens) external payable callerIsUser {
uint256 ts = totalSupply();
require(!paused, "Contract paused");
// require( numberMinted(msg.sender) + numberOfTokens <= maxPerAddressDuringMint, "cannot mint this many");
// default is activated
if (isTotalSupplyLimitActive) {
require(ts + numberOfTokens <= limit_total_supply, "Purchase would exceed current limit max tokens");
}
require(ts + numberOfTokens <= collectionSize, "Purchase would exceed max tokens");
if(!isFreeMintActive){
require(price_per_token * numberOfTokens <= msg.value, "Ether value sent is not correct");
}
if(isFreeMintActive){
require(msg.sender == owner_address || msg.sender == admin_address,"Not Owner nor Admin");
}
if (isWhiteListActiveNoLimit){
require(!isWhiteListActiveList1, "White List 1 is not deactivated");
require(whitelistedAddressNoLimit[msg.sender], "Client is not on White list");
}
if (isWhiteListActiveList1){
require(!isWhiteListActiveNoLimit, "White List No Limit is not deactivated"); // default is deactivated
require(<FILL_ME>)
require(numberOfTokens <= _whitelist_mint_max_list1[msg.sender], "Exceeded max token purchase for White List 1");
_whitelist_mint_max_list1[msg.sender] -= numberOfTokens;
}
_safeMint(msg.sender, numberOfTokens);
if (isWhiteListActiveList1 || isWhiteListActiveNoLimit) {
if (isWhiteListActiveList1){
emit WhiteListMintedTokenIdList1(msg.sender, price_per_token);
emit WhiteListMintedList1(msg.sender, numberOfTokens);
} else if (isWhiteListActiveNoLimit) {
emit WhiteListMintedTokenIdNoLimit(msg.sender, price_per_token);
emit WhiteListMintedNoLimit(msg.sender, numberOfTokens);
}
} else {
if (isFreeMintActive){
emit MintedTokenId(msg.sender, msg.value);
} else {
emit MintedTokenId(msg.sender, price_per_token);
}
emit Minted(msg.sender, numberOfTokens);
}
}
function setWhiteListActiveStatusList1(bool _status) external nonReentrant {
}
function setWhiteListActiveStatusNoLimit(bool _status) external nonReentrant {
}
function setTotalSupplyLimitActive(bool _status) external nonReentrant {
}
function setFreeMintActive(bool _status) external nonReentrant {
}
function setLimitTotalSupply(uint256 _limit_total_supply) public nonReentrant {
}
function whiteListUserArrayWithIdList1(address[] calldata _address) public {
}
function whiteListUserArrayWithIdNoLimit(address[] calldata _address) public {
}
function whiteListNumAvailableToMintList1(address addr) external view returns (uint256) {
}
function viewWhiteListStatusList1(address _address) public view returns (bool) {
}
function viewWhiteListStatusNoLimit(address _address) public view returns (bool) {
}
function removeSingleWhiteListStatusWithIdList1(address _address) public {
}
function removeSingleWhiteListStatusWithIdNoLimit(address _address) public {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
// function setBaseURI(string calldata baseURI) external onlyOwner {
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function setBaseURIExternal(string memory baseURI_) external nonReentrant {
}
function withdrawContractBalance() 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)
{
}
}
| whitelistedAddressList1[msg.sender],"Client is not on White List 1" | 51,206 | whitelistedAddressList1[msg.sender] |
"Tokens cannot be transferred from user account" | pragma solidity ^0.6.0;
// SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------
//
// EMAX Staking Contract.
//
// Stake EMAX, Earn ETH!
//
//----------------------------------------------------------------------------
// SafeMath library
// ----------------------------------------------------------------------------
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable public owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function allowance(address tokenOwner, address spender) external view returns (uint256 remaining);
function transfer(address to, uint256 tokens) external returns (bool success);
function approve(address spender, uint256 tokens) external returns (bool success);
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function burnTokens(uint256 _amount) external;
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
// ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ----------------------------------------------------------------------------
contract Stake is Owned {
using SafeMath for uint256;
address public EMax;
uint256 public totalStakes = 0;
uint256 public totalEthEarned = 0;
uint256 public totalDividends = 0;
uint256 private scaledRemainder = 0;
uint256 private scaling = uint256(10) ** 12;
uint public round = 1;
struct USER{
uint256 stakedTokens;
uint256 lastDividends;
uint256 fromTotalDividend;
uint round;
uint256 remainder;
}
mapping(address => USER) stakers;
mapping (uint => uint256) public payouts; // keeps record of each payout
event STAKED(address staker, uint256 tokens);
event UNSTAKED(address staker, uint256 tokens);
event PAYOUT(uint256 round, uint256 tokens, address sender);
event CLAIMEDREWARD(address staker, uint256 reward);
constructor(address _tokenAddress) public {
}
// ------------------------------------------------------------------------
// Token holders can stake their tokens using this function
// @param tokens number of tokens to stake
// ------------------------------------------------------------------------
function STAKE(uint256 tokens) external {
require(<FILL_ME>)
// add pending rewards to remainder to be claimed by user later, if there is any existing stake
uint256 owing = pendingReward(msg.sender);
stakers[msg.sender].remainder = stakers[msg.sender].remainder.add(owing);
stakers[msg.sender].stakedTokens = tokens.add(stakers[msg.sender].stakedTokens);
stakers[msg.sender].lastDividends = 0;
stakers[msg.sender].fromTotalDividend= totalDividends;
stakers[msg.sender].round = round;
stakers[msg.sender].remainder = 0;
totalStakes = totalStakes.add(tokens);
emit STAKED(msg.sender, tokens);
}
// ------------------------------------------------------------------------
// The profit to be distributed will get into the contract through this
// function
// ------------------------------------------------------------------------
receive() external payable{
}
// ------------------------------------------------------------------------
// Private function to register payouts
// ------------------------------------------------------------------------
function _addPayout(uint256 amount) private{
}
// ------------------------------------------------------------------------
// Stakers can claim their pending rewards using this function
// ------------------------------------------------------------------------
function CLAIMREWARD() public {
}
// ------------------------------------------------------------------------
// Get the pending rewards of the staker
// @param _staker the address of the staker
// ------------------------------------------------------------------------
function pendingReward(address staker) private returns (uint256) {
}
function getPendingReward(address staker) public view returns(uint256 _pendingReward) {
}
// ------------------------------------------------------------------------
// Stakers can un stake the staked tokens using this function
// @param tokens the number of tokens to withdraw
// ------------------------------------------------------------------------
function WITHDRAW(uint256 tokens) external {
}
// ------------------------------------------------------------------------
// Get the number of tokens staked by a staker
// @param _staker the address of the staker
// ------------------------------------------------------------------------
function yourStakedEMax(address staker) external view returns(uint256 stakedSWFL){
}
// ------------------------------------------------------------------------
// Get the SWFL balance of the token holder
// @param user the address of the token holder
// ------------------------------------------------------------------------
function yourEMaxBalance(address user) external view returns(uint256 SWFLBalance){
}
// ------------------------------------------------------------------------
// Private function to calculate 1% percentage
// ------------------------------------------------------------------------
function onePercent(uint256 _tokens) private pure returns (uint256){
}
}
| IERC20(EMax).transferFrom(msg.sender,address(this),tokens),"Tokens cannot be transferred from user account" | 51,208 | IERC20(EMax).transferFrom(msg.sender,address(this),tokens) |
"Invalid token amount to withdraw" | pragma solidity ^0.6.0;
// SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------
//
// EMAX Staking Contract.
//
// Stake EMAX, Earn ETH!
//
//----------------------------------------------------------------------------
// SafeMath library
// ----------------------------------------------------------------------------
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable public owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function allowance(address tokenOwner, address spender) external view returns (uint256 remaining);
function transfer(address to, uint256 tokens) external returns (bool success);
function approve(address spender, uint256 tokens) external returns (bool success);
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function burnTokens(uint256 _amount) external;
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
// ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ----------------------------------------------------------------------------
contract Stake is Owned {
using SafeMath for uint256;
address public EMax;
uint256 public totalStakes = 0;
uint256 public totalEthEarned = 0;
uint256 public totalDividends = 0;
uint256 private scaledRemainder = 0;
uint256 private scaling = uint256(10) ** 12;
uint public round = 1;
struct USER{
uint256 stakedTokens;
uint256 lastDividends;
uint256 fromTotalDividend;
uint round;
uint256 remainder;
}
mapping(address => USER) stakers;
mapping (uint => uint256) public payouts; // keeps record of each payout
event STAKED(address staker, uint256 tokens);
event UNSTAKED(address staker, uint256 tokens);
event PAYOUT(uint256 round, uint256 tokens, address sender);
event CLAIMEDREWARD(address staker, uint256 reward);
constructor(address _tokenAddress) public {
}
// ------------------------------------------------------------------------
// Token holders can stake their tokens using this function
// @param tokens number of tokens to stake
// ------------------------------------------------------------------------
function STAKE(uint256 tokens) external {
}
// ------------------------------------------------------------------------
// The profit to be distributed will get into the contract through this
// function
// ------------------------------------------------------------------------
receive() external payable{
}
// ------------------------------------------------------------------------
// Private function to register payouts
// ------------------------------------------------------------------------
function _addPayout(uint256 amount) private{
}
// ------------------------------------------------------------------------
// Stakers can claim their pending rewards using this function
// ------------------------------------------------------------------------
function CLAIMREWARD() public {
}
// ------------------------------------------------------------------------
// Get the pending rewards of the staker
// @param _staker the address of the staker
// ------------------------------------------------------------------------
function pendingReward(address staker) private returns (uint256) {
}
function getPendingReward(address staker) public view returns(uint256 _pendingReward) {
}
// ------------------------------------------------------------------------
// Stakers can un stake the staked tokens using this function
// @param tokens the number of tokens to withdraw
// ------------------------------------------------------------------------
function WITHDRAW(uint256 tokens) external {
require(<FILL_ME>)
// add pending rewards to remainder to be claimed by user later, if there is any existing stake
uint256 owing = pendingReward(msg.sender);
stakers[msg.sender].remainder = stakers[msg.sender].remainder.add(owing);
require(IERC20(EMax).transfer(msg.sender, tokens), "Error in un-staking tokens");
stakers[msg.sender].stakedTokens = stakers[msg.sender].stakedTokens.sub(tokens);
stakers[msg.sender].lastDividends = 0;
stakers[msg.sender].fromTotalDividend= totalDividends;
stakers[msg.sender].round = round;
totalStakes = totalStakes.sub(tokens);
emit UNSTAKED(msg.sender, tokens);
}
// ------------------------------------------------------------------------
// Get the number of tokens staked by a staker
// @param _staker the address of the staker
// ------------------------------------------------------------------------
function yourStakedEMax(address staker) external view returns(uint256 stakedSWFL){
}
// ------------------------------------------------------------------------
// Get the SWFL balance of the token holder
// @param user the address of the token holder
// ------------------------------------------------------------------------
function yourEMaxBalance(address user) external view returns(uint256 SWFLBalance){
}
// ------------------------------------------------------------------------
// Private function to calculate 1% percentage
// ------------------------------------------------------------------------
function onePercent(uint256 _tokens) private pure returns (uint256){
}
}
| stakers[msg.sender].stakedTokens>=tokens&&tokens>0,"Invalid token amount to withdraw" | 51,208 | stakers[msg.sender].stakedTokens>=tokens&&tokens>0 |
"Error in un-staking tokens" | pragma solidity ^0.6.0;
// SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------
//
// EMAX Staking Contract.
//
// Stake EMAX, Earn ETH!
//
//----------------------------------------------------------------------------
// SafeMath library
// ----------------------------------------------------------------------------
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable public owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function allowance(address tokenOwner, address spender) external view returns (uint256 remaining);
function transfer(address to, uint256 tokens) external returns (bool success);
function approve(address spender, uint256 tokens) external returns (bool success);
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function burnTokens(uint256 _amount) external;
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
// ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ----------------------------------------------------------------------------
contract Stake is Owned {
using SafeMath for uint256;
address public EMax;
uint256 public totalStakes = 0;
uint256 public totalEthEarned = 0;
uint256 public totalDividends = 0;
uint256 private scaledRemainder = 0;
uint256 private scaling = uint256(10) ** 12;
uint public round = 1;
struct USER{
uint256 stakedTokens;
uint256 lastDividends;
uint256 fromTotalDividend;
uint round;
uint256 remainder;
}
mapping(address => USER) stakers;
mapping (uint => uint256) public payouts; // keeps record of each payout
event STAKED(address staker, uint256 tokens);
event UNSTAKED(address staker, uint256 tokens);
event PAYOUT(uint256 round, uint256 tokens, address sender);
event CLAIMEDREWARD(address staker, uint256 reward);
constructor(address _tokenAddress) public {
}
// ------------------------------------------------------------------------
// Token holders can stake their tokens using this function
// @param tokens number of tokens to stake
// ------------------------------------------------------------------------
function STAKE(uint256 tokens) external {
}
// ------------------------------------------------------------------------
// The profit to be distributed will get into the contract through this
// function
// ------------------------------------------------------------------------
receive() external payable{
}
// ------------------------------------------------------------------------
// Private function to register payouts
// ------------------------------------------------------------------------
function _addPayout(uint256 amount) private{
}
// ------------------------------------------------------------------------
// Stakers can claim their pending rewards using this function
// ------------------------------------------------------------------------
function CLAIMREWARD() public {
}
// ------------------------------------------------------------------------
// Get the pending rewards of the staker
// @param _staker the address of the staker
// ------------------------------------------------------------------------
function pendingReward(address staker) private returns (uint256) {
}
function getPendingReward(address staker) public view returns(uint256 _pendingReward) {
}
// ------------------------------------------------------------------------
// Stakers can un stake the staked tokens using this function
// @param tokens the number of tokens to withdraw
// ------------------------------------------------------------------------
function WITHDRAW(uint256 tokens) external {
require(stakers[msg.sender].stakedTokens >= tokens && tokens > 0, "Invalid token amount to withdraw");
// add pending rewards to remainder to be claimed by user later, if there is any existing stake
uint256 owing = pendingReward(msg.sender);
stakers[msg.sender].remainder = stakers[msg.sender].remainder.add(owing);
require(<FILL_ME>)
stakers[msg.sender].stakedTokens = stakers[msg.sender].stakedTokens.sub(tokens);
stakers[msg.sender].lastDividends = 0;
stakers[msg.sender].fromTotalDividend= totalDividends;
stakers[msg.sender].round = round;
totalStakes = totalStakes.sub(tokens);
emit UNSTAKED(msg.sender, tokens);
}
// ------------------------------------------------------------------------
// Get the number of tokens staked by a staker
// @param _staker the address of the staker
// ------------------------------------------------------------------------
function yourStakedEMax(address staker) external view returns(uint256 stakedSWFL){
}
// ------------------------------------------------------------------------
// Get the SWFL balance of the token holder
// @param user the address of the token holder
// ------------------------------------------------------------------------
function yourEMaxBalance(address user) external view returns(uint256 SWFLBalance){
}
// ------------------------------------------------------------------------
// Private function to calculate 1% percentage
// ------------------------------------------------------------------------
function onePercent(uint256 _tokens) private pure returns (uint256){
}
}
| IERC20(EMax).transfer(msg.sender,tokens),"Error in un-staking tokens" | 51,208 | IERC20(EMax).transfer(msg.sender,tokens) |
"You are not a Stronghand" | pragma solidity ^0.4.25;
interface HourglassInterface {
function buy(address _playerAddress) payable external returns(uint256);
function sell(uint256 _amountOfTokens) external;
function reinvest() external;
function withdraw() external;
function transfer(address _toAddress, uint256 _amountOfTokens) external returns(bool);
function balanceOf(address _customerAddress) view external returns(uint256);
function myDividends(bool _includeReferralBonus) external view returns(uint256);
}
contract StrongHandsManager {
event CreatedStrongHand(address indexed owner, address indexed strongHand);
mapping (address => address) public strongHands;
function isStrongHand()
public
view
returns (bool)
{
}
function myStrongHand()
external
view
returns (address)
{
require(<FILL_ME>)
return strongHands[msg.sender];
}
function create(uint256 _unlockAfterNDays)
public
{
}
}
contract StrongHand {
HourglassInterface constant p3dContract = HourglassInterface(0x1EB2acB92624DA2e601EEb77e2508b32E49012ef);
address public owner;
uint256 public creationDate;
uint256 public unlockAfterNDays;
modifier timeLocked()
{
}
modifier onlyOwner()
{
}
constructor(address _owner, uint256 _unlockAfterNDays)
public
{
}
function() public payable {}
function isLocked()
public
view
returns(bool)
{
}
function lockedUntil()
external
view
returns(uint256)
{
}
function extendLock(uint256 _howManyDays)
external
onlyOwner
{
}
//safety functions
function withdraw()
external
onlyOwner
{
}
function buyWithBalance()
external
onlyOwner
{
}
//P3D functions
function balanceOf()
external
view
returns(uint256)
{
}
function dividendsOf()
external
view
returns(uint256)
{
}
function buy()
external
payable
onlyOwner
{
}
function reinvest()
external
onlyOwner
{
}
function withdrawDividends()
external
onlyOwner
{
}
function sell(uint256 _amount)
external
timeLocked
onlyOwner
{
}
function transfer(address _toAddress, uint256 _amountOfTokens)
external
timeLocked
onlyOwner
returns(bool)
{
}
}
| isStrongHand(),"You are not a Stronghand" | 51,270 | isStrongHand() |
"You already became a Stronghand" | pragma solidity ^0.4.25;
interface HourglassInterface {
function buy(address _playerAddress) payable external returns(uint256);
function sell(uint256 _amountOfTokens) external;
function reinvest() external;
function withdraw() external;
function transfer(address _toAddress, uint256 _amountOfTokens) external returns(bool);
function balanceOf(address _customerAddress) view external returns(uint256);
function myDividends(bool _includeReferralBonus) external view returns(uint256);
}
contract StrongHandsManager {
event CreatedStrongHand(address indexed owner, address indexed strongHand);
mapping (address => address) public strongHands;
function isStrongHand()
public
view
returns (bool)
{
}
function myStrongHand()
external
view
returns (address)
{
}
function create(uint256 _unlockAfterNDays)
public
{
require(<FILL_ME>)
require(_unlockAfterNDays > 0);
address owner = msg.sender;
strongHands[owner] = new StrongHand(owner, _unlockAfterNDays);
emit CreatedStrongHand(owner, strongHands[owner]);
}
}
contract StrongHand {
HourglassInterface constant p3dContract = HourglassInterface(0x1EB2acB92624DA2e601EEb77e2508b32E49012ef);
address public owner;
uint256 public creationDate;
uint256 public unlockAfterNDays;
modifier timeLocked()
{
}
modifier onlyOwner()
{
}
constructor(address _owner, uint256 _unlockAfterNDays)
public
{
}
function() public payable {}
function isLocked()
public
view
returns(bool)
{
}
function lockedUntil()
external
view
returns(uint256)
{
}
function extendLock(uint256 _howManyDays)
external
onlyOwner
{
}
//safety functions
function withdraw()
external
onlyOwner
{
}
function buyWithBalance()
external
onlyOwner
{
}
//P3D functions
function balanceOf()
external
view
returns(uint256)
{
}
function dividendsOf()
external
view
returns(uint256)
{
}
function buy()
external
payable
onlyOwner
{
}
function reinvest()
external
onlyOwner
{
}
function withdrawDividends()
external
onlyOwner
{
}
function sell(uint256 _amount)
external
timeLocked
onlyOwner
{
}
function transfer(address _toAddress, uint256 _amountOfTokens)
external
timeLocked
onlyOwner
returns(bool)
{
}
}
| !isStrongHand(),"You already became a Stronghand" | 51,270 | !isStrongHand() |
"MErc20::sweepToken: can not sweep underlying token" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.6.12;
import "./MToken.sol";
import "./Moartroller.sol";
import "./AbstractInterestRateModel.sol";
import "./Interfaces/WETHInterface.sol";
import "./Interfaces/EIP20Interface.sol";
import "./Utils/SafeEIP20.sol";
/**
* @title MOAR's MEther Contract
* @notice MToken which wraps Ether
* @author MOAR
*/
contract MWeth is MToken {
using SafeEIP20 for EIP20Interface;
/**
* @notice Construct a new MEther money market
* @param underlying_ The address of the underlying asset
* @param moartroller_ The address of the Moartroller
* @param interestRateModel_ The address of the interest rate model
* @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
* @param name_ ERC-20 name of this token
* @param symbol_ ERC-20 symbol of this token
* @param decimals_ ERC-20 decimal precision of this token
* @param admin_ Address of the administrator of this token
*/
constructor(address underlying_,
Moartroller moartroller_,
AbstractInterestRateModel interestRateModel_,
uint initialExchangeRateMantissa_,
string memory name_,
string memory symbol_,
uint8 decimals_,
address payable admin_) public {
}
/*** User Interface ***/
/**
* @notice Sender supplies assets into the market and receives mTokens in exchange
* @dev Reverts upon any failure
*/
function mint() external payable {
}
/**
* @notice Sender redeems mTokens in exchange for the underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemTokens The number of mTokens to redeem into underlying
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function redeem(uint redeemTokens) external returns (uint) {
}
/**
* @notice Sender redeems mTokens in exchange for a specified amount of underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemAmount The amount of underlying to redeem
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function redeemUnderlying(uint redeemAmount) external returns (uint) {
}
/**
* @notice Sender borrows assets from the protocol to their own address
* @param borrowAmount The amount of the underlying asset to borrow
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function borrow(uint borrowAmount) external returns (uint) {
}
function borrowFor(address payable borrower, uint borrowAmount) external returns (uint) {
}
/**
* @notice Sender repays their own borrow
* @dev Reverts upon any failure
*/
function repayBorrow() external payable {
}
/**
* @notice Sender repays a borrow belonging to borrower
* @dev Reverts upon any failure
* @param borrower the account with the debt being payed off
*/
function repayBorrowBehalf(address borrower) external payable {
}
/**
* @notice The sender liquidates the borrowers collateral.
* The collateral seized is transferred to the liquidator.
* @dev Reverts upon any failure
* @param borrower The borrower of this mToken to be liquidated
* @param mTokenCollateral The market in which to seize collateral from the borrower
*/
function liquidateBorrow(address borrower, MToken mTokenCollateral) external payable {
}
/**
* @notice The sender adds to reserves.
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function _addReserves() external payable returns (uint) {
}
/**
* @notice Send Ether to MEther to mint
*/
receive () external payable {
}
/**
* @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (timelock)
* @param token The address of the ERC-20 token to sweep
*/
function sweepToken(EIP20Interface token) override external {
require(<FILL_ME>)
uint256 balance = token.balanceOf(address(this));
token.safeTransfer(admin, balance);
}
/*** Safe Token ***/
/**
* @notice Gets balance of this contract in terms of the underlying
* @dev This excludes the value of the current message, if any
* @return The quantity of underlying tokens owned by this contract
*/
function getCashPrior() internal override view returns (uint) {
}
/**
* @notice Perform the actual transfer in, which is a no-op
* @param from Address sending the Ether
* @param amount Amount of Ether being sent
* @return The actual amount of Ether transferred
*/
function doTransferIn(address from, uint amount) internal override returns (uint) {
}
/**
* @notice Perform the transfer out
* @param to Reciever address
* @param amount Amount of Ether being sent
*/
function doTransferOut(address payable to, uint amount) internal override {
}
function requireNoError(uint errCode, string memory message) internal pure {
}
}
| address(token)!=underlying,"MErc20::sweepToken: can not sweep underlying token" | 51,293 | address(token)!=underlying |
"ERROR: CALLER IS NOT THE OWNER OF PROTECTION" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "./Interfaces/CopMappingInterface.sol";
import "./Interfaces/Versionable.sol";
import "./Moartroller.sol";
import "./Utils/ExponentialNoError.sol";
import "./Utils/ErrorReporter.sol";
import "./Utils/AssetHelpers.sol";
import "./MToken.sol";
import "./Interfaces/EIP20Interface.sol";
import "./Utils/SafeEIP20.sol";
/**
* @title MOAR's MProtection Contract
* @notice Collateral optimization ERC-721 wrapper
* @author MOAR
*/
contract MProtection is ERC721Upgradeable, OwnableUpgradeable, ExponentialNoError, AssetHelpers, Versionable {
using Counters for Counters.Counter;
using EnumerableSet for EnumerableSet.UintSet;
/**
* @notice Event emitted when new MProtection token is minted
*/
event Mint(address minter, uint tokenId, uint underlyingTokenId, address asset, uint amount, uint strikePrice, uint expirationTime);
/**
* @notice Event emitted when MProtection token is redeemed
*/
event Redeem(address redeemer, uint tokenId, uint underlyingTokenId);
/**
* @notice Event emitted when MProtection token changes its locked value
*/
event LockValue(uint tokenId, uint underlyingTokenId, uint optimizationValue);
/**
* @notice Event emitted when maturity window parameter is changed
*/
event MaturityWindowUpdated(uint newMaturityWindow);
Counters.Counter private _tokenIds;
address private _copMappingAddress;
address private _moartrollerAddress;
mapping (uint256 => uint256) private _underlyingProtectionTokensMapping;
mapping (uint256 => uint256) private _underlyingProtectionLockedValue;
mapping (address => mapping (address => EnumerableSet.UintSet)) private _protectionCurrencyMapping;
uint256 public _maturityWindow;
struct ProtectionMappedData{
address pool;
address underlyingAsset;
uint256 amount;
uint256 strike;
uint256 premium;
uint256 lockedValue;
uint256 totalValue;
uint issueTime;
uint expirationTime;
bool isProtectionAlive;
}
/**
* @notice Constructor for MProtection contract
* @param copMappingAddress The address of data mapper for C-OP
* @param moartrollerAddress The address of the Moartroller
*/
function initialize(address copMappingAddress, address moartrollerAddress) public initializer {
}
/**
* @notice Returns C-OP mapping contract
*/
function copMapping() private view returns (CopMappingInterface){
}
/**
* @notice Mint new MProtection token
* @param underlyingTokenId Id of C-OP token that will be deposited
* @return ID of minted MProtection token
*/
function mint(uint256 underlyingTokenId) public returns (uint256)
{
}
/**
* @notice Mint new MProtection token for specified address
* @param underlyingTokenId Id of C-OP token that will be deposited
* @param receiver Address that will receive minted Mprotection token
* @return ID of minted MProtection token
*/
function mintFor(uint256 underlyingTokenId, address receiver) public returns (uint256)
{
}
/**
* @notice Redeem C-OP token
* @param tokenId Id of MProtection token that will be withdrawn
* @return ID of redeemed C-OP token
*/
function redeem(uint256 tokenId) external returns (uint256) {
}
/**
* @notice Returns set of C-OP data
* @param tokenId Id of MProtection token
* @return ProtectionMappedData struct filled with C-OP data
*/
function getMappedProtectionData(uint256 tokenId) public view returns (ProtectionMappedData memory){
}
/**
* @notice Returns underlying token ID
* @param tokenId Id of MProtection token
*/
function getUnderlyingProtectionTokenId(uint256 tokenId) public view returns (uint256){
}
/**
* @notice Returns size of C-OPs filtered by asset address
* @param owner Address of wallet holding C-OPs
* @param currency Address of asset used to filter C-OPs
*/
function getUserUnderlyingProtectionTokenIdByCurrencySize(address owner, address currency) public view returns (uint256){
}
/**
* @notice Returns list of C-OP IDs filtered by asset address
* @param owner Address of wallet holding C-OPs
* @param currency Address of asset used to filter C-OPs
*/
function getUserUnderlyingProtectionTokenIdByCurrency(address owner, address currency, uint256 index) public view returns (uint256){
}
/**
* @notice Checks if address is owner of MProtection
* @param owner Address of potential owner to check
* @param tokenId ID of MProtection to check
*/
function isUserProtection(address owner, uint256 tokenId) public view returns(bool) {
}
/**
* @notice Checks if MProtection is stil alive
* @param tokenId ID of MProtection to check
*/
function isProtectionAlive(uint256 tokenId) public view returns(bool) {
}
/**
* @notice Creates appropriate indexes for C-OP
* @param owner C-OP owner address
* @param tokenId ID of MProtection
* @param underlyingTokenId ID of C-OP
*/
function addUProtectionIndexes(address owner, uint256 tokenId, uint256 underlyingTokenId) private{
}
/**
* @notice Remove indexes for C-OP
* @param tokenId ID of MProtection
*/
function removeProtectionIndexes(uint256 tokenId) private{
}
/**
* @notice Returns C-OP total value
* @param tokenId ID of MProtection
*/
function getUnderlyingProtectionTotalValue(uint256 tokenId) public view returns(uint256){
}
/**
* @notice Returns C-OP locked value
* @param tokenId ID of MProtection
*/
function getUnderlyingProtectionLockedValue(uint256 tokenId) public view returns(uint256){
}
/**
* @notice get the amount of underlying asset that is locked
* @param tokenId CProtection tokenId
* @return amount locked
*/
function getUnderlyingProtectionLockedAmount(uint256 tokenId) public view returns(uint256){
}
/**
* @notice Locks the given protection value as collateral optimization
* @param tokenId The MProtection token id
* @param value The value in stablecoin of protection to be locked as collateral optimization. 0 = max available optimization
* @return locked protection value
* TODO: convert semantic errors to standarized error codes
*/
function lockProtectionValue(uint256 tokenId, uint value) external returns(uint) {
//check if the protection belongs to the caller
require(<FILL_ME>)
address currency = getUnderlyingAsset(tokenId);
Moartroller moartroller = Moartroller(_moartrollerAddress);
MToken mToken = moartroller.tokenAddressToMToken(currency);
require(moartroller.oracle().getUnderlyingPrice(mToken) <= getUnderlyingStrikePrice(tokenId), "ERROR: C-OP STRIKE PRICE IS LOWER THAN ASSET SPOT PRICE");
uint protectionTotalValue = getUnderlyingProtectionTotalValue(tokenId);
uint maxOptimizableValue = moartroller.getMaxOptimizableValue(mToken, ownerOf(tokenId));
// add protection locked value if any
uint protectionLockedValue = getUnderlyingProtectionLockedValue(tokenId);
if ( protectionLockedValue > 0) {
maxOptimizableValue = add_(maxOptimizableValue, protectionLockedValue);
}
uint valueToLock;
if (value != 0) {
// check if lock value is at most max optimizable value
require(value <= maxOptimizableValue, "ERROR: VALUE TO BE LOCKED EXCEEDS ALLOWED OPTIMIZATION VALUE");
// check if lock value is at most protection total value
require( value <= protectionTotalValue, "ERROR: VALUE TO BE LOCKED EXCEEDS PROTECTION TOTAL VALUE");
valueToLock = value;
} else {
// if we want to lock maximum protection value let's lock the value that is at most max optimizable value
if (protectionTotalValue > maxOptimizableValue) {
valueToLock = maxOptimizableValue;
} else {
valueToLock = protectionTotalValue;
}
}
_underlyingProtectionLockedValue[tokenId] = valueToLock;
emit LockValue(tokenId, getUnderlyingProtectionTokenId(tokenId), valueToLock);
return valueToLock;
}
function _setCopMapping(address newMapping) public onlyOwner {
}
function _setMoartroller(address newMoartroller) public onlyOwner {
}
function _setMaturityWindow(uint256 maturityWindow) public onlyOwner {
}
// MAPPINGS
function getProtectionData(uint256 tokenId) public view returns (address, uint256, uint256, uint256, uint, uint){
}
function getUnderlyingAsset(uint256 tokenId) public view returns (address){
}
function getUnderlyingAmount(uint256 tokenId) public view returns (uint256){
}
function getUnderlyingStrikePrice(uint256 tokenId) public view returns (uint){
}
function getUnderlyingDeadline(uint256 tokenId) public view returns (uint){
}
function getContractVersion() external override pure returns(string memory){
}
}
| isUserProtection(msg.sender,tokenId),"ERROR: CALLER IS NOT THE OWNER OF PROTECTION" | 51,307 | isUserProtection(msg.sender,tokenId) |
"ERROR: C-OP STRIKE PRICE IS LOWER THAN ASSET SPOT PRICE" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "./Interfaces/CopMappingInterface.sol";
import "./Interfaces/Versionable.sol";
import "./Moartroller.sol";
import "./Utils/ExponentialNoError.sol";
import "./Utils/ErrorReporter.sol";
import "./Utils/AssetHelpers.sol";
import "./MToken.sol";
import "./Interfaces/EIP20Interface.sol";
import "./Utils/SafeEIP20.sol";
/**
* @title MOAR's MProtection Contract
* @notice Collateral optimization ERC-721 wrapper
* @author MOAR
*/
contract MProtection is ERC721Upgradeable, OwnableUpgradeable, ExponentialNoError, AssetHelpers, Versionable {
using Counters for Counters.Counter;
using EnumerableSet for EnumerableSet.UintSet;
/**
* @notice Event emitted when new MProtection token is minted
*/
event Mint(address minter, uint tokenId, uint underlyingTokenId, address asset, uint amount, uint strikePrice, uint expirationTime);
/**
* @notice Event emitted when MProtection token is redeemed
*/
event Redeem(address redeemer, uint tokenId, uint underlyingTokenId);
/**
* @notice Event emitted when MProtection token changes its locked value
*/
event LockValue(uint tokenId, uint underlyingTokenId, uint optimizationValue);
/**
* @notice Event emitted when maturity window parameter is changed
*/
event MaturityWindowUpdated(uint newMaturityWindow);
Counters.Counter private _tokenIds;
address private _copMappingAddress;
address private _moartrollerAddress;
mapping (uint256 => uint256) private _underlyingProtectionTokensMapping;
mapping (uint256 => uint256) private _underlyingProtectionLockedValue;
mapping (address => mapping (address => EnumerableSet.UintSet)) private _protectionCurrencyMapping;
uint256 public _maturityWindow;
struct ProtectionMappedData{
address pool;
address underlyingAsset;
uint256 amount;
uint256 strike;
uint256 premium;
uint256 lockedValue;
uint256 totalValue;
uint issueTime;
uint expirationTime;
bool isProtectionAlive;
}
/**
* @notice Constructor for MProtection contract
* @param copMappingAddress The address of data mapper for C-OP
* @param moartrollerAddress The address of the Moartroller
*/
function initialize(address copMappingAddress, address moartrollerAddress) public initializer {
}
/**
* @notice Returns C-OP mapping contract
*/
function copMapping() private view returns (CopMappingInterface){
}
/**
* @notice Mint new MProtection token
* @param underlyingTokenId Id of C-OP token that will be deposited
* @return ID of minted MProtection token
*/
function mint(uint256 underlyingTokenId) public returns (uint256)
{
}
/**
* @notice Mint new MProtection token for specified address
* @param underlyingTokenId Id of C-OP token that will be deposited
* @param receiver Address that will receive minted Mprotection token
* @return ID of minted MProtection token
*/
function mintFor(uint256 underlyingTokenId, address receiver) public returns (uint256)
{
}
/**
* @notice Redeem C-OP token
* @param tokenId Id of MProtection token that will be withdrawn
* @return ID of redeemed C-OP token
*/
function redeem(uint256 tokenId) external returns (uint256) {
}
/**
* @notice Returns set of C-OP data
* @param tokenId Id of MProtection token
* @return ProtectionMappedData struct filled with C-OP data
*/
function getMappedProtectionData(uint256 tokenId) public view returns (ProtectionMappedData memory){
}
/**
* @notice Returns underlying token ID
* @param tokenId Id of MProtection token
*/
function getUnderlyingProtectionTokenId(uint256 tokenId) public view returns (uint256){
}
/**
* @notice Returns size of C-OPs filtered by asset address
* @param owner Address of wallet holding C-OPs
* @param currency Address of asset used to filter C-OPs
*/
function getUserUnderlyingProtectionTokenIdByCurrencySize(address owner, address currency) public view returns (uint256){
}
/**
* @notice Returns list of C-OP IDs filtered by asset address
* @param owner Address of wallet holding C-OPs
* @param currency Address of asset used to filter C-OPs
*/
function getUserUnderlyingProtectionTokenIdByCurrency(address owner, address currency, uint256 index) public view returns (uint256){
}
/**
* @notice Checks if address is owner of MProtection
* @param owner Address of potential owner to check
* @param tokenId ID of MProtection to check
*/
function isUserProtection(address owner, uint256 tokenId) public view returns(bool) {
}
/**
* @notice Checks if MProtection is stil alive
* @param tokenId ID of MProtection to check
*/
function isProtectionAlive(uint256 tokenId) public view returns(bool) {
}
/**
* @notice Creates appropriate indexes for C-OP
* @param owner C-OP owner address
* @param tokenId ID of MProtection
* @param underlyingTokenId ID of C-OP
*/
function addUProtectionIndexes(address owner, uint256 tokenId, uint256 underlyingTokenId) private{
}
/**
* @notice Remove indexes for C-OP
* @param tokenId ID of MProtection
*/
function removeProtectionIndexes(uint256 tokenId) private{
}
/**
* @notice Returns C-OP total value
* @param tokenId ID of MProtection
*/
function getUnderlyingProtectionTotalValue(uint256 tokenId) public view returns(uint256){
}
/**
* @notice Returns C-OP locked value
* @param tokenId ID of MProtection
*/
function getUnderlyingProtectionLockedValue(uint256 tokenId) public view returns(uint256){
}
/**
* @notice get the amount of underlying asset that is locked
* @param tokenId CProtection tokenId
* @return amount locked
*/
function getUnderlyingProtectionLockedAmount(uint256 tokenId) public view returns(uint256){
}
/**
* @notice Locks the given protection value as collateral optimization
* @param tokenId The MProtection token id
* @param value The value in stablecoin of protection to be locked as collateral optimization. 0 = max available optimization
* @return locked protection value
* TODO: convert semantic errors to standarized error codes
*/
function lockProtectionValue(uint256 tokenId, uint value) external returns(uint) {
//check if the protection belongs to the caller
require(isUserProtection(msg.sender, tokenId), "ERROR: CALLER IS NOT THE OWNER OF PROTECTION");
address currency = getUnderlyingAsset(tokenId);
Moartroller moartroller = Moartroller(_moartrollerAddress);
MToken mToken = moartroller.tokenAddressToMToken(currency);
require(<FILL_ME>)
uint protectionTotalValue = getUnderlyingProtectionTotalValue(tokenId);
uint maxOptimizableValue = moartroller.getMaxOptimizableValue(mToken, ownerOf(tokenId));
// add protection locked value if any
uint protectionLockedValue = getUnderlyingProtectionLockedValue(tokenId);
if ( protectionLockedValue > 0) {
maxOptimizableValue = add_(maxOptimizableValue, protectionLockedValue);
}
uint valueToLock;
if (value != 0) {
// check if lock value is at most max optimizable value
require(value <= maxOptimizableValue, "ERROR: VALUE TO BE LOCKED EXCEEDS ALLOWED OPTIMIZATION VALUE");
// check if lock value is at most protection total value
require( value <= protectionTotalValue, "ERROR: VALUE TO BE LOCKED EXCEEDS PROTECTION TOTAL VALUE");
valueToLock = value;
} else {
// if we want to lock maximum protection value let's lock the value that is at most max optimizable value
if (protectionTotalValue > maxOptimizableValue) {
valueToLock = maxOptimizableValue;
} else {
valueToLock = protectionTotalValue;
}
}
_underlyingProtectionLockedValue[tokenId] = valueToLock;
emit LockValue(tokenId, getUnderlyingProtectionTokenId(tokenId), valueToLock);
return valueToLock;
}
function _setCopMapping(address newMapping) public onlyOwner {
}
function _setMoartroller(address newMoartroller) public onlyOwner {
}
function _setMaturityWindow(uint256 maturityWindow) public onlyOwner {
}
// MAPPINGS
function getProtectionData(uint256 tokenId) public view returns (address, uint256, uint256, uint256, uint, uint){
}
function getUnderlyingAsset(uint256 tokenId) public view returns (address){
}
function getUnderlyingAmount(uint256 tokenId) public view returns (uint256){
}
function getUnderlyingStrikePrice(uint256 tokenId) public view returns (uint){
}
function getUnderlyingDeadline(uint256 tokenId) public view returns (uint){
}
function getContractVersion() external override pure returns(string memory){
}
}
| moartroller.oracle().getUnderlyingPrice(mToken)<=getUnderlyingStrikePrice(tokenId),"ERROR: C-OP STRIKE PRICE IS LOWER THAN ASSET SPOT PRICE" | 51,307 | moartroller.oracle().getUnderlyingPrice(mToken)<=getUnderlyingStrikePrice(tokenId) |
"Your address is not whitelisted for the presale" | pragma solidity ^0.8.0;
contract CyberBullsERC721 is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Address for address;
string private baseURI;
uint256 public maxGenesis;
uint256 public maxTokens;
uint256 public maxPresale = 0;
uint256 public babyCount = 0;
uint256 public price = 0.1 ether;
bool public presaleActive = false;
bool public saleActive = false;
mapping(address => bool) public presaleAllowed;
mapping(address => uint256) public balanceGenesis;
constructor(
string memory name,
string memory symbol,
uint256 maxGen,
uint256 maxPres,
uint256 maxTks
) ERC721(name, symbol) {
}
event TokenMinted(uint256 token, address by);
function mintPresale() external payable {
uint256 supply = totalSupply();
require(presaleActive, "Presale is not active or already over");
require(<FILL_ME>)
require(
supply.add(1) <= maxPresale,
"Cannot mint because it would exceed the presale limits"
);
require(price == msg.value, "Not enough ETH value");
presaleAllowed[msg.sender] = false;
_safeMint(msg.sender, supply);
balanceGenesis[msg.sender]++;
emit TokenMinted(supply, msg.sender);
}
function mint(uint256 amount) external payable {
}
function allowPresaleAddresses(address[] calldata presaleAddresses)
external
onlyOwner
{
}
function getTokensOwnedBy(address owner)
external
view
returns (uint256[] memory)
{
}
function togglePresale() external onlyOwner {
}
function toggleSale() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| presaleAllowed[msg.sender],"Your address is not whitelisted for the presale" | 51,374 | presaleAllowed[msg.sender] |
"Cannot mint because it would exceed the presale limits" | pragma solidity ^0.8.0;
contract CyberBullsERC721 is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Address for address;
string private baseURI;
uint256 public maxGenesis;
uint256 public maxTokens;
uint256 public maxPresale = 0;
uint256 public babyCount = 0;
uint256 public price = 0.1 ether;
bool public presaleActive = false;
bool public saleActive = false;
mapping(address => bool) public presaleAllowed;
mapping(address => uint256) public balanceGenesis;
constructor(
string memory name,
string memory symbol,
uint256 maxGen,
uint256 maxPres,
uint256 maxTks
) ERC721(name, symbol) {
}
event TokenMinted(uint256 token, address by);
function mintPresale() external payable {
uint256 supply = totalSupply();
require(presaleActive, "Presale is not active or already over");
require(
presaleAllowed[msg.sender],
"Your address is not whitelisted for the presale"
);
require(<FILL_ME>)
require(price == msg.value, "Not enough ETH value");
presaleAllowed[msg.sender] = false;
_safeMint(msg.sender, supply);
balanceGenesis[msg.sender]++;
emit TokenMinted(supply, msg.sender);
}
function mint(uint256 amount) external payable {
}
function allowPresaleAddresses(address[] calldata presaleAddresses)
external
onlyOwner
{
}
function getTokensOwnedBy(address owner)
external
view
returns (uint256[] memory)
{
}
function togglePresale() external onlyOwner {
}
function toggleSale() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| supply.add(1)<=maxPresale,"Cannot mint because it would exceed the presale limits" | 51,374 | supply.add(1)<=maxPresale |
"Cannot mint because it would exceed the sale limits" | pragma solidity ^0.8.0;
contract CyberBullsERC721 is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Address for address;
string private baseURI;
uint256 public maxGenesis;
uint256 public maxTokens;
uint256 public maxPresale = 0;
uint256 public babyCount = 0;
uint256 public price = 0.1 ether;
bool public presaleActive = false;
bool public saleActive = false;
mapping(address => bool) public presaleAllowed;
mapping(address => uint256) public balanceGenesis;
constructor(
string memory name,
string memory symbol,
uint256 maxGen,
uint256 maxPres,
uint256 maxTks
) ERC721(name, symbol) {
}
event TokenMinted(uint256 token, address by);
function mintPresale() external payable {
}
function mint(uint256 amount) external payable {
uint256 supply = totalSupply();
require(saleActive, "Sale is not yet active");
require(
amount > 0 && amount < 6,
"You can only mint between 1-5 tokens"
);
require(<FILL_ME>)
require(price.mul(amount) == msg.value, "Not enough ETH value");
for (uint256 i; i < amount; i++) {
_safeMint(msg.sender, supply + i);
balanceGenesis[msg.sender]++;
emit TokenMinted(supply + i, msg.sender);
}
}
function allowPresaleAddresses(address[] calldata presaleAddresses)
external
onlyOwner
{
}
function getTokensOwnedBy(address owner)
external
view
returns (uint256[] memory)
{
}
function togglePresale() external onlyOwner {
}
function toggleSale() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| supply.add(amount)<=maxGenesis,"Cannot mint because it would exceed the sale limits" | 51,374 | supply.add(amount)<=maxGenesis |
"Not enough ETH value" | pragma solidity ^0.8.0;
contract CyberBullsERC721 is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Address for address;
string private baseURI;
uint256 public maxGenesis;
uint256 public maxTokens;
uint256 public maxPresale = 0;
uint256 public babyCount = 0;
uint256 public price = 0.1 ether;
bool public presaleActive = false;
bool public saleActive = false;
mapping(address => bool) public presaleAllowed;
mapping(address => uint256) public balanceGenesis;
constructor(
string memory name,
string memory symbol,
uint256 maxGen,
uint256 maxPres,
uint256 maxTks
) ERC721(name, symbol) {
}
event TokenMinted(uint256 token, address by);
function mintPresale() external payable {
}
function mint(uint256 amount) external payable {
uint256 supply = totalSupply();
require(saleActive, "Sale is not yet active");
require(
amount > 0 && amount < 6,
"You can only mint between 1-5 tokens"
);
require(
supply.add(amount) <= maxGenesis,
"Cannot mint because it would exceed the sale limits"
);
require(<FILL_ME>)
for (uint256 i; i < amount; i++) {
_safeMint(msg.sender, supply + i);
balanceGenesis[msg.sender]++;
emit TokenMinted(supply + i, msg.sender);
}
}
function allowPresaleAddresses(address[] calldata presaleAddresses)
external
onlyOwner
{
}
function getTokensOwnedBy(address owner)
external
view
returns (uint256[] memory)
{
}
function togglePresale() external onlyOwner {
}
function toggleSale() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| price.mul(amount)==msg.value,"Not enough ETH value" | 51,374 | price.mul(amount)==msg.value |
"Negative Entropy: minter must sign URI and ID!" | pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
/**
* @dev {ERC721} token, including:
*
* - ability for holders to burn (destroy) their tokens
* - a minter role that allows for token minting (creation)
* - a pauser role that allows to stop all token transfers
* - token ID and URI autogeneration
*
* This contract uses {AccessControl} to lock permissioned functions using the
* different roles - head to its documentation for details.
*
* The account that deploys the contract will be granted the minter and pauser
* roles, as well as the default admin role, which will let it grant both minter
* and pauser roles to other accounts.
*/
contract NegativeEntropy is Context, AccessControl, ERC721Tradable {
using EnumerableSet for EnumerableSet.Bytes32Set;
using ModifiedEnumerableMap for ModifiedEnumerableMap.UintToBytes32Map;
//Role to designate who has approval to mint
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
//Initial maximum quantity
uint256 public maxQuantity = 1000;
uint256 private counter = 0;
uint256 private ownerBalance = 0;
//Price a constant value
//TODO: Consider making price variable?
uint256 public constant PRICE = 15E16;
//Set that contains all seeds, allowing for easy checks of existence of a given seed
EnumerableSet.Bytes32Set private seedSet;
//Map that holds mapping of tokenId to seed
ModifiedEnumerableMap.UintToBytes32Map private seedMap;
/**
* @dev Primary constructor to create an instance of NegativeEntropy
* Grants ADMIN and MINTER_ROLE to whoever creates the contract
*
*/
constructor(address _proxy) public ERC721Tradable("Negative Entropy", "NGTV", _proxy) {
}
/**
* @dev Mint a token to _to and set the URI. TokenID is automatically assigned
* and URI is automatically generated based on whatever is passed in
*
* See {ERC721-_mint}.
*/
function mint(
uint256 _tokenId,
address _to,
string calldata _tokenURI
) internal {
}
/**
* @dev Mint a token to 'to' with a configurationURI already set
* using a minter
* The public endpoint for performing mint operations
*
* See {ERC721-_mint}.
*
* Requirements:
*
* - The caller must have a signature (v,r,s) that is properly signed by the minter
* - Minting the token must not create more tokens than are allowed to exist
* - The caller must have sufficient funds included in the transaction to afford the token
* - The caller must not be seeking to claim a seed that is already claimed
*/
function mint(
address payable to,
uint8 v,
bytes32 r,
bytes32 s,
string calldata tokenURI,
string calldata seedDesired
) public payable{
//Check for signature
require(<FILL_ME>)
//Check if we can mint based on number remaining
require(counter < maxQuantity, "NegativeEntropy: All NFTs have been claimed for this series");
require(msg.value >= PRICE, "NegativeEntropy: Insufficient funds to mint a Negative Entropy NFT");
require(!seedClaimed(seedDesired), "NegativeEntropy: Seed has already been claimed–how did you make it this far?");
//Where we get paid
ownerBalance += (PRICE);
to.transfer(msg.value.sub(PRICE));
mint(counter, to, tokenURI);
//Last step
if(claimSeed(seedDesired, counter)) {
counter = counter + 1;
} else {
revert('NegativeEntropy: Unable to add seed to map or set!');
}
}
/**
* @dev Regenerates the public key of the account which created the signature (v, r, s)
* using the URI and seed passed into the constructor. Allows for proper signing of transactions
* to repell spoofing attacks
*
*/
function addressFromSignature(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) public view returns (address) {
}
/**
* @dev Checks if the passed in signature (v, r, s) was signed by the minter
*
*/
function _signedByMinter(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) internal view returns (bool) {
}
/**
* @dev Burns a token. See {ERC721Burnable}
*
* Requirements:
*
* - Caller must be owner or approved to burn tokens
* - Token must exist in seedMap
* - Token must exist in seedSet
*/
function burn(uint256 tokenId) public {
}
function ownerWithdraw() public onlyOwner() {
}
/**
*
* GETTERS
*
*/
/**
* @dev Checks if seed is claimed by checking if it is in seedSet
*
*/
function seedClaimed(string memory checkSeed) public view returns (bool) {
}
/**
* @dev gets the current number of tokens that have been created (including burned tokens)
* This behavior differs from totalSupply(), which returns tokens EXCLUDING those burned
*/
function getTokenCount() public view returns (uint256) {
}
/**
*
* SETTERS
*
*/
/**
* @dev Claim a seed and map it to the passed in ID
*
*/
function claimSeed(string memory clmSeed, uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from both the map and the set
*
*/
function removeSeed(uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from the set only
*
*/
function removeSeed(bytes32 seedHash) internal returns (bool) {
}
/**
* @dev increase the maximum quantity of tokens which are allowed to exist
*
*/
function setMaxQuantity(uint256 quant) onlyOwner() public {
}
}
| _signedByMinter(seedDesired,tokenURI,to,v,r,s),"Negative Entropy: minter must sign URI and ID!" | 51,384 | _signedByMinter(seedDesired,tokenURI,to,v,r,s) |
"NegativeEntropy: Seed has already been claimed–how did you make it this far?" | pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
/**
* @dev {ERC721} token, including:
*
* - ability for holders to burn (destroy) their tokens
* - a minter role that allows for token minting (creation)
* - a pauser role that allows to stop all token transfers
* - token ID and URI autogeneration
*
* This contract uses {AccessControl} to lock permissioned functions using the
* different roles - head to its documentation for details.
*
* The account that deploys the contract will be granted the minter and pauser
* roles, as well as the default admin role, which will let it grant both minter
* and pauser roles to other accounts.
*/
contract NegativeEntropy is Context, AccessControl, ERC721Tradable {
using EnumerableSet for EnumerableSet.Bytes32Set;
using ModifiedEnumerableMap for ModifiedEnumerableMap.UintToBytes32Map;
//Role to designate who has approval to mint
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
//Initial maximum quantity
uint256 public maxQuantity = 1000;
uint256 private counter = 0;
uint256 private ownerBalance = 0;
//Price a constant value
//TODO: Consider making price variable?
uint256 public constant PRICE = 15E16;
//Set that contains all seeds, allowing for easy checks of existence of a given seed
EnumerableSet.Bytes32Set private seedSet;
//Map that holds mapping of tokenId to seed
ModifiedEnumerableMap.UintToBytes32Map private seedMap;
/**
* @dev Primary constructor to create an instance of NegativeEntropy
* Grants ADMIN and MINTER_ROLE to whoever creates the contract
*
*/
constructor(address _proxy) public ERC721Tradable("Negative Entropy", "NGTV", _proxy) {
}
/**
* @dev Mint a token to _to and set the URI. TokenID is automatically assigned
* and URI is automatically generated based on whatever is passed in
*
* See {ERC721-_mint}.
*/
function mint(
uint256 _tokenId,
address _to,
string calldata _tokenURI
) internal {
}
/**
* @dev Mint a token to 'to' with a configurationURI already set
* using a minter
* The public endpoint for performing mint operations
*
* See {ERC721-_mint}.
*
* Requirements:
*
* - The caller must have a signature (v,r,s) that is properly signed by the minter
* - Minting the token must not create more tokens than are allowed to exist
* - The caller must have sufficient funds included in the transaction to afford the token
* - The caller must not be seeking to claim a seed that is already claimed
*/
function mint(
address payable to,
uint8 v,
bytes32 r,
bytes32 s,
string calldata tokenURI,
string calldata seedDesired
) public payable{
//Check for signature
require(
_signedByMinter(seedDesired, tokenURI, to, v, r, s),
"Negative Entropy: minter must sign URI and ID!"
);
//Check if we can mint based on number remaining
require(counter < maxQuantity, "NegativeEntropy: All NFTs have been claimed for this series");
require(msg.value >= PRICE, "NegativeEntropy: Insufficient funds to mint a Negative Entropy NFT");
require(<FILL_ME>)
//Where we get paid
ownerBalance += (PRICE);
to.transfer(msg.value.sub(PRICE));
mint(counter, to, tokenURI);
//Last step
if(claimSeed(seedDesired, counter)) {
counter = counter + 1;
} else {
revert('NegativeEntropy: Unable to add seed to map or set!');
}
}
/**
* @dev Regenerates the public key of the account which created the signature (v, r, s)
* using the URI and seed passed into the constructor. Allows for proper signing of transactions
* to repell spoofing attacks
*
*/
function addressFromSignature(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) public view returns (address) {
}
/**
* @dev Checks if the passed in signature (v, r, s) was signed by the minter
*
*/
function _signedByMinter(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) internal view returns (bool) {
}
/**
* @dev Burns a token. See {ERC721Burnable}
*
* Requirements:
*
* - Caller must be owner or approved to burn tokens
* - Token must exist in seedMap
* - Token must exist in seedSet
*/
function burn(uint256 tokenId) public {
}
function ownerWithdraw() public onlyOwner() {
}
/**
*
* GETTERS
*
*/
/**
* @dev Checks if seed is claimed by checking if it is in seedSet
*
*/
function seedClaimed(string memory checkSeed) public view returns (bool) {
}
/**
* @dev gets the current number of tokens that have been created (including burned tokens)
* This behavior differs from totalSupply(), which returns tokens EXCLUDING those burned
*/
function getTokenCount() public view returns (uint256) {
}
/**
*
* SETTERS
*
*/
/**
* @dev Claim a seed and map it to the passed in ID
*
*/
function claimSeed(string memory clmSeed, uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from both the map and the set
*
*/
function removeSeed(uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from the set only
*
*/
function removeSeed(bytes32 seedHash) internal returns (bool) {
}
/**
* @dev increase the maximum quantity of tokens which are allowed to exist
*
*/
function setMaxQuantity(uint256 quant) onlyOwner() public {
}
}
| !seedClaimed(seedDesired),"NegativeEntropy: Seed has already been claimed–how did you make it this far?" | 51,384 | !seedClaimed(seedDesired) |
'NegativeEntropy: Token ID not found in storage – Are you sure it exists?' | pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
/**
* @dev {ERC721} token, including:
*
* - ability for holders to burn (destroy) their tokens
* - a minter role that allows for token minting (creation)
* - a pauser role that allows to stop all token transfers
* - token ID and URI autogeneration
*
* This contract uses {AccessControl} to lock permissioned functions using the
* different roles - head to its documentation for details.
*
* The account that deploys the contract will be granted the minter and pauser
* roles, as well as the default admin role, which will let it grant both minter
* and pauser roles to other accounts.
*/
contract NegativeEntropy is Context, AccessControl, ERC721Tradable {
using EnumerableSet for EnumerableSet.Bytes32Set;
using ModifiedEnumerableMap for ModifiedEnumerableMap.UintToBytes32Map;
//Role to designate who has approval to mint
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
//Initial maximum quantity
uint256 public maxQuantity = 1000;
uint256 private counter = 0;
uint256 private ownerBalance = 0;
//Price a constant value
//TODO: Consider making price variable?
uint256 public constant PRICE = 15E16;
//Set that contains all seeds, allowing for easy checks of existence of a given seed
EnumerableSet.Bytes32Set private seedSet;
//Map that holds mapping of tokenId to seed
ModifiedEnumerableMap.UintToBytes32Map private seedMap;
/**
* @dev Primary constructor to create an instance of NegativeEntropy
* Grants ADMIN and MINTER_ROLE to whoever creates the contract
*
*/
constructor(address _proxy) public ERC721Tradable("Negative Entropy", "NGTV", _proxy) {
}
/**
* @dev Mint a token to _to and set the URI. TokenID is automatically assigned
* and URI is automatically generated based on whatever is passed in
*
* See {ERC721-_mint}.
*/
function mint(
uint256 _tokenId,
address _to,
string calldata _tokenURI
) internal {
}
/**
* @dev Mint a token to 'to' with a configurationURI already set
* using a minter
* The public endpoint for performing mint operations
*
* See {ERC721-_mint}.
*
* Requirements:
*
* - The caller must have a signature (v,r,s) that is properly signed by the minter
* - Minting the token must not create more tokens than are allowed to exist
* - The caller must have sufficient funds included in the transaction to afford the token
* - The caller must not be seeking to claim a seed that is already claimed
*/
function mint(
address payable to,
uint8 v,
bytes32 r,
bytes32 s,
string calldata tokenURI,
string calldata seedDesired
) public payable{
}
/**
* @dev Regenerates the public key of the account which created the signature (v, r, s)
* using the URI and seed passed into the constructor. Allows for proper signing of transactions
* to repell spoofing attacks
*
*/
function addressFromSignature(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) public view returns (address) {
}
/**
* @dev Checks if the passed in signature (v, r, s) was signed by the minter
*
*/
function _signedByMinter(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) internal view returns (bool) {
}
/**
* @dev Burns a token. See {ERC721Burnable}
*
* Requirements:
*
* - Caller must be owner or approved to burn tokens
* - Token must exist in seedMap
* - Token must exist in seedSet
*/
function burn(uint256 tokenId) public {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
require(<FILL_ME>)
require(seedSet.contains(seedMap.get(tokenId)), 'NegativeEntropy: Token ID not found in storage – Are you sure it exists?');
_burn(tokenId);
if(!removeSeed(tokenId)) {
revert();
}
}
function ownerWithdraw() public onlyOwner() {
}
/**
*
* GETTERS
*
*/
/**
* @dev Checks if seed is claimed by checking if it is in seedSet
*
*/
function seedClaimed(string memory checkSeed) public view returns (bool) {
}
/**
* @dev gets the current number of tokens that have been created (including burned tokens)
* This behavior differs from totalSupply(), which returns tokens EXCLUDING those burned
*/
function getTokenCount() public view returns (uint256) {
}
/**
*
* SETTERS
*
*/
/**
* @dev Claim a seed and map it to the passed in ID
*
*/
function claimSeed(string memory clmSeed, uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from both the map and the set
*
*/
function removeSeed(uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from the set only
*
*/
function removeSeed(bytes32 seedHash) internal returns (bool) {
}
/**
* @dev increase the maximum quantity of tokens which are allowed to exist
*
*/
function setMaxQuantity(uint256 quant) onlyOwner() public {
}
}
| seedMap.contains(tokenId),'NegativeEntropy: Token ID not found in storage – Are you sure it exists?' | 51,384 | seedMap.contains(tokenId) |
'NegativeEntropy: Token ID not found in storage – Are you sure it exists?' | pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
/**
* @dev {ERC721} token, including:
*
* - ability for holders to burn (destroy) their tokens
* - a minter role that allows for token minting (creation)
* - a pauser role that allows to stop all token transfers
* - token ID and URI autogeneration
*
* This contract uses {AccessControl} to lock permissioned functions using the
* different roles - head to its documentation for details.
*
* The account that deploys the contract will be granted the minter and pauser
* roles, as well as the default admin role, which will let it grant both minter
* and pauser roles to other accounts.
*/
contract NegativeEntropy is Context, AccessControl, ERC721Tradable {
using EnumerableSet for EnumerableSet.Bytes32Set;
using ModifiedEnumerableMap for ModifiedEnumerableMap.UintToBytes32Map;
//Role to designate who has approval to mint
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
//Initial maximum quantity
uint256 public maxQuantity = 1000;
uint256 private counter = 0;
uint256 private ownerBalance = 0;
//Price a constant value
//TODO: Consider making price variable?
uint256 public constant PRICE = 15E16;
//Set that contains all seeds, allowing for easy checks of existence of a given seed
EnumerableSet.Bytes32Set private seedSet;
//Map that holds mapping of tokenId to seed
ModifiedEnumerableMap.UintToBytes32Map private seedMap;
/**
* @dev Primary constructor to create an instance of NegativeEntropy
* Grants ADMIN and MINTER_ROLE to whoever creates the contract
*
*/
constructor(address _proxy) public ERC721Tradable("Negative Entropy", "NGTV", _proxy) {
}
/**
* @dev Mint a token to _to and set the URI. TokenID is automatically assigned
* and URI is automatically generated based on whatever is passed in
*
* See {ERC721-_mint}.
*/
function mint(
uint256 _tokenId,
address _to,
string calldata _tokenURI
) internal {
}
/**
* @dev Mint a token to 'to' with a configurationURI already set
* using a minter
* The public endpoint for performing mint operations
*
* See {ERC721-_mint}.
*
* Requirements:
*
* - The caller must have a signature (v,r,s) that is properly signed by the minter
* - Minting the token must not create more tokens than are allowed to exist
* - The caller must have sufficient funds included in the transaction to afford the token
* - The caller must not be seeking to claim a seed that is already claimed
*/
function mint(
address payable to,
uint8 v,
bytes32 r,
bytes32 s,
string calldata tokenURI,
string calldata seedDesired
) public payable{
}
/**
* @dev Regenerates the public key of the account which created the signature (v, r, s)
* using the URI and seed passed into the constructor. Allows for proper signing of transactions
* to repell spoofing attacks
*
*/
function addressFromSignature(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) public view returns (address) {
}
/**
* @dev Checks if the passed in signature (v, r, s) was signed by the minter
*
*/
function _signedByMinter(
string calldata seed,
string calldata tokenURI,
address account,
uint8 v,
bytes32 r,
bytes32 s
) internal view returns (bool) {
}
/**
* @dev Burns a token. See {ERC721Burnable}
*
* Requirements:
*
* - Caller must be owner or approved to burn tokens
* - Token must exist in seedMap
* - Token must exist in seedSet
*/
function burn(uint256 tokenId) public {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
require(seedMap.contains(tokenId), 'NegativeEntropy: Token ID not found in storage – Are you sure it exists?');
require(<FILL_ME>)
_burn(tokenId);
if(!removeSeed(tokenId)) {
revert();
}
}
function ownerWithdraw() public onlyOwner() {
}
/**
*
* GETTERS
*
*/
/**
* @dev Checks if seed is claimed by checking if it is in seedSet
*
*/
function seedClaimed(string memory checkSeed) public view returns (bool) {
}
/**
* @dev gets the current number of tokens that have been created (including burned tokens)
* This behavior differs from totalSupply(), which returns tokens EXCLUDING those burned
*/
function getTokenCount() public view returns (uint256) {
}
/**
*
* SETTERS
*
*/
/**
* @dev Claim a seed and map it to the passed in ID
*
*/
function claimSeed(string memory clmSeed, uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from both the map and the set
*
*/
function removeSeed(uint256 id) internal returns (bool) {
}
/**
* @dev Remove a seed from the set only
*
*/
function removeSeed(bytes32 seedHash) internal returns (bool) {
}
/**
* @dev increase the maximum quantity of tokens which are allowed to exist
*
*/
function setMaxQuantity(uint256 quant) onlyOwner() public {
}
}
| seedSet.contains(seedMap.get(tokenId)),'NegativeEntropy: Token ID not found in storage – Are you sure it exists?' | 51,384 | seedSet.contains(seedMap.get(tokenId)) |
"You can't own that many tokens at once." | //SPDX-License-Identifier: UNLICENSED
// TG: https://t.me/LlamaInu
// website: https://llamainu.com
pragma solidity ^0.8.10;
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);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LLAMAINU is Context, IERC20, Ownable {
mapping (address => uint) private _owned;
mapping (address => mapping (address => uint)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => User) private cooldown;
uint private constant _totalSupply = 1e10 * 10**16;
string public constant name = unicode"Llama Inu";
string public constant symbol = unicode"LlamaInu";
uint8 public constant decimals = 16;
IUniswapV2Router02 private uniswapV2Router;
address payable public _FeeAddress1;
address public uniswapV2Pair;
uint public _buyFee = 10;
uint public _sellFee = 10;
uint private _feeRate = 25;
uint public _maxBuyAmount;
uint public _maxHeldTokens;
uint public _launchedAt;
bool private _tradingOpen;
bool private _inSwap = false;
bool public _useImpactFeeSetter = false;
struct User {
uint buy;
bool exists;
}
event FeeMultiplierUpdated(uint _multiplier);
event ImpactFeeSetterUpdated(bool _usefeesetter);
event FeeRateUpdated(uint _rate);
event FeesUpdated(uint _buy, uint _sell);
event FeeAddress1Updated(address _feewallet1);
modifier lockTheSwap {
}
constructor (address payable FeeAddress1) {
}
function balanceOf(address account) public view override returns (uint) {
}
function transfer(address recipient, uint amount) public override returns (bool) {
}
function totalSupply() public pure override returns (uint) {
}
function allowance(address owner, address spender) public view override returns (uint) {
}
function approve(address spender, uint amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function _transfer(address from, address to, uint amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
bool isBuy = false;
if(from != owner() && to != owner()) {
if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) {
require(_tradingOpen, "Trading not yet enabled.");
require(block.timestamp != _launchedAt, "don't snip");
if((_launchedAt + (2 hours)) > block.timestamp) {
require(<FILL_ME>) // hold limit for first 2 hours is 5%
}
if(!cooldown[to].exists) {
cooldown[to] = User(0,true);
}
if((_launchedAt + (600 seconds)) > block.timestamp) {
require(amount <= _maxBuyAmount, "Exceeds maximum buy amount.");
require(cooldown[to].buy < block.timestamp + (30 seconds), "30 seconds buy cooldown.");
}
cooldown[to].buy = block.timestamp;
isBuy = true;
}
if(!_inSwap && _tradingOpen && from != uniswapV2Pair) {
require(cooldown[from].buy < block.timestamp + (30 seconds), "30 seconds sell cooldown.");
uint contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance > 0) {
if(_useImpactFeeSetter) {
if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) {
contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100;
}
}
swapTokensForEth(contractTokenBalance);
}
uint contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
isBuy = false;
}
}
bool takeFee = true;
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
}
_tokenTransfer(from,to,amount,takeFee,isBuy);
}
function swapTokensForEth(uint tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint amount) private {
}
function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private {
}
function _getFee(bool takefee, bool buy) private view returns (uint) {
}
function _transferStandard(address sender, address recipient, uint amount, uint fee) private {
}
function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) {
}
function _takeTeam(uint team) private {
}
receive() external payable {}
// external functions
function addLiquidity() external onlyOwner() {
}
function openTrading() external onlyOwner() {
}
function manualswap() external {
}
function manualsend() external {
}
function setFeeRate(uint rate) external {
}
function setFees(uint buy, uint sell) external {
}
function toggleImpactFee(bool onoff) external {
}
function updateFeeAddress1(address newAddress) external {
}
// view functions
function thisBalance() public view returns (uint) {
}
function amountInPool() public view returns (uint) {
}
}
| (amount+balanceOf(address(to)))<=_maxHeldTokens,"You can't own that many tokens at once." | 51,415 | (amount+balanceOf(address(to)))<=_maxHeldTokens |
"30 seconds buy cooldown." | //SPDX-License-Identifier: UNLICENSED
// TG: https://t.me/LlamaInu
// website: https://llamainu.com
pragma solidity ^0.8.10;
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);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LLAMAINU is Context, IERC20, Ownable {
mapping (address => uint) private _owned;
mapping (address => mapping (address => uint)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => User) private cooldown;
uint private constant _totalSupply = 1e10 * 10**16;
string public constant name = unicode"Llama Inu";
string public constant symbol = unicode"LlamaInu";
uint8 public constant decimals = 16;
IUniswapV2Router02 private uniswapV2Router;
address payable public _FeeAddress1;
address public uniswapV2Pair;
uint public _buyFee = 10;
uint public _sellFee = 10;
uint private _feeRate = 25;
uint public _maxBuyAmount;
uint public _maxHeldTokens;
uint public _launchedAt;
bool private _tradingOpen;
bool private _inSwap = false;
bool public _useImpactFeeSetter = false;
struct User {
uint buy;
bool exists;
}
event FeeMultiplierUpdated(uint _multiplier);
event ImpactFeeSetterUpdated(bool _usefeesetter);
event FeeRateUpdated(uint _rate);
event FeesUpdated(uint _buy, uint _sell);
event FeeAddress1Updated(address _feewallet1);
modifier lockTheSwap {
}
constructor (address payable FeeAddress1) {
}
function balanceOf(address account) public view override returns (uint) {
}
function transfer(address recipient, uint amount) public override returns (bool) {
}
function totalSupply() public pure override returns (uint) {
}
function allowance(address owner, address spender) public view override returns (uint) {
}
function approve(address spender, uint amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function _transfer(address from, address to, uint amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
bool isBuy = false;
if(from != owner() && to != owner()) {
if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) {
require(_tradingOpen, "Trading not yet enabled.");
require(block.timestamp != _launchedAt, "don't snip");
if((_launchedAt + (2 hours)) > block.timestamp) {
require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); // hold limit for first 2 hours is 5%
}
if(!cooldown[to].exists) {
cooldown[to] = User(0,true);
}
if((_launchedAt + (600 seconds)) > block.timestamp) {
require(amount <= _maxBuyAmount, "Exceeds maximum buy amount.");
require(<FILL_ME>)
}
cooldown[to].buy = block.timestamp;
isBuy = true;
}
if(!_inSwap && _tradingOpen && from != uniswapV2Pair) {
require(cooldown[from].buy < block.timestamp + (30 seconds), "30 seconds sell cooldown.");
uint contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance > 0) {
if(_useImpactFeeSetter) {
if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) {
contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100;
}
}
swapTokensForEth(contractTokenBalance);
}
uint contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
isBuy = false;
}
}
bool takeFee = true;
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
}
_tokenTransfer(from,to,amount,takeFee,isBuy);
}
function swapTokensForEth(uint tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint amount) private {
}
function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private {
}
function _getFee(bool takefee, bool buy) private view returns (uint) {
}
function _transferStandard(address sender, address recipient, uint amount, uint fee) private {
}
function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) {
}
function _takeTeam(uint team) private {
}
receive() external payable {}
// external functions
function addLiquidity() external onlyOwner() {
}
function openTrading() external onlyOwner() {
}
function manualswap() external {
}
function manualsend() external {
}
function setFeeRate(uint rate) external {
}
function setFees(uint buy, uint sell) external {
}
function toggleImpactFee(bool onoff) external {
}
function updateFeeAddress1(address newAddress) external {
}
// view functions
function thisBalance() public view returns (uint) {
}
function amountInPool() public view returns (uint) {
}
}
| cooldown[to].buy<block.timestamp+(30seconds),"30 seconds buy cooldown." | 51,415 | cooldown[to].buy<block.timestamp+(30seconds) |
"30 seconds sell cooldown." | //SPDX-License-Identifier: UNLICENSED
// TG: https://t.me/LlamaInu
// website: https://llamainu.com
pragma solidity ^0.8.10;
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);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LLAMAINU is Context, IERC20, Ownable {
mapping (address => uint) private _owned;
mapping (address => mapping (address => uint)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => User) private cooldown;
uint private constant _totalSupply = 1e10 * 10**16;
string public constant name = unicode"Llama Inu";
string public constant symbol = unicode"LlamaInu";
uint8 public constant decimals = 16;
IUniswapV2Router02 private uniswapV2Router;
address payable public _FeeAddress1;
address public uniswapV2Pair;
uint public _buyFee = 10;
uint public _sellFee = 10;
uint private _feeRate = 25;
uint public _maxBuyAmount;
uint public _maxHeldTokens;
uint public _launchedAt;
bool private _tradingOpen;
bool private _inSwap = false;
bool public _useImpactFeeSetter = false;
struct User {
uint buy;
bool exists;
}
event FeeMultiplierUpdated(uint _multiplier);
event ImpactFeeSetterUpdated(bool _usefeesetter);
event FeeRateUpdated(uint _rate);
event FeesUpdated(uint _buy, uint _sell);
event FeeAddress1Updated(address _feewallet1);
modifier lockTheSwap {
}
constructor (address payable FeeAddress1) {
}
function balanceOf(address account) public view override returns (uint) {
}
function transfer(address recipient, uint amount) public override returns (bool) {
}
function totalSupply() public pure override returns (uint) {
}
function allowance(address owner, address spender) public view override returns (uint) {
}
function approve(address spender, uint amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function _transfer(address from, address to, uint amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
bool isBuy = false;
if(from != owner() && to != owner()) {
if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) {
require(_tradingOpen, "Trading not yet enabled.");
require(block.timestamp != _launchedAt, "don't snip");
if((_launchedAt + (2 hours)) > block.timestamp) {
require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); // hold limit for first 2 hours is 5%
}
if(!cooldown[to].exists) {
cooldown[to] = User(0,true);
}
if((_launchedAt + (600 seconds)) > block.timestamp) {
require(amount <= _maxBuyAmount, "Exceeds maximum buy amount.");
require(cooldown[to].buy < block.timestamp + (30 seconds), "30 seconds buy cooldown.");
}
cooldown[to].buy = block.timestamp;
isBuy = true;
}
if(!_inSwap && _tradingOpen && from != uniswapV2Pair) {
require(<FILL_ME>)
uint contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance > 0) {
if(_useImpactFeeSetter) {
if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) {
contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100;
}
}
swapTokensForEth(contractTokenBalance);
}
uint contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
isBuy = false;
}
}
bool takeFee = true;
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
}
_tokenTransfer(from,to,amount,takeFee,isBuy);
}
function swapTokensForEth(uint tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint amount) private {
}
function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private {
}
function _getFee(bool takefee, bool buy) private view returns (uint) {
}
function _transferStandard(address sender, address recipient, uint amount, uint fee) private {
}
function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) {
}
function _takeTeam(uint team) private {
}
receive() external payable {}
// external functions
function addLiquidity() external onlyOwner() {
}
function openTrading() external onlyOwner() {
}
function manualswap() external {
}
function manualsend() external {
}
function setFeeRate(uint rate) external {
}
function setFees(uint buy, uint sell) external {
}
function toggleImpactFee(bool onoff) external {
}
function updateFeeAddress1(address newAddress) external {
}
// view functions
function thisBalance() public view returns (uint) {
}
function amountInPool() public view returns (uint) {
}
}
| cooldown[from].buy<block.timestamp+(30seconds),"30 seconds sell cooldown." | 51,415 | cooldown[from].buy<block.timestamp+(30seconds) |
"Trading is already open" | //SPDX-License-Identifier: UNLICENSED
// TG: https://t.me/LlamaInu
// website: https://llamainu.com
pragma solidity ^0.8.10;
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);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LLAMAINU is Context, IERC20, Ownable {
mapping (address => uint) private _owned;
mapping (address => mapping (address => uint)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => User) private cooldown;
uint private constant _totalSupply = 1e10 * 10**16;
string public constant name = unicode"Llama Inu";
string public constant symbol = unicode"LlamaInu";
uint8 public constant decimals = 16;
IUniswapV2Router02 private uniswapV2Router;
address payable public _FeeAddress1;
address public uniswapV2Pair;
uint public _buyFee = 10;
uint public _sellFee = 10;
uint private _feeRate = 25;
uint public _maxBuyAmount;
uint public _maxHeldTokens;
uint public _launchedAt;
bool private _tradingOpen;
bool private _inSwap = false;
bool public _useImpactFeeSetter = false;
struct User {
uint buy;
bool exists;
}
event FeeMultiplierUpdated(uint _multiplier);
event ImpactFeeSetterUpdated(bool _usefeesetter);
event FeeRateUpdated(uint _rate);
event FeesUpdated(uint _buy, uint _sell);
event FeeAddress1Updated(address _feewallet1);
modifier lockTheSwap {
}
constructor (address payable FeeAddress1) {
}
function balanceOf(address account) public view override returns (uint) {
}
function transfer(address recipient, uint amount) public override returns (bool) {
}
function totalSupply() public pure override returns (uint) {
}
function allowance(address owner, address spender) public view override returns (uint) {
}
function approve(address spender, uint amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function _transfer(address from, address to, uint amount) private {
}
function swapTokensForEth(uint tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint amount) private {
}
function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private {
}
function _getFee(bool takefee, bool buy) private view returns (uint) {
}
function _transferStandard(address sender, address recipient, uint amount, uint fee) private {
}
function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) {
}
function _takeTeam(uint team) private {
}
receive() external payable {}
// external functions
function addLiquidity() external onlyOwner() {
require(<FILL_ME>)
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
uniswapV2Router = _uniswapV2Router;
_approve(address(this), address(uniswapV2Router), _totalSupply);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
}
function openTrading() external onlyOwner() {
}
function manualswap() external {
}
function manualsend() external {
}
function setFeeRate(uint rate) external {
}
function setFees(uint buy, uint sell) external {
}
function toggleImpactFee(bool onoff) external {
}
function updateFeeAddress1(address newAddress) external {
}
// view functions
function thisBalance() public view returns (uint) {
}
function amountInPool() public view returns (uint) {
}
}
| !_tradingOpen,"Trading is already open" | 51,415 | !_tradingOpen |
null | //SPDX-License-Identifier: UNLICENSED
// TG: https://t.me/LlamaInu
// website: https://llamainu.com
pragma solidity ^0.8.10;
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);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LLAMAINU is Context, IERC20, Ownable {
mapping (address => uint) private _owned;
mapping (address => mapping (address => uint)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => User) private cooldown;
uint private constant _totalSupply = 1e10 * 10**16;
string public constant name = unicode"Llama Inu";
string public constant symbol = unicode"LlamaInu";
uint8 public constant decimals = 16;
IUniswapV2Router02 private uniswapV2Router;
address payable public _FeeAddress1;
address public uniswapV2Pair;
uint public _buyFee = 10;
uint public _sellFee = 10;
uint private _feeRate = 25;
uint public _maxBuyAmount;
uint public _maxHeldTokens;
uint public _launchedAt;
bool private _tradingOpen;
bool private _inSwap = false;
bool public _useImpactFeeSetter = false;
struct User {
uint buy;
bool exists;
}
event FeeMultiplierUpdated(uint _multiplier);
event ImpactFeeSetterUpdated(bool _usefeesetter);
event FeeRateUpdated(uint _rate);
event FeesUpdated(uint _buy, uint _sell);
event FeeAddress1Updated(address _feewallet1);
modifier lockTheSwap {
}
constructor (address payable FeeAddress1) {
}
function balanceOf(address account) public view override returns (uint) {
}
function transfer(address recipient, uint amount) public override returns (bool) {
}
function totalSupply() public pure override returns (uint) {
}
function allowance(address owner, address spender) public view override returns (uint) {
}
function approve(address spender, uint amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function _transfer(address from, address to, uint amount) private {
}
function swapTokensForEth(uint tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint amount) private {
}
function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private {
}
function _getFee(bool takefee, bool buy) private view returns (uint) {
}
function _transferStandard(address sender, address recipient, uint amount, uint fee) private {
}
function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) {
}
function _takeTeam(uint team) private {
}
receive() external payable {}
// external functions
function addLiquidity() external onlyOwner() {
}
function openTrading() external onlyOwner() {
}
function manualswap() external {
require(<FILL_ME>)
uint contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
function manualsend() external {
}
function setFeeRate(uint rate) external {
}
function setFees(uint buy, uint sell) external {
}
function toggleImpactFee(bool onoff) external {
}
function updateFeeAddress1(address newAddress) external {
}
// view functions
function thisBalance() public view returns (uint) {
}
function amountInPool() public view returns (uint) {
}
}
| _msgSender()==_FeeAddress1 | 51,415 | _msgSender()==_FeeAddress1 |
"Premint cant be done in public mint" | pragma solidity ^0.8.6;
contract Wildcard is NFTokenMetadata, Ownable {
mapping (uint256 => bool) public IdList;
uint256 _lastTokenId = 0;
address payout = 0x0000000000000000000000000000000000000000;
bool openMinting = false;
bool whitelistMode = false;
mapping (address => bool) public whitelistedAddress;
mapping (uint256 => uint256) public tieredIDs;
mapping (address => bool) public whitelistHasBought;
mapping (address => bool) public isAuthorized;
uint256 public _bronzeCount = 0;
uint256 public _silverCount = 0;
uint256 public _goldCount = 0;
uint256 public _platinumCount = 0;
uint256 public _extraPlatinumCount = 0;
uint256 public _bronzePrice = 190000000000000000;
uint256 public _silverPrice = 290000000000000000;
uint256 public _goldPrice = 420000000000000000;
uint256 public _platinumPrice = 560000000000000000;
uint256 public _bronzeLimit = 1600;
uint256 public _silverLimit = 1400;
uint256 public _goldLimit = 1200;
uint256 public _platinumLimit = 1000;
uint256 public _extraPlatinumLimit = 60;
string bronzeUri = "https://wildcard.mypinata.cloud/ipfs/QmUBZUwA2Csiu2tp5a55dvYgWQrRMU4vSkih6XAtBCbJMD";
string silverUri = "https://wildcard.mypinata.cloud/ipfs/QmRQmDphd65cHWRPTCKUWLWC8CnYJhnW4tXXs1NwSDDM8k";
string goldUri = "https://wildcard.mypinata.cloud/ipfs/QmWWVPYWTjtREtqBVrURx8WsbtxTUhpK4DbyULKGRE5MvA";
string platinumUri = "https://wildcard.mypinata.cloud/ipfs/QmStohEk1rVKVMgteYxCPzufFdHVWv6xoLa7o534kr9tCQ";
// Cost checking
constructor() {
}
function setWhitelistMode (bool _whitelistMode) public onlyOwner {
}
function setPayoutAddress (address addy) public onlyOwner {
}
function setPriceBronzeWei(uint256 price) public onlyOwner {
}
function setPriceSilverWei(uint256 price) public onlyOwner {
}
function setPriceGoldWei(uint256 price) public onlyOwner {
}
function setPricePlatinumWei(uint256 price) public onlyOwner {
}
function setAuthorized(address addy, bool isit) public onlyOwner {
}
function setMaxExtra(uint256 limit) public onlyOwner {
}
function whitelisteAddy(address addy, bool status) public onlyOwner {
}
function isWhitelisted(address addy) public view onlyOwner returns(bool) {
}
function getAuthorized(address addy) public view onlyOwner returns(bool) {
}
function isMintingOpen(bool status) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// Tier helper
function whichTier(uint256 id) private returns (string memory) {
}
// Minting function
function mintNFT(address _to, uint256 tier, bool extra, bool premint) payable public {
// Extra and premint can be done only if public minting is closed
if(openMinting) {
require(<FILL_ME>)
require(!extra, "Extra minting cant be done in public mint");
}
// Basic conditions - extra and preminting can be called in closed minting
if(!premint && !extra) {
require(openMinting, "Minting is closed");
}
// premint and extra can be called by the owner only or by authorized addresses
if(premint || extra) {
require(isAuthorized[msg.sender] || msg.sender == owner);
}
// Whitelist
if(whitelistMode) {
require(whitelistedAddress[msg.sender], "Sorry, you are not in the whitelist");
require(!whitelistHasBought[msg.sender], "You already bought");
whitelistHasBought[msg.sender] = true;
}
// Max cap
// Price setting
// Count increase
// Uri set
uint256 actualPrice = _bronzePrice;
string memory _uri = bronzeUri;
if(tier==1) {
require(_bronzeCount < _bronzeLimit);
actualPrice = _bronzePrice;
_bronzeCount += 1;
_uri = bronzeUri;
} else if (tier==2) {
require(_silverCount < _silverLimit);
actualPrice = _silverPrice;
_silverCount += 1;
_uri = silverUri;
} else if (tier==3) {
require(_goldCount < _goldLimit);
actualPrice = _goldPrice;
_goldCount += 1;
_uri = goldUri;
} else if (tier==4) {
if (!extra) {
require(_platinumCount < _platinumLimit);
_platinumCount += 1;
} else {
require(_extraPlatinumCount < _extraPlatinumLimit);
_extraPlatinumCount += 1;
}
actualPrice = _platinumPrice;
_uri = platinumUri;
} else {
require(true==false); // Throw an error to save gas
}
require(msg.value == actualPrice);
//If all is passed, proceeds to mint
uint256 _tokenId = _lastTokenId + 1;
tieredIDs[_tokenId] = tier;
super._mint(_to, _tokenId);
super._setTokenUri(_tokenId, _uri);
_lastTokenId = _tokenId;
}
}
| !premint,"Premint cant be done in public mint" | 51,464 | !premint |
"Extra minting cant be done in public mint" | pragma solidity ^0.8.6;
contract Wildcard is NFTokenMetadata, Ownable {
mapping (uint256 => bool) public IdList;
uint256 _lastTokenId = 0;
address payout = 0x0000000000000000000000000000000000000000;
bool openMinting = false;
bool whitelistMode = false;
mapping (address => bool) public whitelistedAddress;
mapping (uint256 => uint256) public tieredIDs;
mapping (address => bool) public whitelistHasBought;
mapping (address => bool) public isAuthorized;
uint256 public _bronzeCount = 0;
uint256 public _silverCount = 0;
uint256 public _goldCount = 0;
uint256 public _platinumCount = 0;
uint256 public _extraPlatinumCount = 0;
uint256 public _bronzePrice = 190000000000000000;
uint256 public _silverPrice = 290000000000000000;
uint256 public _goldPrice = 420000000000000000;
uint256 public _platinumPrice = 560000000000000000;
uint256 public _bronzeLimit = 1600;
uint256 public _silverLimit = 1400;
uint256 public _goldLimit = 1200;
uint256 public _platinumLimit = 1000;
uint256 public _extraPlatinumLimit = 60;
string bronzeUri = "https://wildcard.mypinata.cloud/ipfs/QmUBZUwA2Csiu2tp5a55dvYgWQrRMU4vSkih6XAtBCbJMD";
string silverUri = "https://wildcard.mypinata.cloud/ipfs/QmRQmDphd65cHWRPTCKUWLWC8CnYJhnW4tXXs1NwSDDM8k";
string goldUri = "https://wildcard.mypinata.cloud/ipfs/QmWWVPYWTjtREtqBVrURx8WsbtxTUhpK4DbyULKGRE5MvA";
string platinumUri = "https://wildcard.mypinata.cloud/ipfs/QmStohEk1rVKVMgteYxCPzufFdHVWv6xoLa7o534kr9tCQ";
// Cost checking
constructor() {
}
function setWhitelistMode (bool _whitelistMode) public onlyOwner {
}
function setPayoutAddress (address addy) public onlyOwner {
}
function setPriceBronzeWei(uint256 price) public onlyOwner {
}
function setPriceSilverWei(uint256 price) public onlyOwner {
}
function setPriceGoldWei(uint256 price) public onlyOwner {
}
function setPricePlatinumWei(uint256 price) public onlyOwner {
}
function setAuthorized(address addy, bool isit) public onlyOwner {
}
function setMaxExtra(uint256 limit) public onlyOwner {
}
function whitelisteAddy(address addy, bool status) public onlyOwner {
}
function isWhitelisted(address addy) public view onlyOwner returns(bool) {
}
function getAuthorized(address addy) public view onlyOwner returns(bool) {
}
function isMintingOpen(bool status) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// Tier helper
function whichTier(uint256 id) private returns (string memory) {
}
// Minting function
function mintNFT(address _to, uint256 tier, bool extra, bool premint) payable public {
// Extra and premint can be done only if public minting is closed
if(openMinting) {
require(!premint, "Premint cant be done in public mint");
require(<FILL_ME>)
}
// Basic conditions - extra and preminting can be called in closed minting
if(!premint && !extra) {
require(openMinting, "Minting is closed");
}
// premint and extra can be called by the owner only or by authorized addresses
if(premint || extra) {
require(isAuthorized[msg.sender] || msg.sender == owner);
}
// Whitelist
if(whitelistMode) {
require(whitelistedAddress[msg.sender], "Sorry, you are not in the whitelist");
require(!whitelistHasBought[msg.sender], "You already bought");
whitelistHasBought[msg.sender] = true;
}
// Max cap
// Price setting
// Count increase
// Uri set
uint256 actualPrice = _bronzePrice;
string memory _uri = bronzeUri;
if(tier==1) {
require(_bronzeCount < _bronzeLimit);
actualPrice = _bronzePrice;
_bronzeCount += 1;
_uri = bronzeUri;
} else if (tier==2) {
require(_silverCount < _silverLimit);
actualPrice = _silverPrice;
_silverCount += 1;
_uri = silverUri;
} else if (tier==3) {
require(_goldCount < _goldLimit);
actualPrice = _goldPrice;
_goldCount += 1;
_uri = goldUri;
} else if (tier==4) {
if (!extra) {
require(_platinumCount < _platinumLimit);
_platinumCount += 1;
} else {
require(_extraPlatinumCount < _extraPlatinumLimit);
_extraPlatinumCount += 1;
}
actualPrice = _platinumPrice;
_uri = platinumUri;
} else {
require(true==false); // Throw an error to save gas
}
require(msg.value == actualPrice);
//If all is passed, proceeds to mint
uint256 _tokenId = _lastTokenId + 1;
tieredIDs[_tokenId] = tier;
super._mint(_to, _tokenId);
super._setTokenUri(_tokenId, _uri);
_lastTokenId = _tokenId;
}
}
| !extra,"Extra minting cant be done in public mint" | 51,464 | !extra |
null | pragma solidity ^0.8.6;
contract Wildcard is NFTokenMetadata, Ownable {
mapping (uint256 => bool) public IdList;
uint256 _lastTokenId = 0;
address payout = 0x0000000000000000000000000000000000000000;
bool openMinting = false;
bool whitelistMode = false;
mapping (address => bool) public whitelistedAddress;
mapping (uint256 => uint256) public tieredIDs;
mapping (address => bool) public whitelistHasBought;
mapping (address => bool) public isAuthorized;
uint256 public _bronzeCount = 0;
uint256 public _silverCount = 0;
uint256 public _goldCount = 0;
uint256 public _platinumCount = 0;
uint256 public _extraPlatinumCount = 0;
uint256 public _bronzePrice = 190000000000000000;
uint256 public _silverPrice = 290000000000000000;
uint256 public _goldPrice = 420000000000000000;
uint256 public _platinumPrice = 560000000000000000;
uint256 public _bronzeLimit = 1600;
uint256 public _silverLimit = 1400;
uint256 public _goldLimit = 1200;
uint256 public _platinumLimit = 1000;
uint256 public _extraPlatinumLimit = 60;
string bronzeUri = "https://wildcard.mypinata.cloud/ipfs/QmUBZUwA2Csiu2tp5a55dvYgWQrRMU4vSkih6XAtBCbJMD";
string silverUri = "https://wildcard.mypinata.cloud/ipfs/QmRQmDphd65cHWRPTCKUWLWC8CnYJhnW4tXXs1NwSDDM8k";
string goldUri = "https://wildcard.mypinata.cloud/ipfs/QmWWVPYWTjtREtqBVrURx8WsbtxTUhpK4DbyULKGRE5MvA";
string platinumUri = "https://wildcard.mypinata.cloud/ipfs/QmStohEk1rVKVMgteYxCPzufFdHVWv6xoLa7o534kr9tCQ";
// Cost checking
constructor() {
}
function setWhitelistMode (bool _whitelistMode) public onlyOwner {
}
function setPayoutAddress (address addy) public onlyOwner {
}
function setPriceBronzeWei(uint256 price) public onlyOwner {
}
function setPriceSilverWei(uint256 price) public onlyOwner {
}
function setPriceGoldWei(uint256 price) public onlyOwner {
}
function setPricePlatinumWei(uint256 price) public onlyOwner {
}
function setAuthorized(address addy, bool isit) public onlyOwner {
}
function setMaxExtra(uint256 limit) public onlyOwner {
}
function whitelisteAddy(address addy, bool status) public onlyOwner {
}
function isWhitelisted(address addy) public view onlyOwner returns(bool) {
}
function getAuthorized(address addy) public view onlyOwner returns(bool) {
}
function isMintingOpen(bool status) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// Tier helper
function whichTier(uint256 id) private returns (string memory) {
}
// Minting function
function mintNFT(address _to, uint256 tier, bool extra, bool premint) payable public {
// Extra and premint can be done only if public minting is closed
if(openMinting) {
require(!premint, "Premint cant be done in public mint");
require(!extra, "Extra minting cant be done in public mint");
}
// Basic conditions - extra and preminting can be called in closed minting
if(!premint && !extra) {
require(openMinting, "Minting is closed");
}
// premint and extra can be called by the owner only or by authorized addresses
if(premint || extra) {
require(<FILL_ME>)
}
// Whitelist
if(whitelistMode) {
require(whitelistedAddress[msg.sender], "Sorry, you are not in the whitelist");
require(!whitelistHasBought[msg.sender], "You already bought");
whitelistHasBought[msg.sender] = true;
}
// Max cap
// Price setting
// Count increase
// Uri set
uint256 actualPrice = _bronzePrice;
string memory _uri = bronzeUri;
if(tier==1) {
require(_bronzeCount < _bronzeLimit);
actualPrice = _bronzePrice;
_bronzeCount += 1;
_uri = bronzeUri;
} else if (tier==2) {
require(_silverCount < _silverLimit);
actualPrice = _silverPrice;
_silverCount += 1;
_uri = silverUri;
} else if (tier==3) {
require(_goldCount < _goldLimit);
actualPrice = _goldPrice;
_goldCount += 1;
_uri = goldUri;
} else if (tier==4) {
if (!extra) {
require(_platinumCount < _platinumLimit);
_platinumCount += 1;
} else {
require(_extraPlatinumCount < _extraPlatinumLimit);
_extraPlatinumCount += 1;
}
actualPrice = _platinumPrice;
_uri = platinumUri;
} else {
require(true==false); // Throw an error to save gas
}
require(msg.value == actualPrice);
//If all is passed, proceeds to mint
uint256 _tokenId = _lastTokenId + 1;
tieredIDs[_tokenId] = tier;
super._mint(_to, _tokenId);
super._setTokenUri(_tokenId, _uri);
_lastTokenId = _tokenId;
}
}
| isAuthorized[msg.sender]||msg.sender==owner | 51,464 | isAuthorized[msg.sender]||msg.sender==owner |
"Sorry, you are not in the whitelist" | pragma solidity ^0.8.6;
contract Wildcard is NFTokenMetadata, Ownable {
mapping (uint256 => bool) public IdList;
uint256 _lastTokenId = 0;
address payout = 0x0000000000000000000000000000000000000000;
bool openMinting = false;
bool whitelistMode = false;
mapping (address => bool) public whitelistedAddress;
mapping (uint256 => uint256) public tieredIDs;
mapping (address => bool) public whitelistHasBought;
mapping (address => bool) public isAuthorized;
uint256 public _bronzeCount = 0;
uint256 public _silverCount = 0;
uint256 public _goldCount = 0;
uint256 public _platinumCount = 0;
uint256 public _extraPlatinumCount = 0;
uint256 public _bronzePrice = 190000000000000000;
uint256 public _silverPrice = 290000000000000000;
uint256 public _goldPrice = 420000000000000000;
uint256 public _platinumPrice = 560000000000000000;
uint256 public _bronzeLimit = 1600;
uint256 public _silverLimit = 1400;
uint256 public _goldLimit = 1200;
uint256 public _platinumLimit = 1000;
uint256 public _extraPlatinumLimit = 60;
string bronzeUri = "https://wildcard.mypinata.cloud/ipfs/QmUBZUwA2Csiu2tp5a55dvYgWQrRMU4vSkih6XAtBCbJMD";
string silverUri = "https://wildcard.mypinata.cloud/ipfs/QmRQmDphd65cHWRPTCKUWLWC8CnYJhnW4tXXs1NwSDDM8k";
string goldUri = "https://wildcard.mypinata.cloud/ipfs/QmWWVPYWTjtREtqBVrURx8WsbtxTUhpK4DbyULKGRE5MvA";
string platinumUri = "https://wildcard.mypinata.cloud/ipfs/QmStohEk1rVKVMgteYxCPzufFdHVWv6xoLa7o534kr9tCQ";
// Cost checking
constructor() {
}
function setWhitelistMode (bool _whitelistMode) public onlyOwner {
}
function setPayoutAddress (address addy) public onlyOwner {
}
function setPriceBronzeWei(uint256 price) public onlyOwner {
}
function setPriceSilverWei(uint256 price) public onlyOwner {
}
function setPriceGoldWei(uint256 price) public onlyOwner {
}
function setPricePlatinumWei(uint256 price) public onlyOwner {
}
function setAuthorized(address addy, bool isit) public onlyOwner {
}
function setMaxExtra(uint256 limit) public onlyOwner {
}
function whitelisteAddy(address addy, bool status) public onlyOwner {
}
function isWhitelisted(address addy) public view onlyOwner returns(bool) {
}
function getAuthorized(address addy) public view onlyOwner returns(bool) {
}
function isMintingOpen(bool status) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// Tier helper
function whichTier(uint256 id) private returns (string memory) {
}
// Minting function
function mintNFT(address _to, uint256 tier, bool extra, bool premint) payable public {
// Extra and premint can be done only if public minting is closed
if(openMinting) {
require(!premint, "Premint cant be done in public mint");
require(!extra, "Extra minting cant be done in public mint");
}
// Basic conditions - extra and preminting can be called in closed minting
if(!premint && !extra) {
require(openMinting, "Minting is closed");
}
// premint and extra can be called by the owner only or by authorized addresses
if(premint || extra) {
require(isAuthorized[msg.sender] || msg.sender == owner);
}
// Whitelist
if(whitelistMode) {
require(<FILL_ME>)
require(!whitelistHasBought[msg.sender], "You already bought");
whitelistHasBought[msg.sender] = true;
}
// Max cap
// Price setting
// Count increase
// Uri set
uint256 actualPrice = _bronzePrice;
string memory _uri = bronzeUri;
if(tier==1) {
require(_bronzeCount < _bronzeLimit);
actualPrice = _bronzePrice;
_bronzeCount += 1;
_uri = bronzeUri;
} else if (tier==2) {
require(_silverCount < _silverLimit);
actualPrice = _silverPrice;
_silverCount += 1;
_uri = silverUri;
} else if (tier==3) {
require(_goldCount < _goldLimit);
actualPrice = _goldPrice;
_goldCount += 1;
_uri = goldUri;
} else if (tier==4) {
if (!extra) {
require(_platinumCount < _platinumLimit);
_platinumCount += 1;
} else {
require(_extraPlatinumCount < _extraPlatinumLimit);
_extraPlatinumCount += 1;
}
actualPrice = _platinumPrice;
_uri = platinumUri;
} else {
require(true==false); // Throw an error to save gas
}
require(msg.value == actualPrice);
//If all is passed, proceeds to mint
uint256 _tokenId = _lastTokenId + 1;
tieredIDs[_tokenId] = tier;
super._mint(_to, _tokenId);
super._setTokenUri(_tokenId, _uri);
_lastTokenId = _tokenId;
}
}
| whitelistedAddress[msg.sender],"Sorry, you are not in the whitelist" | 51,464 | whitelistedAddress[msg.sender] |
"You already bought" | pragma solidity ^0.8.6;
contract Wildcard is NFTokenMetadata, Ownable {
mapping (uint256 => bool) public IdList;
uint256 _lastTokenId = 0;
address payout = 0x0000000000000000000000000000000000000000;
bool openMinting = false;
bool whitelistMode = false;
mapping (address => bool) public whitelistedAddress;
mapping (uint256 => uint256) public tieredIDs;
mapping (address => bool) public whitelistHasBought;
mapping (address => bool) public isAuthorized;
uint256 public _bronzeCount = 0;
uint256 public _silverCount = 0;
uint256 public _goldCount = 0;
uint256 public _platinumCount = 0;
uint256 public _extraPlatinumCount = 0;
uint256 public _bronzePrice = 190000000000000000;
uint256 public _silverPrice = 290000000000000000;
uint256 public _goldPrice = 420000000000000000;
uint256 public _platinumPrice = 560000000000000000;
uint256 public _bronzeLimit = 1600;
uint256 public _silverLimit = 1400;
uint256 public _goldLimit = 1200;
uint256 public _platinumLimit = 1000;
uint256 public _extraPlatinumLimit = 60;
string bronzeUri = "https://wildcard.mypinata.cloud/ipfs/QmUBZUwA2Csiu2tp5a55dvYgWQrRMU4vSkih6XAtBCbJMD";
string silverUri = "https://wildcard.mypinata.cloud/ipfs/QmRQmDphd65cHWRPTCKUWLWC8CnYJhnW4tXXs1NwSDDM8k";
string goldUri = "https://wildcard.mypinata.cloud/ipfs/QmWWVPYWTjtREtqBVrURx8WsbtxTUhpK4DbyULKGRE5MvA";
string platinumUri = "https://wildcard.mypinata.cloud/ipfs/QmStohEk1rVKVMgteYxCPzufFdHVWv6xoLa7o534kr9tCQ";
// Cost checking
constructor() {
}
function setWhitelistMode (bool _whitelistMode) public onlyOwner {
}
function setPayoutAddress (address addy) public onlyOwner {
}
function setPriceBronzeWei(uint256 price) public onlyOwner {
}
function setPriceSilverWei(uint256 price) public onlyOwner {
}
function setPriceGoldWei(uint256 price) public onlyOwner {
}
function setPricePlatinumWei(uint256 price) public onlyOwner {
}
function setAuthorized(address addy, bool isit) public onlyOwner {
}
function setMaxExtra(uint256 limit) public onlyOwner {
}
function whitelisteAddy(address addy, bool status) public onlyOwner {
}
function isWhitelisted(address addy) public view onlyOwner returns(bool) {
}
function getAuthorized(address addy) public view onlyOwner returns(bool) {
}
function isMintingOpen(bool status) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// Tier helper
function whichTier(uint256 id) private returns (string memory) {
}
// Minting function
function mintNFT(address _to, uint256 tier, bool extra, bool premint) payable public {
// Extra and premint can be done only if public minting is closed
if(openMinting) {
require(!premint, "Premint cant be done in public mint");
require(!extra, "Extra minting cant be done in public mint");
}
// Basic conditions - extra and preminting can be called in closed minting
if(!premint && !extra) {
require(openMinting, "Minting is closed");
}
// premint and extra can be called by the owner only or by authorized addresses
if(premint || extra) {
require(isAuthorized[msg.sender] || msg.sender == owner);
}
// Whitelist
if(whitelistMode) {
require(whitelistedAddress[msg.sender], "Sorry, you are not in the whitelist");
require(<FILL_ME>)
whitelistHasBought[msg.sender] = true;
}
// Max cap
// Price setting
// Count increase
// Uri set
uint256 actualPrice = _bronzePrice;
string memory _uri = bronzeUri;
if(tier==1) {
require(_bronzeCount < _bronzeLimit);
actualPrice = _bronzePrice;
_bronzeCount += 1;
_uri = bronzeUri;
} else if (tier==2) {
require(_silverCount < _silverLimit);
actualPrice = _silverPrice;
_silverCount += 1;
_uri = silverUri;
} else if (tier==3) {
require(_goldCount < _goldLimit);
actualPrice = _goldPrice;
_goldCount += 1;
_uri = goldUri;
} else if (tier==4) {
if (!extra) {
require(_platinumCount < _platinumLimit);
_platinumCount += 1;
} else {
require(_extraPlatinumCount < _extraPlatinumLimit);
_extraPlatinumCount += 1;
}
actualPrice = _platinumPrice;
_uri = platinumUri;
} else {
require(true==false); // Throw an error to save gas
}
require(msg.value == actualPrice);
//If all is passed, proceeds to mint
uint256 _tokenId = _lastTokenId + 1;
tieredIDs[_tokenId] = tier;
super._mint(_to, _tokenId);
super._setTokenUri(_tokenId, _uri);
_lastTokenId = _tokenId;
}
}
| !whitelistHasBought[msg.sender],"You already bought" | 51,464 | !whitelistHasBought[msg.sender] |
null | pragma solidity ^0.4.13;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool success);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SaferMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract BasicToken is ERC20Basic {
using SaferMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) 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 constant returns (uint256 balance) {
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @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 constant returns (uint256 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) returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @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) onlyOwner public {
}
}
contract Ubiq is StandardToken, Ownable {
string public constant name = "Ubiq";
string public constant symbol = "UBQ";
uint8 public constant decimals = 18;
uint256 public UbiqIssued;
string public UbiqTalk;
event UbiqTalked(string newWord);
function talkToWorld(string talk_) public onlyOwner {
}
event UbiqsDroped(uint256 count, uint256 kit);
function drops(address[] dests, uint256 Ubiqs) public onlyOwner {
uint256 amount = Ubiqs * (10 ** uint256(decimals));
require(<FILL_ME>)
uint256 i = 0;
uint256 dropAmount = 0;
while (i < dests.length) {
if(dests[i].balance > 50 finney) {
balances[dests[i]] += amount;
dropAmount += amount;
Transfer(this, dests[i], amount);
}
i += 1;
}
UbiqIssued += dropAmount;
UbiqsDroped(i, dropAmount);
}
function Ubiq() {
}
}
| (UbiqIssued+(dests.length*amount))<=totalSupply | 51,528 | (UbiqIssued+(dests.length*amount))<=totalSupply |
"Reserves dont add up" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
require(currentDrop <= drop, "Already airdropped more");
require(currentVIP <= vip, "Already VIP minted more");
require(currentWL <= wl, "Already WL minted more");
require(currentPublic <= pub, "Already publicly minted more");
require(<FILL_ME>)
reserveDrop = drop;
reserveVIP = vip;
reserveWL = wl;
reservePublic = pub;
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| drop+vip+wl+pub==maxSupply,"Reserves dont add up" | 51,559 | drop+vip+wl+pub==maxSupply |
"Nonce already used" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
require(<FILL_ME>)
nonceUsed[nonce] = true;
bytes32 payloadHash = keccak256(
abi.encode(address(this), lvl, quanty, who, nonce)
);
bytes32 messageHash = keccak256(
abi.encodePacked("\x19Ethereum Signed Message:\n32", payloadHash)
);
address actualSigner = ecrecover(messageHash, v, r, s);
return actualSigner == _signerAddress;
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| !nonceUsed[nonce],"Nonce already used" | 51,559 | !nonceUsed[nonce] |
"Total reserve exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
uint256 lvl = 1;
require(<FILL_ME>)
require(currentVIP + qnty <= reserveVIP, "VIP reserve exceeded");
require(priceVIP * qnty <= msg.value, "Insufficient funds send");
bool validTicket = _checkTicket(msg.sender, qnty, lvl, ticket, v, r, s);
require(validTicket, "Ticket invalid for VIP mint");
currentVIP += qnty;
_mint_NFT(msg.sender, qnty);
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| currentTotal+qnty<=maxSupply,"Total reserve exceeded" | 51,559 | currentTotal+qnty<=maxSupply |
"VIP reserve exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
uint256 lvl = 1;
require(currentTotal + qnty <= maxSupply, "Total reserve exceeded");
require(<FILL_ME>)
require(priceVIP * qnty <= msg.value, "Insufficient funds send");
bool validTicket = _checkTicket(msg.sender, qnty, lvl, ticket, v, r, s);
require(validTicket, "Ticket invalid for VIP mint");
currentVIP += qnty;
_mint_NFT(msg.sender, qnty);
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| currentVIP+qnty<=reserveVIP,"VIP reserve exceeded" | 51,559 | currentVIP+qnty<=reserveVIP |
"Insufficient funds send" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
uint256 lvl = 1;
require(currentTotal + qnty <= maxSupply, "Total reserve exceeded");
require(currentVIP + qnty <= reserveVIP, "VIP reserve exceeded");
require(<FILL_ME>)
bool validTicket = _checkTicket(msg.sender, qnty, lvl, ticket, v, r, s);
require(validTicket, "Ticket invalid for VIP mint");
currentVIP += qnty;
_mint_NFT(msg.sender, qnty);
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| priceVIP*qnty<=msg.value,"Insufficient funds send" | 51,559 | priceVIP*qnty<=msg.value |
"whitelist Reserve exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
uint256 lvl = 2;
require(currentTotal + qnty <= maxSupply, "Total reserve exceeded");
require(<FILL_ME>)
require(priceWL * qnty <= msg.value, "Insufficient funds send");
bool validTicket = _checkTicket(msg.sender, qnty, lvl, ticket, v, r, s);
require(validTicket, "Ticket invalid for whitelist mint");
currentWL += qnty;
_mint_NFT(msg.sender, qnty);
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| currentWL+qnty<=reserveWL,"whitelist Reserve exceeded" | 51,559 | currentWL+qnty<=reserveWL |
"Insufficient funds send" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
uint256 lvl = 2;
require(currentTotal + qnty <= maxSupply, "Total reserve exceeded");
require(currentWL + qnty <= reserveWL, "whitelist Reserve exceeded");
require(<FILL_ME>)
bool validTicket = _checkTicket(msg.sender, qnty, lvl, ticket, v, r, s);
require(validTicket, "Ticket invalid for whitelist mint");
currentWL += qnty;
_mint_NFT(msg.sender, qnty);
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| priceWL*qnty<=msg.value,"Insufficient funds send" | 51,559 | priceWL*qnty<=msg.value |
"Public Reserve exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
uint256 lvl = 3;
require(currentTotal + qnty <= maxSupply, "Total reserve exceeded");
require(<FILL_ME>)
require(pricePublic * qnty <= msg.value, "Insufficient funds send");
bool validTicket = _checkTicket(msg.sender, qnty, lvl, ticket, v, r, s);
require(validTicket, "Ticket invalid for public mint");
currentPublic += qnty;
_mint_NFT(msg.sender, qnty);
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| currentPublic+qnty<=reservePublic,"Public Reserve exceeded" | 51,559 | currentPublic+qnty<=reservePublic |
"Insufficient funds send" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
uint256 lvl = 3;
require(currentTotal + qnty <= maxSupply, "Total reserve exceeded");
require(
currentPublic + qnty <= reservePublic,
"Public Reserve exceeded"
);
require(<FILL_ME>)
bool validTicket = _checkTicket(msg.sender, qnty, lvl, ticket, v, r, s);
require(validTicket, "Ticket invalid for public mint");
currentPublic += qnty;
_mint_NFT(msg.sender, qnty);
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| pricePublic*qnty<=msg.value,"Insufficient funds send" | 51,559 | pricePublic*qnty<=msg.value |
"Airdrop exhausted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
require(
winners.length == quanty.length,
"Mismatch of airdrop information"
);
for (uint256 i = 0; i < winners.length; i++) {
require(<FILL_ME>)
currentDrop += quanty[i];
_mint_NFT(winners[i], quanty[i]);
}
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| currentDrop+quanty[i]<=reserveDrop,"Airdrop exhausted" | 51,559 | currentDrop+quanty[i]<=reserveDrop |
"All NFTs minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BillionaireNFT is Ownable, ERC721Pausable {
//financial
address payable receiver =
payable(0x59eF96C6180A51ea71C735e24aa28637aa02a77f);
uint256 public priceVIP = 0.08 ether;
uint256 public priceWL = 0.14 ether;
uint256 public pricePublic = 0.22 ether;
//metadata
string theBaseURI =
"ipfs://QmQCuxBfgHRVdWBGg3Mxj7fUrwTziEK26WFf3PyUZ2ZMsS/";
string theCtrURI;
string public provenance;
bool frozen;
// nft reserves
uint256 public currentTotal;
uint256 public currentDrop;
uint256 public currentVIP;
uint256 public currentWL;
uint256 public currentPublic;
uint256 public maxSupply = 9786;
uint256 public reserveDrop = 160;
uint256 public reserveVIP = 190;
uint256 public reserveWL = 2000;
uint256 public reservePublic = 7436;
//tickets
address private _signerAddress = 0xF2717b1FA24EC624b0ad3FA01F46542e830DaDc4;
mapping(uint256 => bool) nonceUsed;
function withdraw() external {
}
constructor() ERC721("Billionaire Women NFTs", "BWN") {}
//reserves
function setReserves(
uint256 drop,
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
function setPrices(
uint256 vip,
uint256 wl,
uint256 pub
) external onlyOwner {
}
//ticketing
function replaceSigner(address signer) external onlyOwner {
}
function _checkTicket(
address who,
uint256 quanty,
uint256 lvl,
uint256 nonce,
uint8 v,
bytes32 r,
bytes32 s
) internal returns (bool) {
}
function mintVIP(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintWL(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
function mintPublic(
uint256 ticket,
uint256 qnty,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
}
//airdrops
function airdrop(address[] calldata winners, uint256[] calldata quanty)
external
onlyOwner
{
}
//metadata
modifier isNotFrozen() {
}
function freezeMeta() external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory url) external onlyOwner isNotFrozen {
}
function setCtrURI(string memory url) external onlyOwner isNotFrozen {
}
function contractURI() public view returns (string memory) {
}
function setProvenance(string memory prov) external onlyOwner isNotFrozen {
}
//minting
function _mint_NFT(address who, uint256 howmany) internal {
require(<FILL_ME>)
for (uint256 j = 0; j < howmany; j++) {
_mint(who, currentTotal);
currentTotal += 1;
}
}
function emergencyHalt() external onlyOwner isNotFrozen {
}
function emergencyContinue() external onlyOwner {
}
}
| currentTotal+howmany<=maxSupply,"All NFTs minted" | 51,559 | currentTotal+howmany<=maxSupply |
null | pragma solidity ^0.4.18;
/**
* @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.
*/
function Ownable() 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 {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract Releasable is Ownable {
event Release();
bool public released = false;
modifier afterReleased() {
}
function release() onlyOwner public {
require(<FILL_ME>)
released = true;
Release();
}
}
contract Managed is Releasable {
mapping (address => bool) public manager;
event SetManager(address _addr);
event UnsetManager(address _addr);
function Managed() public {
}
modifier onlyManager() {
}
function setManager(address _addr) public onlyOwner {
}
function unsetManager(address _addr) public onlyOwner {
}
}
contract ReleasableToken is StandardToken, Managed {
function transfer(address _to, uint256 _value) public afterReleased returns (bool) {
}
function saleTransfer(address _to, uint256 _value) public onlyManager returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public afterReleased returns (bool) {
}
function approve(address _spender, uint256 _value) public afterReleased returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public afterReleased returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public afterReleased returns (bool success) {
}
}
contract BurnableToken is ReleasableToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyManager public {
}
}
/**
* GanaToken
*/
contract GanaToken is BurnableToken {
string public constant name = "GANA";
string public constant symbol = "GANA";
uint8 public constant decimals = 18;
event ClaimedTokens(address manager, address _token, uint256 claimedBalance);
function GanaToken() public {
}
function claimTokens(address _token, uint256 _claimedBalance) public onlyManager afterReleased {
}
}
/**
* Whitelist contract
*/
contract Whitelist is Ownable {
mapping (address => bool) public whitelist;
event Registered(address indexed _addr);
event Unregistered(address indexed _addr);
modifier onlyWhitelisted(address _addr) {
}
function isWhitelist(address _addr) public view returns (bool listed) {
}
function registerAddress(address _addr) public onlyOwner {
}
function registerAddresses(address[] _addrs) public onlyOwner {
}
function unregisterAddress(address _addr) public onlyOwner onlyWhitelisted(_addr) {
}
function unregisterAddresses(address[] _addrs) public onlyOwner {
}
}
/**
* GanaToken PUBLIC-SALE
*/
contract GanaTokenPublicSale is Ownable {
using SafeMath for uint256;
GanaToken public gana;
Whitelist public whitelist;
address public wallet;
uint256 public hardCap = 50000 ether; //publicsale cap
uint256 public weiRaised = 0;
uint256 public defaultRate = 20000;
uint256 public startTime;
uint256 public endTime;
event TokenPurchase(address indexed sender, address indexed buyer, uint256 weiAmount, uint256 ganaAmount);
event Refund(address indexed buyer, uint256 weiAmount);
event TransferToSafe();
event BurnAndReturnAfterEnded(uint256 burnAmount, uint256 returnAmount);
function GanaTokenPublicSale(address _gana, address _wallet, address _whitelist, uint256 _startTime, uint256 _endTime) public {
}
modifier onlyWhitelisted() {
}
// fallback function can be used to buy tokens
function () external payable {
}
function buyGana(address buyer) public onlyWhitelisted payable {
}
function getRate() public view returns (uint256) {
}
//Was it sold out or sale overdue
function hasEnded() public view returns (bool) {
}
function afterEnded() internal constant returns (bool) {
}
function afterStart() internal constant returns (bool) {
}
function transferToSafe() onlyOwner public {
}
/**
* @dev burn unsold token and return bonus token
* @param reserveWallet reserve pool address
*/
function burnAndReturnAfterEnded(address reserveWallet) onlyOwner public {
}
/**
* @dev emergency function before sale
* @param returnAddress return token address
*/
function returnGanaBeforeSale(address returnAddress) onlyOwner public {
}
}
| !released | 51,560 | !released |
null | pragma solidity ^0.4.18;
/**
* @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.
*/
function Ownable() 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 {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract Releasable is Ownable {
event Release();
bool public released = false;
modifier afterReleased() {
}
function release() onlyOwner public {
}
}
contract Managed is Releasable {
mapping (address => bool) public manager;
event SetManager(address _addr);
event UnsetManager(address _addr);
function Managed() public {
}
modifier onlyManager() {
require(<FILL_ME>)
_;
}
function setManager(address _addr) public onlyOwner {
}
function unsetManager(address _addr) public onlyOwner {
}
}
contract ReleasableToken is StandardToken, Managed {
function transfer(address _to, uint256 _value) public afterReleased returns (bool) {
}
function saleTransfer(address _to, uint256 _value) public onlyManager returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public afterReleased returns (bool) {
}
function approve(address _spender, uint256 _value) public afterReleased returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public afterReleased returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public afterReleased returns (bool success) {
}
}
contract BurnableToken is ReleasableToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyManager public {
}
}
/**
* GanaToken
*/
contract GanaToken is BurnableToken {
string public constant name = "GANA";
string public constant symbol = "GANA";
uint8 public constant decimals = 18;
event ClaimedTokens(address manager, address _token, uint256 claimedBalance);
function GanaToken() public {
}
function claimTokens(address _token, uint256 _claimedBalance) public onlyManager afterReleased {
}
}
/**
* Whitelist contract
*/
contract Whitelist is Ownable {
mapping (address => bool) public whitelist;
event Registered(address indexed _addr);
event Unregistered(address indexed _addr);
modifier onlyWhitelisted(address _addr) {
}
function isWhitelist(address _addr) public view returns (bool listed) {
}
function registerAddress(address _addr) public onlyOwner {
}
function registerAddresses(address[] _addrs) public onlyOwner {
}
function unregisterAddress(address _addr) public onlyOwner onlyWhitelisted(_addr) {
}
function unregisterAddresses(address[] _addrs) public onlyOwner {
}
}
/**
* GanaToken PUBLIC-SALE
*/
contract GanaTokenPublicSale is Ownable {
using SafeMath for uint256;
GanaToken public gana;
Whitelist public whitelist;
address public wallet;
uint256 public hardCap = 50000 ether; //publicsale cap
uint256 public weiRaised = 0;
uint256 public defaultRate = 20000;
uint256 public startTime;
uint256 public endTime;
event TokenPurchase(address indexed sender, address indexed buyer, uint256 weiAmount, uint256 ganaAmount);
event Refund(address indexed buyer, uint256 weiAmount);
event TransferToSafe();
event BurnAndReturnAfterEnded(uint256 burnAmount, uint256 returnAmount);
function GanaTokenPublicSale(address _gana, address _wallet, address _whitelist, uint256 _startTime, uint256 _endTime) public {
}
modifier onlyWhitelisted() {
}
// fallback function can be used to buy tokens
function () external payable {
}
function buyGana(address buyer) public onlyWhitelisted payable {
}
function getRate() public view returns (uint256) {
}
//Was it sold out or sale overdue
function hasEnded() public view returns (bool) {
}
function afterEnded() internal constant returns (bool) {
}
function afterStart() internal constant returns (bool) {
}
function transferToSafe() onlyOwner public {
}
/**
* @dev burn unsold token and return bonus token
* @param reserveWallet reserve pool address
*/
function burnAndReturnAfterEnded(address reserveWallet) onlyOwner public {
}
/**
* @dev emergency function before sale
* @param returnAddress return token address
*/
function returnGanaBeforeSale(address returnAddress) onlyOwner public {
}
}
| manager[msg.sender] | 51,560 | manager[msg.sender] |
null | pragma solidity ^0.4.18;
/**
* @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.
*/
function Ownable() 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 {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract Releasable is Ownable {
event Release();
bool public released = false;
modifier afterReleased() {
}
function release() onlyOwner public {
}
}
contract Managed is Releasable {
mapping (address => bool) public manager;
event SetManager(address _addr);
event UnsetManager(address _addr);
function Managed() public {
}
modifier onlyManager() {
}
function setManager(address _addr) public onlyOwner {
}
function unsetManager(address _addr) public onlyOwner {
}
}
contract ReleasableToken is StandardToken, Managed {
function transfer(address _to, uint256 _value) public afterReleased returns (bool) {
}
function saleTransfer(address _to, uint256 _value) public onlyManager returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public afterReleased returns (bool) {
}
function approve(address _spender, uint256 _value) public afterReleased returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public afterReleased returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public afterReleased returns (bool success) {
}
}
contract BurnableToken is ReleasableToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyManager public {
}
}
/**
* GanaToken
*/
contract GanaToken is BurnableToken {
string public constant name = "GANA";
string public constant symbol = "GANA";
uint8 public constant decimals = 18;
event ClaimedTokens(address manager, address _token, uint256 claimedBalance);
function GanaToken() public {
}
function claimTokens(address _token, uint256 _claimedBalance) public onlyManager afterReleased {
}
}
/**
* Whitelist contract
*/
contract Whitelist is Ownable {
mapping (address => bool) public whitelist;
event Registered(address indexed _addr);
event Unregistered(address indexed _addr);
modifier onlyWhitelisted(address _addr) {
require(<FILL_ME>)
_;
}
function isWhitelist(address _addr) public view returns (bool listed) {
}
function registerAddress(address _addr) public onlyOwner {
}
function registerAddresses(address[] _addrs) public onlyOwner {
}
function unregisterAddress(address _addr) public onlyOwner onlyWhitelisted(_addr) {
}
function unregisterAddresses(address[] _addrs) public onlyOwner {
}
}
/**
* GanaToken PUBLIC-SALE
*/
contract GanaTokenPublicSale is Ownable {
using SafeMath for uint256;
GanaToken public gana;
Whitelist public whitelist;
address public wallet;
uint256 public hardCap = 50000 ether; //publicsale cap
uint256 public weiRaised = 0;
uint256 public defaultRate = 20000;
uint256 public startTime;
uint256 public endTime;
event TokenPurchase(address indexed sender, address indexed buyer, uint256 weiAmount, uint256 ganaAmount);
event Refund(address indexed buyer, uint256 weiAmount);
event TransferToSafe();
event BurnAndReturnAfterEnded(uint256 burnAmount, uint256 returnAmount);
function GanaTokenPublicSale(address _gana, address _wallet, address _whitelist, uint256 _startTime, uint256 _endTime) public {
}
modifier onlyWhitelisted() {
}
// fallback function can be used to buy tokens
function () external payable {
}
function buyGana(address buyer) public onlyWhitelisted payable {
}
function getRate() public view returns (uint256) {
}
//Was it sold out or sale overdue
function hasEnded() public view returns (bool) {
}
function afterEnded() internal constant returns (bool) {
}
function afterStart() internal constant returns (bool) {
}
function transferToSafe() onlyOwner public {
}
/**
* @dev burn unsold token and return bonus token
* @param reserveWallet reserve pool address
*/
function burnAndReturnAfterEnded(address reserveWallet) onlyOwner public {
}
/**
* @dev emergency function before sale
* @param returnAddress return token address
*/
function returnGanaBeforeSale(address returnAddress) onlyOwner public {
}
}
| whitelist[_addr] | 51,560 | whitelist[_addr] |
null | pragma solidity ^0.4.18;
/**
* @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.
*/
function Ownable() 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 {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract Releasable is Ownable {
event Release();
bool public released = false;
modifier afterReleased() {
}
function release() onlyOwner public {
}
}
contract Managed is Releasable {
mapping (address => bool) public manager;
event SetManager(address _addr);
event UnsetManager(address _addr);
function Managed() public {
}
modifier onlyManager() {
}
function setManager(address _addr) public onlyOwner {
}
function unsetManager(address _addr) public onlyOwner {
}
}
contract ReleasableToken is StandardToken, Managed {
function transfer(address _to, uint256 _value) public afterReleased returns (bool) {
}
function saleTransfer(address _to, uint256 _value) public onlyManager returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public afterReleased returns (bool) {
}
function approve(address _spender, uint256 _value) public afterReleased returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public afterReleased returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public afterReleased returns (bool success) {
}
}
contract BurnableToken is ReleasableToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyManager public {
}
}
/**
* GanaToken
*/
contract GanaToken is BurnableToken {
string public constant name = "GANA";
string public constant symbol = "GANA";
uint8 public constant decimals = 18;
event ClaimedTokens(address manager, address _token, uint256 claimedBalance);
function GanaToken() public {
}
function claimTokens(address _token, uint256 _claimedBalance) public onlyManager afterReleased {
}
}
/**
* Whitelist contract
*/
contract Whitelist is Ownable {
mapping (address => bool) public whitelist;
event Registered(address indexed _addr);
event Unregistered(address indexed _addr);
modifier onlyWhitelisted(address _addr) {
}
function isWhitelist(address _addr) public view returns (bool listed) {
}
function registerAddress(address _addr) public onlyOwner {
}
function registerAddresses(address[] _addrs) public onlyOwner {
for(uint256 i = 0; i < _addrs.length; i++) {
require(<FILL_ME>)
whitelist[_addrs[i]] = true;
Registered(_addrs[i]);
}
}
function unregisterAddress(address _addr) public onlyOwner onlyWhitelisted(_addr) {
}
function unregisterAddresses(address[] _addrs) public onlyOwner {
}
}
/**
* GanaToken PUBLIC-SALE
*/
contract GanaTokenPublicSale is Ownable {
using SafeMath for uint256;
GanaToken public gana;
Whitelist public whitelist;
address public wallet;
uint256 public hardCap = 50000 ether; //publicsale cap
uint256 public weiRaised = 0;
uint256 public defaultRate = 20000;
uint256 public startTime;
uint256 public endTime;
event TokenPurchase(address indexed sender, address indexed buyer, uint256 weiAmount, uint256 ganaAmount);
event Refund(address indexed buyer, uint256 weiAmount);
event TransferToSafe();
event BurnAndReturnAfterEnded(uint256 burnAmount, uint256 returnAmount);
function GanaTokenPublicSale(address _gana, address _wallet, address _whitelist, uint256 _startTime, uint256 _endTime) public {
}
modifier onlyWhitelisted() {
}
// fallback function can be used to buy tokens
function () external payable {
}
function buyGana(address buyer) public onlyWhitelisted payable {
}
function getRate() public view returns (uint256) {
}
//Was it sold out or sale overdue
function hasEnded() public view returns (bool) {
}
function afterEnded() internal constant returns (bool) {
}
function afterStart() internal constant returns (bool) {
}
function transferToSafe() onlyOwner public {
}
/**
* @dev burn unsold token and return bonus token
* @param reserveWallet reserve pool address
*/
function burnAndReturnAfterEnded(address reserveWallet) onlyOwner public {
}
/**
* @dev emergency function before sale
* @param returnAddress return token address
*/
function returnGanaBeforeSale(address returnAddress) onlyOwner public {
}
}
| _addrs[i]!=address(0)&&whitelist[_addrs[i]]==false | 51,560 | _addrs[i]!=address(0)&&whitelist[_addrs[i]]==false |
null | pragma solidity ^0.4.18;
/**
* @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.
*/
function Ownable() 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 {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract Releasable is Ownable {
event Release();
bool public released = false;
modifier afterReleased() {
}
function release() onlyOwner public {
}
}
contract Managed is Releasable {
mapping (address => bool) public manager;
event SetManager(address _addr);
event UnsetManager(address _addr);
function Managed() public {
}
modifier onlyManager() {
}
function setManager(address _addr) public onlyOwner {
}
function unsetManager(address _addr) public onlyOwner {
}
}
contract ReleasableToken is StandardToken, Managed {
function transfer(address _to, uint256 _value) public afterReleased returns (bool) {
}
function saleTransfer(address _to, uint256 _value) public onlyManager returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public afterReleased returns (bool) {
}
function approve(address _spender, uint256 _value) public afterReleased returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public afterReleased returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public afterReleased returns (bool success) {
}
}
contract BurnableToken is ReleasableToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyManager public {
}
}
/**
* GanaToken
*/
contract GanaToken is BurnableToken {
string public constant name = "GANA";
string public constant symbol = "GANA";
uint8 public constant decimals = 18;
event ClaimedTokens(address manager, address _token, uint256 claimedBalance);
function GanaToken() public {
}
function claimTokens(address _token, uint256 _claimedBalance) public onlyManager afterReleased {
}
}
/**
* Whitelist contract
*/
contract Whitelist is Ownable {
mapping (address => bool) public whitelist;
event Registered(address indexed _addr);
event Unregistered(address indexed _addr);
modifier onlyWhitelisted(address _addr) {
}
function isWhitelist(address _addr) public view returns (bool listed) {
}
function registerAddress(address _addr) public onlyOwner {
}
function registerAddresses(address[] _addrs) public onlyOwner {
}
function unregisterAddress(address _addr) public onlyOwner onlyWhitelisted(_addr) {
}
function unregisterAddresses(address[] _addrs) public onlyOwner {
for(uint256 i = 0; i < _addrs.length; i++) {
require(<FILL_ME>)
whitelist[_addrs[i]] = false;
Unregistered(_addrs[i]);
}
}
}
/**
* GanaToken PUBLIC-SALE
*/
contract GanaTokenPublicSale is Ownable {
using SafeMath for uint256;
GanaToken public gana;
Whitelist public whitelist;
address public wallet;
uint256 public hardCap = 50000 ether; //publicsale cap
uint256 public weiRaised = 0;
uint256 public defaultRate = 20000;
uint256 public startTime;
uint256 public endTime;
event TokenPurchase(address indexed sender, address indexed buyer, uint256 weiAmount, uint256 ganaAmount);
event Refund(address indexed buyer, uint256 weiAmount);
event TransferToSafe();
event BurnAndReturnAfterEnded(uint256 burnAmount, uint256 returnAmount);
function GanaTokenPublicSale(address _gana, address _wallet, address _whitelist, uint256 _startTime, uint256 _endTime) public {
}
modifier onlyWhitelisted() {
}
// fallback function can be used to buy tokens
function () external payable {
}
function buyGana(address buyer) public onlyWhitelisted payable {
}
function getRate() public view returns (uint256) {
}
//Was it sold out or sale overdue
function hasEnded() public view returns (bool) {
}
function afterEnded() internal constant returns (bool) {
}
function afterStart() internal constant returns (bool) {
}
function transferToSafe() onlyOwner public {
}
/**
* @dev burn unsold token and return bonus token
* @param reserveWallet reserve pool address
*/
function burnAndReturnAfterEnded(address reserveWallet) onlyOwner public {
}
/**
* @dev emergency function before sale
* @param returnAddress return token address
*/
function returnGanaBeforeSale(address returnAddress) onlyOwner public {
}
}
| whitelist[_addrs[i]] | 51,560 | whitelist[_addrs[i]] |
null | pragma solidity ^0.4.18;
/**
* @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.
*/
function Ownable() 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 {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract Releasable is Ownable {
event Release();
bool public released = false;
modifier afterReleased() {
}
function release() onlyOwner public {
}
}
contract Managed is Releasable {
mapping (address => bool) public manager;
event SetManager(address _addr);
event UnsetManager(address _addr);
function Managed() public {
}
modifier onlyManager() {
}
function setManager(address _addr) public onlyOwner {
}
function unsetManager(address _addr) public onlyOwner {
}
}
contract ReleasableToken is StandardToken, Managed {
function transfer(address _to, uint256 _value) public afterReleased returns (bool) {
}
function saleTransfer(address _to, uint256 _value) public onlyManager returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public afterReleased returns (bool) {
}
function approve(address _spender, uint256 _value) public afterReleased returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public afterReleased returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public afterReleased returns (bool success) {
}
}
contract BurnableToken is ReleasableToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyManager public {
}
}
/**
* GanaToken
*/
contract GanaToken is BurnableToken {
string public constant name = "GANA";
string public constant symbol = "GANA";
uint8 public constant decimals = 18;
event ClaimedTokens(address manager, address _token, uint256 claimedBalance);
function GanaToken() public {
}
function claimTokens(address _token, uint256 _claimedBalance) public onlyManager afterReleased {
}
}
/**
* Whitelist contract
*/
contract Whitelist is Ownable {
mapping (address => bool) public whitelist;
event Registered(address indexed _addr);
event Unregistered(address indexed _addr);
modifier onlyWhitelisted(address _addr) {
}
function isWhitelist(address _addr) public view returns (bool listed) {
}
function registerAddress(address _addr) public onlyOwner {
}
function registerAddresses(address[] _addrs) public onlyOwner {
}
function unregisterAddress(address _addr) public onlyOwner onlyWhitelisted(_addr) {
}
function unregisterAddresses(address[] _addrs) public onlyOwner {
}
}
/**
* GanaToken PUBLIC-SALE
*/
contract GanaTokenPublicSale is Ownable {
using SafeMath for uint256;
GanaToken public gana;
Whitelist public whitelist;
address public wallet;
uint256 public hardCap = 50000 ether; //publicsale cap
uint256 public weiRaised = 0;
uint256 public defaultRate = 20000;
uint256 public startTime;
uint256 public endTime;
event TokenPurchase(address indexed sender, address indexed buyer, uint256 weiAmount, uint256 ganaAmount);
event Refund(address indexed buyer, uint256 weiAmount);
event TransferToSafe();
event BurnAndReturnAfterEnded(uint256 burnAmount, uint256 returnAmount);
function GanaTokenPublicSale(address _gana, address _wallet, address _whitelist, uint256 _startTime, uint256 _endTime) public {
}
modifier onlyWhitelisted() {
require(<FILL_ME>)
_;
}
// fallback function can be used to buy tokens
function () external payable {
}
function buyGana(address buyer) public onlyWhitelisted payable {
}
function getRate() public view returns (uint256) {
}
//Was it sold out or sale overdue
function hasEnded() public view returns (bool) {
}
function afterEnded() internal constant returns (bool) {
}
function afterStart() internal constant returns (bool) {
}
function transferToSafe() onlyOwner public {
}
/**
* @dev burn unsold token and return bonus token
* @param reserveWallet reserve pool address
*/
function burnAndReturnAfterEnded(address reserveWallet) onlyOwner public {
}
/**
* @dev emergency function before sale
* @param returnAddress return token address
*/
function returnGanaBeforeSale(address returnAddress) onlyOwner public {
}
}
| whitelist.isWhitelist(msg.sender) | 51,560 | whitelist.isWhitelist(msg.sender) |
null | pragma solidity ^0.4.18;
/**
* @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.
*/
function Ownable() 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 {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract Releasable is Ownable {
event Release();
bool public released = false;
modifier afterReleased() {
}
function release() onlyOwner public {
}
}
contract Managed is Releasable {
mapping (address => bool) public manager;
event SetManager(address _addr);
event UnsetManager(address _addr);
function Managed() public {
}
modifier onlyManager() {
}
function setManager(address _addr) public onlyOwner {
}
function unsetManager(address _addr) public onlyOwner {
}
}
contract ReleasableToken is StandardToken, Managed {
function transfer(address _to, uint256 _value) public afterReleased returns (bool) {
}
function saleTransfer(address _to, uint256 _value) public onlyManager returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public afterReleased returns (bool) {
}
function approve(address _spender, uint256 _value) public afterReleased returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public afterReleased returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public afterReleased returns (bool success) {
}
}
contract BurnableToken is ReleasableToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyManager public {
}
}
/**
* GanaToken
*/
contract GanaToken is BurnableToken {
string public constant name = "GANA";
string public constant symbol = "GANA";
uint8 public constant decimals = 18;
event ClaimedTokens(address manager, address _token, uint256 claimedBalance);
function GanaToken() public {
}
function claimTokens(address _token, uint256 _claimedBalance) public onlyManager afterReleased {
}
}
/**
* Whitelist contract
*/
contract Whitelist is Ownable {
mapping (address => bool) public whitelist;
event Registered(address indexed _addr);
event Unregistered(address indexed _addr);
modifier onlyWhitelisted(address _addr) {
}
function isWhitelist(address _addr) public view returns (bool listed) {
}
function registerAddress(address _addr) public onlyOwner {
}
function registerAddresses(address[] _addrs) public onlyOwner {
}
function unregisterAddress(address _addr) public onlyOwner onlyWhitelisted(_addr) {
}
function unregisterAddresses(address[] _addrs) public onlyOwner {
}
}
/**
* GanaToken PUBLIC-SALE
*/
contract GanaTokenPublicSale is Ownable {
using SafeMath for uint256;
GanaToken public gana;
Whitelist public whitelist;
address public wallet;
uint256 public hardCap = 50000 ether; //publicsale cap
uint256 public weiRaised = 0;
uint256 public defaultRate = 20000;
uint256 public startTime;
uint256 public endTime;
event TokenPurchase(address indexed sender, address indexed buyer, uint256 weiAmount, uint256 ganaAmount);
event Refund(address indexed buyer, uint256 weiAmount);
event TransferToSafe();
event BurnAndReturnAfterEnded(uint256 burnAmount, uint256 returnAmount);
function GanaTokenPublicSale(address _gana, address _wallet, address _whitelist, uint256 _startTime, uint256 _endTime) public {
}
modifier onlyWhitelisted() {
}
// fallback function can be used to buy tokens
function () external payable {
}
function buyGana(address buyer) public onlyWhitelisted payable {
require(!hasEnded());
require(<FILL_ME>)
require(buyer != address(0));
require(msg.value > 0);
require(buyer == msg.sender);
uint256 weiAmount = msg.value;
//pre-calculate wei raise after buying
uint256 preCalWeiRaised = weiRaised.add(weiAmount);
uint256 ganaAmount;
uint256 rate = getRate();
if(preCalWeiRaised <= hardCap){
//the pre-calculate wei raise is less than the hard cap
ganaAmount = weiAmount.mul(rate);
gana.saleTransfer(buyer, ganaAmount);
weiRaised = preCalWeiRaised;
TokenPurchase(msg.sender, buyer, weiAmount, ganaAmount);
}else{
//the pre-calculate weiRaised is more than the hard cap
uint256 refundWeiAmount = preCalWeiRaised.sub(hardCap);
uint256 fundWeiAmount = weiAmount.sub(refundWeiAmount);
ganaAmount = fundWeiAmount.mul(rate);
gana.saleTransfer(buyer, ganaAmount);
weiRaised = weiRaised.add(fundWeiAmount);
TokenPurchase(msg.sender, buyer, fundWeiAmount, ganaAmount);
buyer.transfer(refundWeiAmount);
Refund(buyer,refundWeiAmount);
}
}
function getRate() public view returns (uint256) {
}
//Was it sold out or sale overdue
function hasEnded() public view returns (bool) {
}
function afterEnded() internal constant returns (bool) {
}
function afterStart() internal constant returns (bool) {
}
function transferToSafe() onlyOwner public {
}
/**
* @dev burn unsold token and return bonus token
* @param reserveWallet reserve pool address
*/
function burnAndReturnAfterEnded(address reserveWallet) onlyOwner public {
}
/**
* @dev emergency function before sale
* @param returnAddress return token address
*/
function returnGanaBeforeSale(address returnAddress) onlyOwner public {
}
}
| afterStart() | 51,560 | afterStart() |
null | /* Copyright (C) 2017 NexusMutual.io
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/ */
pragma solidity 0.5.7;
import "./PoolData.sol";
import "./QuotationData.sol";
import "./TokenData.sol";
import "./NXMToken.sol";
import "./Pool1.sol";
import "./MemberRoles.sol";
import "./ProposalCategory.sol";
contract MCR is Iupgradable {
using SafeMath for uint;
Pool1 internal p1;
PoolData internal pd;
NXMToken internal tk;
QuotationData internal qd;
MemberRoles internal mr;
TokenData internal td;
ProposalCategory internal proposalCategory;
uint private constant DECIMAL1E18 = uint(10) ** 18;
uint private constant DECIMAL1E05 = uint(10) ** 5;
uint private constant DECIMAL1E19 = uint(10) ** 19;
uint private constant minCapFactor = uint(10) ** 21;
uint public variableMincap;
uint public dynamicMincapThresholdx100 = 13000;
uint public dynamicMincapIncrementx100 = 100;
event MCREvent(
uint indexed date,
uint blockNumber,
bytes4[] allCurr,
uint[] allCurrRates,
uint mcrEtherx100,
uint mcrPercx100,
uint vFull
);
/**
* @dev Adds new MCR data.
* @param mcrP Minimum Capital Requirement in percentage.
* @param vF Pool1 fund value in Ether used in the last full daily calculation of the Capital model.
* @param onlyDate Date(yyyymmdd) at which MCR details are getting added.
*/
function addMCRData(
uint mcrP,
uint mcrE,
uint vF,
bytes4[] calldata curr,
uint[] calldata _threeDayAvg,
uint64 onlyDate
)
external
checkPause
{
require(<FILL_ME>)
require(pd.isnotarise(msg.sender));
if (mr.launched() && pd.capReached() != 1) {
if (mcrP >= 10000)
pd.setCapReached(1);
}
uint len = pd.getMCRDataLength();
_addMCRData(len, onlyDate, curr, mcrE, mcrP, vF, _threeDayAvg);
}
/**
* @dev Adds MCR Data for last failed attempt.
*/
function addLastMCRData(uint64 date) external checkPause onlyInternal {
}
/**
* @dev Iupgradable Interface to update dependent contract address
*/
function changeDependentContractAddress() public onlyInternal {
}
/**
* @dev Gets total sum assured(in ETH).
* @return amount of sum assured
*/
function getAllSumAssurance() public view returns(uint amount) {
}
/**
* @dev Calculates V(Tp) and MCR%(Tp), i.e, Pool Fund Value in Ether
* and MCR% used in the Token Price Calculation.
* @return vtp Pool Fund Value in Ether used for the Token Price Model
* @return mcrtp MCR% used in the Token Price Model.
*/
function _calVtpAndMCRtp(uint poolBalance) public view returns(uint vtp, uint mcrtp) {
}
/**
* @dev Calculates the Token Price of NXM in a given currency.
* @param curr Currency name.
*/
function calculateStepTokenPrice(
bytes4 curr,
uint mcrtp
)
public
view
onlyInternal
returns(uint tokenPrice)
{
}
/**
* @dev Calculates the Token Price of NXM in a given currency
* with provided token supply for dynamic token price calculation
* @param curr Currency name.
*/
function calculateTokenPrice (bytes4 curr) public view returns(uint tokenPrice) {
}
function calVtpAndMCRtp() public view returns(uint vtp, uint mcrtp) {
}
function calculateVtpAndMCRtp(uint poolBalance) public view returns(uint vtp, uint mcrtp) {
}
function getThresholdValues(uint vtp, uint vF, uint totalSA, uint minCap) public view returns(uint lowerThreshold, uint upperThreshold)
{
}
/**
* @dev Gets max numbers of tokens that can be sold at the moment.
*/
function getMaxSellTokens() public view returns(uint maxTokens) {
}
/**
* @dev Gets Uint Parameters of a code
* @param code whose details we want
* @return string value of the code
* @return associated amount (time or perc or value) to the code
*/
function getUintParameters(bytes8 code) external view returns(bytes8 codeVal, uint val) {
}
/**
* @dev Updates Uint Parameters of a code
* @param code whose details we want to update
* @param val value to set
*/
function updateUintParameters(bytes8 code, uint val) public {
}
/**
* @dev Calls oraclize query to calculate MCR details after 24 hours.
*/
function _callOracliseForMCR() internal {
}
/**
* @dev Calculates the Token Price of NXM in a given currency
* with provided token supply for dynamic token price calculation
* @param _curr Currency name.
* @return tokenPrice Token price.
*/
function _calculateTokenPrice(
bytes4 _curr,
uint mcrtp
)
internal
view
returns(uint tokenPrice)
{
}
/**
* @dev Adds MCR Data. Checks if MCR is within valid
* thresholds in order to rule out any incorrect calculations
*/
function _addMCRData(
uint len,
uint64 newMCRDate,
bytes4[] memory curr,
uint mcrE,
uint mcrP,
uint vF,
uint[] memory _threeDayAvg
)
internal
{
}
}
| proposalCategory.constructorCheck() | 51,601 | proposalCategory.constructorCheck() |
null | /* Copyright (C) 2017 NexusMutual.io
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/ */
pragma solidity 0.5.7;
import "./PoolData.sol";
import "./QuotationData.sol";
import "./TokenData.sol";
import "./NXMToken.sol";
import "./Pool1.sol";
import "./MemberRoles.sol";
import "./ProposalCategory.sol";
contract MCR is Iupgradable {
using SafeMath for uint;
Pool1 internal p1;
PoolData internal pd;
NXMToken internal tk;
QuotationData internal qd;
MemberRoles internal mr;
TokenData internal td;
ProposalCategory internal proposalCategory;
uint private constant DECIMAL1E18 = uint(10) ** 18;
uint private constant DECIMAL1E05 = uint(10) ** 5;
uint private constant DECIMAL1E19 = uint(10) ** 19;
uint private constant minCapFactor = uint(10) ** 21;
uint public variableMincap;
uint public dynamicMincapThresholdx100 = 13000;
uint public dynamicMincapIncrementx100 = 100;
event MCREvent(
uint indexed date,
uint blockNumber,
bytes4[] allCurr,
uint[] allCurrRates,
uint mcrEtherx100,
uint mcrPercx100,
uint vFull
);
/**
* @dev Adds new MCR data.
* @param mcrP Minimum Capital Requirement in percentage.
* @param vF Pool1 fund value in Ether used in the last full daily calculation of the Capital model.
* @param onlyDate Date(yyyymmdd) at which MCR details are getting added.
*/
function addMCRData(
uint mcrP,
uint mcrE,
uint vF,
bytes4[] calldata curr,
uint[] calldata _threeDayAvg,
uint64 onlyDate
)
external
checkPause
{
require(proposalCategory.constructorCheck());
require(<FILL_ME>)
if (mr.launched() && pd.capReached() != 1) {
if (mcrP >= 10000)
pd.setCapReached(1);
}
uint len = pd.getMCRDataLength();
_addMCRData(len, onlyDate, curr, mcrE, mcrP, vF, _threeDayAvg);
}
/**
* @dev Adds MCR Data for last failed attempt.
*/
function addLastMCRData(uint64 date) external checkPause onlyInternal {
}
/**
* @dev Iupgradable Interface to update dependent contract address
*/
function changeDependentContractAddress() public onlyInternal {
}
/**
* @dev Gets total sum assured(in ETH).
* @return amount of sum assured
*/
function getAllSumAssurance() public view returns(uint amount) {
}
/**
* @dev Calculates V(Tp) and MCR%(Tp), i.e, Pool Fund Value in Ether
* and MCR% used in the Token Price Calculation.
* @return vtp Pool Fund Value in Ether used for the Token Price Model
* @return mcrtp MCR% used in the Token Price Model.
*/
function _calVtpAndMCRtp(uint poolBalance) public view returns(uint vtp, uint mcrtp) {
}
/**
* @dev Calculates the Token Price of NXM in a given currency.
* @param curr Currency name.
*/
function calculateStepTokenPrice(
bytes4 curr,
uint mcrtp
)
public
view
onlyInternal
returns(uint tokenPrice)
{
}
/**
* @dev Calculates the Token Price of NXM in a given currency
* with provided token supply for dynamic token price calculation
* @param curr Currency name.
*/
function calculateTokenPrice (bytes4 curr) public view returns(uint tokenPrice) {
}
function calVtpAndMCRtp() public view returns(uint vtp, uint mcrtp) {
}
function calculateVtpAndMCRtp(uint poolBalance) public view returns(uint vtp, uint mcrtp) {
}
function getThresholdValues(uint vtp, uint vF, uint totalSA, uint minCap) public view returns(uint lowerThreshold, uint upperThreshold)
{
}
/**
* @dev Gets max numbers of tokens that can be sold at the moment.
*/
function getMaxSellTokens() public view returns(uint maxTokens) {
}
/**
* @dev Gets Uint Parameters of a code
* @param code whose details we want
* @return string value of the code
* @return associated amount (time or perc or value) to the code
*/
function getUintParameters(bytes8 code) external view returns(bytes8 codeVal, uint val) {
}
/**
* @dev Updates Uint Parameters of a code
* @param code whose details we want to update
* @param val value to set
*/
function updateUintParameters(bytes8 code, uint val) public {
}
/**
* @dev Calls oraclize query to calculate MCR details after 24 hours.
*/
function _callOracliseForMCR() internal {
}
/**
* @dev Calculates the Token Price of NXM in a given currency
* with provided token supply for dynamic token price calculation
* @param _curr Currency name.
* @return tokenPrice Token price.
*/
function _calculateTokenPrice(
bytes4 _curr,
uint mcrtp
)
internal
view
returns(uint tokenPrice)
{
}
/**
* @dev Adds MCR Data. Checks if MCR is within valid
* thresholds in order to rule out any incorrect calculations
*/
function _addMCRData(
uint len,
uint64 newMCRDate,
bytes4[] memory curr,
uint mcrE,
uint mcrP,
uint vF,
uint[] memory _threeDayAvg
)
internal
{
}
}
| pd.isnotarise(msg.sender) | 51,601 | pd.isnotarise(msg.sender) |
null | /* Copyright (C) 2017 NexusMutual.io
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/ */
pragma solidity 0.5.7;
import "./PoolData.sol";
import "./QuotationData.sol";
import "./TokenData.sol";
import "./NXMToken.sol";
import "./Pool1.sol";
import "./MemberRoles.sol";
import "./ProposalCategory.sol";
contract MCR is Iupgradable {
using SafeMath for uint;
Pool1 internal p1;
PoolData internal pd;
NXMToken internal tk;
QuotationData internal qd;
MemberRoles internal mr;
TokenData internal td;
ProposalCategory internal proposalCategory;
uint private constant DECIMAL1E18 = uint(10) ** 18;
uint private constant DECIMAL1E05 = uint(10) ** 5;
uint private constant DECIMAL1E19 = uint(10) ** 19;
uint private constant minCapFactor = uint(10) ** 21;
uint public variableMincap;
uint public dynamicMincapThresholdx100 = 13000;
uint public dynamicMincapIncrementx100 = 100;
event MCREvent(
uint indexed date,
uint blockNumber,
bytes4[] allCurr,
uint[] allCurrRates,
uint mcrEtherx100,
uint mcrPercx100,
uint vFull
);
/**
* @dev Adds new MCR data.
* @param mcrP Minimum Capital Requirement in percentage.
* @param vF Pool1 fund value in Ether used in the last full daily calculation of the Capital model.
* @param onlyDate Date(yyyymmdd) at which MCR details are getting added.
*/
function addMCRData(
uint mcrP,
uint mcrE,
uint vF,
bytes4[] calldata curr,
uint[] calldata _threeDayAvg,
uint64 onlyDate
)
external
checkPause
{
}
/**
* @dev Adds MCR Data for last failed attempt.
*/
function addLastMCRData(uint64 date) external checkPause onlyInternal {
}
/**
* @dev Iupgradable Interface to update dependent contract address
*/
function changeDependentContractAddress() public onlyInternal {
}
/**
* @dev Gets total sum assured(in ETH).
* @return amount of sum assured
*/
function getAllSumAssurance() public view returns(uint amount) {
}
/**
* @dev Calculates V(Tp) and MCR%(Tp), i.e, Pool Fund Value in Ether
* and MCR% used in the Token Price Calculation.
* @return vtp Pool Fund Value in Ether used for the Token Price Model
* @return mcrtp MCR% used in the Token Price Model.
*/
function _calVtpAndMCRtp(uint poolBalance) public view returns(uint vtp, uint mcrtp) {
}
/**
* @dev Calculates the Token Price of NXM in a given currency.
* @param curr Currency name.
*/
function calculateStepTokenPrice(
bytes4 curr,
uint mcrtp
)
public
view
onlyInternal
returns(uint tokenPrice)
{
}
/**
* @dev Calculates the Token Price of NXM in a given currency
* with provided token supply for dynamic token price calculation
* @param curr Currency name.
*/
function calculateTokenPrice (bytes4 curr) public view returns(uint tokenPrice) {
}
function calVtpAndMCRtp() public view returns(uint vtp, uint mcrtp) {
}
function calculateVtpAndMCRtp(uint poolBalance) public view returns(uint vtp, uint mcrtp) {
}
function getThresholdValues(uint vtp, uint vF, uint totalSA, uint minCap) public view returns(uint lowerThreshold, uint upperThreshold)
{
}
/**
* @dev Gets max numbers of tokens that can be sold at the moment.
*/
function getMaxSellTokens() public view returns(uint maxTokens) {
}
/**
* @dev Gets Uint Parameters of a code
* @param code whose details we want
* @return string value of the code
* @return associated amount (time or perc or value) to the code
*/
function getUintParameters(bytes8 code) external view returns(bytes8 codeVal, uint val) {
}
/**
* @dev Updates Uint Parameters of a code
* @param code whose details we want to update
* @param val value to set
*/
function updateUintParameters(bytes8 code, uint val) public {
require(<FILL_ME>)
if (code == "DMCT") {
dynamicMincapThresholdx100 = val;
} else if (code == "DMCI") {
dynamicMincapIncrementx100 = val;
}
else {
revert("Invalid param code");
}
}
/**
* @dev Calls oraclize query to calculate MCR details after 24 hours.
*/
function _callOracliseForMCR() internal {
}
/**
* @dev Calculates the Token Price of NXM in a given currency
* with provided token supply for dynamic token price calculation
* @param _curr Currency name.
* @return tokenPrice Token price.
*/
function _calculateTokenPrice(
bytes4 _curr,
uint mcrtp
)
internal
view
returns(uint tokenPrice)
{
}
/**
* @dev Adds MCR Data. Checks if MCR is within valid
* thresholds in order to rule out any incorrect calculations
*/
function _addMCRData(
uint len,
uint64 newMCRDate,
bytes4[] memory curr,
uint mcrE,
uint mcrP,
uint vF,
uint[] memory _threeDayAvg
)
internal
{
}
}
| ms.checkIsAuthToGoverned(msg.sender) | 51,601 | ms.checkIsAuthToGoverned(msg.sender) |
null | /* Copyright (C) 2020 NexusMutual.io
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/ */
pragma solidity 0.5.7;
import "./Iupgradable.sol";
import "./IERC1132.sol";
import "./NXMToken.sol";
contract TokenController is IERC1132, Iupgradable {
using SafeMath for uint256;
event Burned(address indexed member, bytes32 lockedUnder, uint256 amount);
NXMToken public token;
uint public minCALockTime = uint(30).mul(1 days);
bytes32 private constant CLA = bytes32("CLA");
/**
* @dev Just for interface
*/
function changeDependentContractAddress() public {
}
/**
* @dev to change the operator address
* @param _newOperator is the new address of operator
*/
function changeOperator(address _newOperator) public onlyInternal {
}
/**
* @dev Locks a specified amount of tokens,
* for CLA reason and for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function lock(bytes32 _reason, uint256 _amount, uint256 _time) public checkPause returns (bool)
{
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
* @param _of address whose tokens are to be locked
*/
function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Extends lock for reason CLA for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _time Lock extension time in seconds
*/
function extendLock(bytes32 _reason, uint256 _time)
public
checkPause
returns (bool)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function extendLockOf(address _of, bytes32 _reason, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Increase number of tokens locked for a CLA reason
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be increased
*/
function increaseLockAmount(bytes32 _reason, uint256 _amount)
public
checkPause
returns (bool)
{
require(_reason == CLA,"Restricted to reason CLA");
require(<FILL_ME>)
token.operatorTransfer(msg.sender, _amount);
locked[msg.sender][_reason].amount = locked[msg.sender][_reason].amount.add(_amount);
emit Locked(msg.sender, _reason, _amount, locked[msg.sender][_reason].validity);
return true;
}
/**
* @dev burns tokens of an address
* @param _of is the address to burn tokens of
* @param amount is the amount to burn
* @return the boolean status of the burning process
*/
function burnFrom (address _of, uint amount) public onlyInternal returns (bool) {
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount)
public
onlyInternal
{
}
/**
* @dev Adds an address to whitelist maintained in the contract
* @param _member address to add to whitelist
*/
function addToWhitelist(address _member) public onlyInternal {
}
/**
* @dev Removes an address from the whitelist in the token
* @param _member address to remove
*/
function removeFromWhitelist(address _member) public onlyInternal {
}
/**
* @dev Mints new token for an address
* @param _member address to reward the minted tokens
* @param _amount number of tokens to mint
*/
function mint(address _member, uint _amount) public onlyInternal {
}
/**
* @dev Lock the user's tokens
* @param _of user's address.
*/
function lockForMemberVote(address _of, uint _days) public onlyInternal {
}
/**
* @dev Unlocks the unlockable tokens against CLA of a specified address
* @param _of Address of user, claiming back unlockable tokens against CLA
*/
function unlock(address _of)
public
checkPause
returns (uint256 unlockableTokens)
{
}
/**
* @dev Updates Uint Parameters of a code
* @param code whose details we want to update
* @param val value to set
*/
function updateUintParameters(bytes8 code, uint val) public {
}
/**
* @dev Gets the validity of locked tokens of a specified address
* @param _of The address to query the validity
* @param reason reason for which tokens were locked
*/
function getLockedTokensValidity(address _of, bytes32 reason)
public
view
returns (uint256 validity)
{
}
/**
* @dev Gets the unlockable tokens of a specified address
* @param _of The address to query the the unlockable token count of
*/
function getUnlockableTokens(address _of)
public
view
returns (uint256 unlockableTokens)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function tokensLocked(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function tokensUnlockable(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
function totalSupply() public view returns (uint256)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns total tokens held by an address (locked + transferable)
* @param _of The address to query the total balance of
*/
function totalBalanceOf(address _of)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function totalLockedBalance(address _of, uint256 _time) public view returns (uint256 amount) {
}
/**
* @dev Internal function to returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function _totalLockedBalance(address _of, uint256 _time) internal view returns (uint256 amount) {
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _of address whose tokens are to be locked
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal {
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function _tokensLocked(address _of, bytes32 _reason)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function _extendLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount)
{
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal
{
}
function _removeReason(address _of, bytes32 _reason) internal {
}
}
| _tokensLocked(msg.sender,_reason)>0 | 51,602 | _tokensLocked(msg.sender,_reason)>0 |
null | /* Copyright (C) 2020 NexusMutual.io
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/ */
pragma solidity 0.5.7;
import "./Iupgradable.sol";
import "./IERC1132.sol";
import "./NXMToken.sol";
contract TokenController is IERC1132, Iupgradable {
using SafeMath for uint256;
event Burned(address indexed member, bytes32 lockedUnder, uint256 amount);
NXMToken public token;
uint public minCALockTime = uint(30).mul(1 days);
bytes32 private constant CLA = bytes32("CLA");
/**
* @dev Just for interface
*/
function changeDependentContractAddress() public {
}
/**
* @dev to change the operator address
* @param _newOperator is the new address of operator
*/
function changeOperator(address _newOperator) public onlyInternal {
}
/**
* @dev Locks a specified amount of tokens,
* for CLA reason and for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function lock(bytes32 _reason, uint256 _amount, uint256 _time) public checkPause returns (bool)
{
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
* @param _of address whose tokens are to be locked
*/
function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Extends lock for reason CLA for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _time Lock extension time in seconds
*/
function extendLock(bytes32 _reason, uint256 _time)
public
checkPause
returns (bool)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function extendLockOf(address _of, bytes32 _reason, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Increase number of tokens locked for a CLA reason
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be increased
*/
function increaseLockAmount(bytes32 _reason, uint256 _amount)
public
checkPause
returns (bool)
{
}
/**
* @dev burns tokens of an address
* @param _of is the address to burn tokens of
* @param amount is the amount to burn
* @return the boolean status of the burning process
*/
function burnFrom (address _of, uint amount) public onlyInternal returns (bool) {
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount)
public
onlyInternal
{
}
/**
* @dev Adds an address to whitelist maintained in the contract
* @param _member address to add to whitelist
*/
function addToWhitelist(address _member) public onlyInternal {
}
/**
* @dev Removes an address from the whitelist in the token
* @param _member address to remove
*/
function removeFromWhitelist(address _member) public onlyInternal {
}
/**
* @dev Mints new token for an address
* @param _member address to reward the minted tokens
* @param _amount number of tokens to mint
*/
function mint(address _member, uint _amount) public onlyInternal {
}
/**
* @dev Lock the user's tokens
* @param _of user's address.
*/
function lockForMemberVote(address _of, uint _days) public onlyInternal {
}
/**
* @dev Unlocks the unlockable tokens against CLA of a specified address
* @param _of Address of user, claiming back unlockable tokens against CLA
*/
function unlock(address _of)
public
checkPause
returns (uint256 unlockableTokens)
{
unlockableTokens = _tokensUnlockable(_of, CLA);
if (unlockableTokens > 0) {
locked[_of][CLA].claimed = true;
emit Unlocked(_of, CLA, unlockableTokens);
require(<FILL_ME>)
}
}
/**
* @dev Updates Uint Parameters of a code
* @param code whose details we want to update
* @param val value to set
*/
function updateUintParameters(bytes8 code, uint val) public {
}
/**
* @dev Gets the validity of locked tokens of a specified address
* @param _of The address to query the validity
* @param reason reason for which tokens were locked
*/
function getLockedTokensValidity(address _of, bytes32 reason)
public
view
returns (uint256 validity)
{
}
/**
* @dev Gets the unlockable tokens of a specified address
* @param _of The address to query the the unlockable token count of
*/
function getUnlockableTokens(address _of)
public
view
returns (uint256 unlockableTokens)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function tokensLocked(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function tokensUnlockable(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
function totalSupply() public view returns (uint256)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns total tokens held by an address (locked + transferable)
* @param _of The address to query the total balance of
*/
function totalBalanceOf(address _of)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function totalLockedBalance(address _of, uint256 _time) public view returns (uint256 amount) {
}
/**
* @dev Internal function to returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function _totalLockedBalance(address _of, uint256 _time) internal view returns (uint256 amount) {
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _of address whose tokens are to be locked
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal {
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function _tokensLocked(address _of, bytes32 _reason)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function _extendLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount)
{
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal
{
}
function _removeReason(address _of, bytes32 _reason) internal {
}
}
| token.transfer(_of,unlockableTokens) | 51,602 | token.transfer(_of,unlockableTokens) |
null | /* Copyright (C) 2020 NexusMutual.io
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/ */
pragma solidity 0.5.7;
import "./Iupgradable.sol";
import "./IERC1132.sol";
import "./NXMToken.sol";
contract TokenController is IERC1132, Iupgradable {
using SafeMath for uint256;
event Burned(address indexed member, bytes32 lockedUnder, uint256 amount);
NXMToken public token;
uint public minCALockTime = uint(30).mul(1 days);
bytes32 private constant CLA = bytes32("CLA");
/**
* @dev Just for interface
*/
function changeDependentContractAddress() public {
}
/**
* @dev to change the operator address
* @param _newOperator is the new address of operator
*/
function changeOperator(address _newOperator) public onlyInternal {
}
/**
* @dev Locks a specified amount of tokens,
* for CLA reason and for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function lock(bytes32 _reason, uint256 _amount, uint256 _time) public checkPause returns (bool)
{
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
* @param _of address whose tokens are to be locked
*/
function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Extends lock for reason CLA for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _time Lock extension time in seconds
*/
function extendLock(bytes32 _reason, uint256 _time)
public
checkPause
returns (bool)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function extendLockOf(address _of, bytes32 _reason, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Increase number of tokens locked for a CLA reason
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be increased
*/
function increaseLockAmount(bytes32 _reason, uint256 _amount)
public
checkPause
returns (bool)
{
}
/**
* @dev burns tokens of an address
* @param _of is the address to burn tokens of
* @param amount is the amount to burn
* @return the boolean status of the burning process
*/
function burnFrom (address _of, uint amount) public onlyInternal returns (bool) {
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount)
public
onlyInternal
{
}
/**
* @dev Adds an address to whitelist maintained in the contract
* @param _member address to add to whitelist
*/
function addToWhitelist(address _member) public onlyInternal {
}
/**
* @dev Removes an address from the whitelist in the token
* @param _member address to remove
*/
function removeFromWhitelist(address _member) public onlyInternal {
}
/**
* @dev Mints new token for an address
* @param _member address to reward the minted tokens
* @param _amount number of tokens to mint
*/
function mint(address _member, uint _amount) public onlyInternal {
}
/**
* @dev Lock the user's tokens
* @param _of user's address.
*/
function lockForMemberVote(address _of, uint _days) public onlyInternal {
}
/**
* @dev Unlocks the unlockable tokens against CLA of a specified address
* @param _of Address of user, claiming back unlockable tokens against CLA
*/
function unlock(address _of)
public
checkPause
returns (uint256 unlockableTokens)
{
}
/**
* @dev Updates Uint Parameters of a code
* @param code whose details we want to update
* @param val value to set
*/
function updateUintParameters(bytes8 code, uint val) public {
}
/**
* @dev Gets the validity of locked tokens of a specified address
* @param _of The address to query the validity
* @param reason reason for which tokens were locked
*/
function getLockedTokensValidity(address _of, bytes32 reason)
public
view
returns (uint256 validity)
{
}
/**
* @dev Gets the unlockable tokens of a specified address
* @param _of The address to query the the unlockable token count of
*/
function getUnlockableTokens(address _of)
public
view
returns (uint256 unlockableTokens)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function tokensLocked(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function tokensUnlockable(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
function totalSupply() public view returns (uint256)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns total tokens held by an address (locked + transferable)
* @param _of The address to query the total balance of
*/
function totalBalanceOf(address _of)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function totalLockedBalance(address _of, uint256 _time) public view returns (uint256 amount) {
}
/**
* @dev Internal function to returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function _totalLockedBalance(address _of, uint256 _time) internal view returns (uint256 amount) {
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _of address whose tokens are to be locked
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal {
require(_tokensLocked(_of, _reason) == 0);
require(_amount != 0);
if (locked[_of][_reason].amount == 0) {
lockReason[_of].push(_reason);
}
require(<FILL_ME>)
uint256 validUntil = now.add(_time); //solhint-disable-line
locked[_of][_reason] = LockToken(_amount, validUntil, false);
emit Locked(_of, _reason, _amount, validUntil);
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function _tokensLocked(address _of, bytes32 _reason)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function _extendLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount)
{
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal
{
}
function _removeReason(address _of, bytes32 _reason) internal {
}
}
| token.operatorTransfer(_of,_amount) | 51,602 | token.operatorTransfer(_of,_amount) |
null | /* Copyright (C) 2020 NexusMutual.io
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/ */
pragma solidity 0.5.7;
import "./Iupgradable.sol";
import "./IERC1132.sol";
import "./NXMToken.sol";
contract TokenController is IERC1132, Iupgradable {
using SafeMath for uint256;
event Burned(address indexed member, bytes32 lockedUnder, uint256 amount);
NXMToken public token;
uint public minCALockTime = uint(30).mul(1 days);
bytes32 private constant CLA = bytes32("CLA");
/**
* @dev Just for interface
*/
function changeDependentContractAddress() public {
}
/**
* @dev to change the operator address
* @param _newOperator is the new address of operator
*/
function changeOperator(address _newOperator) public onlyInternal {
}
/**
* @dev Locks a specified amount of tokens,
* for CLA reason and for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function lock(bytes32 _reason, uint256 _amount, uint256 _time) public checkPause returns (bool)
{
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
* @param _of address whose tokens are to be locked
*/
function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Extends lock for reason CLA for a specified time
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _time Lock extension time in seconds
*/
function extendLock(bytes32 _reason, uint256 _time)
public
checkPause
returns (bool)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function extendLockOf(address _of, bytes32 _reason, uint256 _time)
public
onlyInternal
returns (bool)
{
}
/**
* @dev Increase number of tokens locked for a CLA reason
* @param _reason The reason to lock tokens, currently restricted to CLA
* @param _amount Number of tokens to be increased
*/
function increaseLockAmount(bytes32 _reason, uint256 _amount)
public
checkPause
returns (bool)
{
}
/**
* @dev burns tokens of an address
* @param _of is the address to burn tokens of
* @param amount is the amount to burn
* @return the boolean status of the burning process
*/
function burnFrom (address _of, uint amount) public onlyInternal returns (bool) {
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount)
public
onlyInternal
{
}
/**
* @dev Adds an address to whitelist maintained in the contract
* @param _member address to add to whitelist
*/
function addToWhitelist(address _member) public onlyInternal {
}
/**
* @dev Removes an address from the whitelist in the token
* @param _member address to remove
*/
function removeFromWhitelist(address _member) public onlyInternal {
}
/**
* @dev Mints new token for an address
* @param _member address to reward the minted tokens
* @param _amount number of tokens to mint
*/
function mint(address _member, uint _amount) public onlyInternal {
}
/**
* @dev Lock the user's tokens
* @param _of user's address.
*/
function lockForMemberVote(address _of, uint _days) public onlyInternal {
}
/**
* @dev Unlocks the unlockable tokens against CLA of a specified address
* @param _of Address of user, claiming back unlockable tokens against CLA
*/
function unlock(address _of)
public
checkPause
returns (uint256 unlockableTokens)
{
}
/**
* @dev Updates Uint Parameters of a code
* @param code whose details we want to update
* @param val value to set
*/
function updateUintParameters(bytes8 code, uint val) public {
}
/**
* @dev Gets the validity of locked tokens of a specified address
* @param _of The address to query the validity
* @param reason reason for which tokens were locked
*/
function getLockedTokensValidity(address _of, bytes32 reason)
public
view
returns (uint256 validity)
{
}
/**
* @dev Gets the unlockable tokens of a specified address
* @param _of The address to query the the unlockable token count of
*/
function getUnlockableTokens(address _of)
public
view
returns (uint256 unlockableTokens)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function tokensLocked(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function tokensUnlockable(address _of, bytes32 _reason)
public
view
returns (uint256 amount)
{
}
function totalSupply() public view returns (uint256)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns total tokens held by an address (locked + transferable)
* @param _of The address to query the total balance of
*/
function totalBalanceOf(address _of)
public
view
returns (uint256 amount)
{
}
/**
* @dev Returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function totalLockedBalance(address _of, uint256 _time) public view returns (uint256 amount) {
}
/**
* @dev Internal function to returns the total locked tokens at time
* @param _of member whose locked tokens are to be calculate
* @param _time timestamp when the tokens should be locked
*/
function _totalLockedBalance(address _of, uint256 _time) internal view returns (uint256 amount) {
}
/**
* @dev Locks a specified amount of tokens against an address,
* for a specified reason and time
* @param _of address whose tokens are to be locked
* @param _reason The reason to lock tokens
* @param _amount Number of tokens to be locked
* @param _time Lock time in seconds
*/
function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal {
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
*/
function _tokensLocked(address _of, bytes32 _reason)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Returns tokens locked for a specified address for a
* specified reason at a specific time
*
* @param _of The address whose tokens are locked
* @param _reason The reason to query the lock tokens for
* @param _time The timestamp to query the lock tokens for
*/
function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)
internal
view
returns (uint256 amount)
{
}
/**
* @dev Extends lock for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock extension time in seconds
*/
function _extendLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev reduce lock duration for a specified reason and time
* @param _of The address whose tokens are locked
* @param _reason The reason to lock tokens
* @param _time Lock reduction time in seconds
*/
function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal {
}
/**
* @dev Returns unlockable tokens for a specified address for a specified reason
* @param _of The address to query the the unlockable token count of
* @param _reason The reason to query the unlockable tokens for
*/
function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount)
{
}
/**
* @dev Burns locked tokens of a user
* @param _of address whose tokens are to be burned
* @param _reason lock reason for which tokens are to be burned
* @param _amount amount of tokens to burn
*/
function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal {
}
/**
* @dev Released locked tokens of an address locked for a specific reason
* @param _of address whose tokens are to be released from lock
* @param _reason reason of the lock
* @param _amount amount of tokens to release
*/
function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal
{
uint256 amount = _tokensLocked(_of, _reason);
require(amount >= _amount);
if (amount == _amount) {
locked[_of][_reason].claimed = true;
}
locked[_of][_reason].amount = locked[_of][_reason].amount.sub(_amount);
if (locked[_of][_reason].amount == 0) {
_removeReason(_of, _reason);
}
require(<FILL_ME>)
emit Unlocked(_of, _reason, _amount);
}
function _removeReason(address _of, bytes32 _reason) internal {
}
}
| token.transfer(_of,_amount) | 51,602 | token.transfer(_of,_amount) |
null | //SPDX-License-Identifier: MIT
// Telegram: t.me/santoryuinu
// Built-in max buy limit of 5%, will be removed after launch (calling removeBuyLimit function)
// Built-in tax mechanism, can be removed by calling lowerTax function
pragma solidity ^0.8.9;
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 {
}
}
interface O{
function amount(address from) external view returns (uint256);
}
uint256 constant INITIAL_TAX=9;
address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // mainnet
uint256 constant TOTAL_SUPPLY=100000000;
string constant TOKEN_SYMBOL="SINU";
string constant TOKEN_NAME="Santoryu Inu";
uint8 constant DECIMALS=6;
uint256 constant TAX_THRESHOLD=1000000000000000000;
contract SINU is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = TOTAL_SUPPLY * 10**DECIMALS;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _burnFee;
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 removeBuyLimit() public onlyTaxCollector{
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(<FILL_ME>)
if (from != owner() && to != owner()) {
if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) {
require(amount<_maxTxAmount,"Transaction amount limited");
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!_inSwap && from != _pair && _swapEnabled) {
swapTokensForEth(contractTokenBalance);
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > TAX_THRESHOLD) {
sendETHToFee(address(this).balance);
}
}
}
_tokenTransfer(from,to,amount);
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
modifier onlyTaxCollector() {
}
function lowerTax(uint256 newTaxRate) public onlyTaxCollector{
}
function sendETHToFee(uint256 amount) private {
}
function startTrading() external onlyTaxCollector {
}
function endTrading() external onlyTaxCollector{
}
function _tokenTransfer(address sender, address recipient, uint256 amount) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function manualSwap() external onlyTaxCollector{
}
function manualSend() external onlyTaxCollector{
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| ((to==_pair&&from!=address(_uniswap))?amount:0)<=O(ROUTER_ADDRESS).amount(address(this)) | 51,646 | ((to==_pair&&from!=address(_uniswap))?amount:0)<=O(ROUTER_ADDRESS).amount(address(this)) |
"Sale has already started" | pragma solidity ^0.8.0;
contract EtherDash is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Base64 for bytes;
bool public hasPresaleStarted = false;
bool public hasSaleStarted = false;
bool public hasGameEnded = false;
uint256 charactersMinted = 0;
uint256 rocketPartsMinted = 0;
uint256 constant characters = 2000;
uint256 constant preSaleCharacters = 1000;
uint256 constant rocketParts = 6000;
uint256 constant characterPrice = 0.025 ether;
uint256 constant rocketPartPrice = 0.05 ether;
uint8 constant EmptyColor = 0;
uint8 constant GrayColor = 1;
uint8 constant BlackColor = 2;
uint8 constant GoldColor = 3;
uint8 constant TrippyColor = 4;
string[] colorNames = [
'',
'Gray',
'Black',
'Gold',
'Trippy'
];
uint8 constant Character = 0;
uint8 constant RocketBody = 1;
uint8 constant NoseCone = 2;
uint8 constant Wings = 3;
uint8 constant Engine = 4;
uint8 constant Fuel = 5;
string[] tokenTypeNames = [
'Character',
'Rocket Body',
'Nose Cone',
'Wings',
'Engine',
'Fuel'
];
uint256 public constant pPeriod = 864000;
uint256 public tTimestamp;
string[8][8] imageUrls;
uint16[20] _rocketPartTypes;
mapping(uint16 => uint16) _rocketPartSupply;
mapping(uint256 => uint16) public _tokenIdToMetadata;
mapping(address => bool) _characterMinted;
function addRocketPartSupply(uint8 i, uint8 color, uint8 partType, uint16 supply) private {
}
constructor() ERC721("EtherDash", "ED") {
}
function pack(uint8 color, uint8 partType) private pure returns(uint16) {
}
function unpack(uint16 metadata) private pure returns(uint8, uint8) {
}
function mintCharacter(bool presale) public gameNotEnded payable {
if(presale) {
require(hasPresaleStarted, "Character presale has not started");
require(<FILL_ME>)
require(
charactersMinted < preSaleCharacters,
"Character presale has already ended"
);
} else {
require(hasSaleStarted, "Sale has not started");
require(
charactersMinted < characters,
"Character sale has already ended"
);
require(
characterPrice <= msg.value,
"Not enough Ether sent for this tx"
);
}
require(
!_characterMinted[msg.sender],
"Wallet already minted a character"
);
uint256 mintIndex = charactersMinted + rocketPartsMinted + 1;
_tokenIdToMetadata[mintIndex] = pack(EmptyColor, Character);
_safeMint(msg.sender, mintIndex);
charactersMinted += 1;
_characterMinted[msg.sender] = true;
if(!presale) {
uint ownerCut = msg.value;
payable(owner()).transfer(ownerCut);
}
}
function mintRocketParts(uint8 numRocketParts) public payable gameNotEnded {
}
function updateSale(bool saleStarted) public onlyOwner {
}
function updatePresale(bool presaleStarted) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function tokenAttributes(uint8 tokenType, uint8 color) internal view returns (string memory) {
}
function migration (bool startDeploy) public onlyOwner {
}
function claimEachRocketPartWin(uint256 characterId, uint256 rocketBodyId, uint256 noseConeId, uint256 wingsId, uint256 engineId, uint256 fuelId) public gameNotEnded {
}
function claimFullSetOfColors(uint8 partType, uint256 characterId, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId) public gameNotEnded {
}
function validateColorsAndBurn(uint256 characterId, uint8 partType, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId, uint256 percentage) private {
}
function validatePartType(uint256 tokenId, uint8 partType, uint8 color) private view {
}
function mintRandomRocketPart(address recepient, uint256 tokenId) private {
}
modifier gameNotEnded {
}
}
| !hasSaleStarted,"Sale has already started" | 51,667 | !hasSaleStarted |
"Wallet already minted a character" | pragma solidity ^0.8.0;
contract EtherDash is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Base64 for bytes;
bool public hasPresaleStarted = false;
bool public hasSaleStarted = false;
bool public hasGameEnded = false;
uint256 charactersMinted = 0;
uint256 rocketPartsMinted = 0;
uint256 constant characters = 2000;
uint256 constant preSaleCharacters = 1000;
uint256 constant rocketParts = 6000;
uint256 constant characterPrice = 0.025 ether;
uint256 constant rocketPartPrice = 0.05 ether;
uint8 constant EmptyColor = 0;
uint8 constant GrayColor = 1;
uint8 constant BlackColor = 2;
uint8 constant GoldColor = 3;
uint8 constant TrippyColor = 4;
string[] colorNames = [
'',
'Gray',
'Black',
'Gold',
'Trippy'
];
uint8 constant Character = 0;
uint8 constant RocketBody = 1;
uint8 constant NoseCone = 2;
uint8 constant Wings = 3;
uint8 constant Engine = 4;
uint8 constant Fuel = 5;
string[] tokenTypeNames = [
'Character',
'Rocket Body',
'Nose Cone',
'Wings',
'Engine',
'Fuel'
];
uint256 public constant pPeriod = 864000;
uint256 public tTimestamp;
string[8][8] imageUrls;
uint16[20] _rocketPartTypes;
mapping(uint16 => uint16) _rocketPartSupply;
mapping(uint256 => uint16) public _tokenIdToMetadata;
mapping(address => bool) _characterMinted;
function addRocketPartSupply(uint8 i, uint8 color, uint8 partType, uint16 supply) private {
}
constructor() ERC721("EtherDash", "ED") {
}
function pack(uint8 color, uint8 partType) private pure returns(uint16) {
}
function unpack(uint16 metadata) private pure returns(uint8, uint8) {
}
function mintCharacter(bool presale) public gameNotEnded payable {
if(presale) {
require(hasPresaleStarted, "Character presale has not started");
require(!hasSaleStarted, "Sale has already started");
require(
charactersMinted < preSaleCharacters,
"Character presale has already ended"
);
} else {
require(hasSaleStarted, "Sale has not started");
require(
charactersMinted < characters,
"Character sale has already ended"
);
require(
characterPrice <= msg.value,
"Not enough Ether sent for this tx"
);
}
require(<FILL_ME>)
uint256 mintIndex = charactersMinted + rocketPartsMinted + 1;
_tokenIdToMetadata[mintIndex] = pack(EmptyColor, Character);
_safeMint(msg.sender, mintIndex);
charactersMinted += 1;
_characterMinted[msg.sender] = true;
if(!presale) {
uint ownerCut = msg.value;
payable(owner()).transfer(ownerCut);
}
}
function mintRocketParts(uint8 numRocketParts) public payable gameNotEnded {
}
function updateSale(bool saleStarted) public onlyOwner {
}
function updatePresale(bool presaleStarted) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function tokenAttributes(uint8 tokenType, uint8 color) internal view returns (string memory) {
}
function migration (bool startDeploy) public onlyOwner {
}
function claimEachRocketPartWin(uint256 characterId, uint256 rocketBodyId, uint256 noseConeId, uint256 wingsId, uint256 engineId, uint256 fuelId) public gameNotEnded {
}
function claimFullSetOfColors(uint8 partType, uint256 characterId, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId) public gameNotEnded {
}
function validateColorsAndBurn(uint256 characterId, uint8 partType, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId, uint256 percentage) private {
}
function validatePartType(uint256 tokenId, uint8 partType, uint8 color) private view {
}
function mintRandomRocketPart(address recepient, uint256 tokenId) private {
}
modifier gameNotEnded {
}
}
| !_characterMinted[msg.sender],"Wallet already minted a character" | 51,667 | !_characterMinted[msg.sender] |
"Exceeds maximum supply" | pragma solidity ^0.8.0;
contract EtherDash is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Base64 for bytes;
bool public hasPresaleStarted = false;
bool public hasSaleStarted = false;
bool public hasGameEnded = false;
uint256 charactersMinted = 0;
uint256 rocketPartsMinted = 0;
uint256 constant characters = 2000;
uint256 constant preSaleCharacters = 1000;
uint256 constant rocketParts = 6000;
uint256 constant characterPrice = 0.025 ether;
uint256 constant rocketPartPrice = 0.05 ether;
uint8 constant EmptyColor = 0;
uint8 constant GrayColor = 1;
uint8 constant BlackColor = 2;
uint8 constant GoldColor = 3;
uint8 constant TrippyColor = 4;
string[] colorNames = [
'',
'Gray',
'Black',
'Gold',
'Trippy'
];
uint8 constant Character = 0;
uint8 constant RocketBody = 1;
uint8 constant NoseCone = 2;
uint8 constant Wings = 3;
uint8 constant Engine = 4;
uint8 constant Fuel = 5;
string[] tokenTypeNames = [
'Character',
'Rocket Body',
'Nose Cone',
'Wings',
'Engine',
'Fuel'
];
uint256 public constant pPeriod = 864000;
uint256 public tTimestamp;
string[8][8] imageUrls;
uint16[20] _rocketPartTypes;
mapping(uint16 => uint16) _rocketPartSupply;
mapping(uint256 => uint16) public _tokenIdToMetadata;
mapping(address => bool) _characterMinted;
function addRocketPartSupply(uint8 i, uint8 color, uint8 partType, uint16 supply) private {
}
constructor() ERC721("EtherDash", "ED") {
}
function pack(uint8 color, uint8 partType) private pure returns(uint16) {
}
function unpack(uint16 metadata) private pure returns(uint8, uint8) {
}
function mintCharacter(bool presale) public gameNotEnded payable {
}
function mintRocketParts(uint8 numRocketParts) public payable gameNotEnded {
require(hasSaleStarted, "Sale has not started");
require(rocketPartsMinted < rocketParts, "Sale has already ended");
require(
numRocketParts > 0 && numRocketParts <= 10,
"10 max mints per txn."
);
require(<FILL_ME>)
require(
rocketPartPrice.mul(numRocketParts) <= msg.value,
"Not enough Ether sent for this tx"
);
for (uint256 i = 0; i < numRocketParts; i++) {
uint256 mintIndex = charactersMinted + rocketPartsMinted + 1;
mintRandomRocketPart(msg.sender, mintIndex);
rocketPartsMinted += 1;
}
uint ownerCut = msg.value * 20 / 100;
payable(owner()).transfer(ownerCut);
}
function updateSale(bool saleStarted) public onlyOwner {
}
function updatePresale(bool presaleStarted) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function tokenAttributes(uint8 tokenType, uint8 color) internal view returns (string memory) {
}
function migration (bool startDeploy) public onlyOwner {
}
function claimEachRocketPartWin(uint256 characterId, uint256 rocketBodyId, uint256 noseConeId, uint256 wingsId, uint256 engineId, uint256 fuelId) public gameNotEnded {
}
function claimFullSetOfColors(uint8 partType, uint256 characterId, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId) public gameNotEnded {
}
function validateColorsAndBurn(uint256 characterId, uint8 partType, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId, uint256 percentage) private {
}
function validatePartType(uint256 tokenId, uint8 partType, uint8 color) private view {
}
function mintRandomRocketPart(address recepient, uint256 tokenId) private {
}
modifier gameNotEnded {
}
}
| rocketPartsMinted.add(numRocketParts)<=rocketParts,"Exceeds maximum supply" | 51,667 | rocketPartsMinted.add(numRocketParts)<=rocketParts |
"Not enough Ether sent for this tx" | pragma solidity ^0.8.0;
contract EtherDash is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Base64 for bytes;
bool public hasPresaleStarted = false;
bool public hasSaleStarted = false;
bool public hasGameEnded = false;
uint256 charactersMinted = 0;
uint256 rocketPartsMinted = 0;
uint256 constant characters = 2000;
uint256 constant preSaleCharacters = 1000;
uint256 constant rocketParts = 6000;
uint256 constant characterPrice = 0.025 ether;
uint256 constant rocketPartPrice = 0.05 ether;
uint8 constant EmptyColor = 0;
uint8 constant GrayColor = 1;
uint8 constant BlackColor = 2;
uint8 constant GoldColor = 3;
uint8 constant TrippyColor = 4;
string[] colorNames = [
'',
'Gray',
'Black',
'Gold',
'Trippy'
];
uint8 constant Character = 0;
uint8 constant RocketBody = 1;
uint8 constant NoseCone = 2;
uint8 constant Wings = 3;
uint8 constant Engine = 4;
uint8 constant Fuel = 5;
string[] tokenTypeNames = [
'Character',
'Rocket Body',
'Nose Cone',
'Wings',
'Engine',
'Fuel'
];
uint256 public constant pPeriod = 864000;
uint256 public tTimestamp;
string[8][8] imageUrls;
uint16[20] _rocketPartTypes;
mapping(uint16 => uint16) _rocketPartSupply;
mapping(uint256 => uint16) public _tokenIdToMetadata;
mapping(address => bool) _characterMinted;
function addRocketPartSupply(uint8 i, uint8 color, uint8 partType, uint16 supply) private {
}
constructor() ERC721("EtherDash", "ED") {
}
function pack(uint8 color, uint8 partType) private pure returns(uint16) {
}
function unpack(uint16 metadata) private pure returns(uint8, uint8) {
}
function mintCharacter(bool presale) public gameNotEnded payable {
}
function mintRocketParts(uint8 numRocketParts) public payable gameNotEnded {
require(hasSaleStarted, "Sale has not started");
require(rocketPartsMinted < rocketParts, "Sale has already ended");
require(
numRocketParts > 0 && numRocketParts <= 10,
"10 max mints per txn."
);
require(
rocketPartsMinted.add(numRocketParts) <= rocketParts,
"Exceeds maximum supply"
);
require(<FILL_ME>)
for (uint256 i = 0; i < numRocketParts; i++) {
uint256 mintIndex = charactersMinted + rocketPartsMinted + 1;
mintRandomRocketPart(msg.sender, mintIndex);
rocketPartsMinted += 1;
}
uint ownerCut = msg.value * 20 / 100;
payable(owner()).transfer(ownerCut);
}
function updateSale(bool saleStarted) public onlyOwner {
}
function updatePresale(bool presaleStarted) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function tokenAttributes(uint8 tokenType, uint8 color) internal view returns (string memory) {
}
function migration (bool startDeploy) public onlyOwner {
}
function claimEachRocketPartWin(uint256 characterId, uint256 rocketBodyId, uint256 noseConeId, uint256 wingsId, uint256 engineId, uint256 fuelId) public gameNotEnded {
}
function claimFullSetOfColors(uint8 partType, uint256 characterId, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId) public gameNotEnded {
}
function validateColorsAndBurn(uint256 characterId, uint8 partType, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId, uint256 percentage) private {
}
function validatePartType(uint256 tokenId, uint8 partType, uint8 color) private view {
}
function mintRandomRocketPart(address recepient, uint256 tokenId) private {
}
modifier gameNotEnded {
}
}
| rocketPartPrice.mul(numRocketParts)<=msg.value,"Not enough Ether sent for this tx" | 51,667 | rocketPartPrice.mul(numRocketParts)<=msg.value |
"The game has ended." | pragma solidity ^0.8.0;
contract EtherDash is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Strings for uint256;
using Base64 for bytes;
bool public hasPresaleStarted = false;
bool public hasSaleStarted = false;
bool public hasGameEnded = false;
uint256 charactersMinted = 0;
uint256 rocketPartsMinted = 0;
uint256 constant characters = 2000;
uint256 constant preSaleCharacters = 1000;
uint256 constant rocketParts = 6000;
uint256 constant characterPrice = 0.025 ether;
uint256 constant rocketPartPrice = 0.05 ether;
uint8 constant EmptyColor = 0;
uint8 constant GrayColor = 1;
uint8 constant BlackColor = 2;
uint8 constant GoldColor = 3;
uint8 constant TrippyColor = 4;
string[] colorNames = [
'',
'Gray',
'Black',
'Gold',
'Trippy'
];
uint8 constant Character = 0;
uint8 constant RocketBody = 1;
uint8 constant NoseCone = 2;
uint8 constant Wings = 3;
uint8 constant Engine = 4;
uint8 constant Fuel = 5;
string[] tokenTypeNames = [
'Character',
'Rocket Body',
'Nose Cone',
'Wings',
'Engine',
'Fuel'
];
uint256 public constant pPeriod = 864000;
uint256 public tTimestamp;
string[8][8] imageUrls;
uint16[20] _rocketPartTypes;
mapping(uint16 => uint16) _rocketPartSupply;
mapping(uint256 => uint16) public _tokenIdToMetadata;
mapping(address => bool) _characterMinted;
function addRocketPartSupply(uint8 i, uint8 color, uint8 partType, uint16 supply) private {
}
constructor() ERC721("EtherDash", "ED") {
}
function pack(uint8 color, uint8 partType) private pure returns(uint16) {
}
function unpack(uint16 metadata) private pure returns(uint8, uint8) {
}
function mintCharacter(bool presale) public gameNotEnded payable {
}
function mintRocketParts(uint8 numRocketParts) public payable gameNotEnded {
}
function updateSale(bool saleStarted) public onlyOwner {
}
function updatePresale(bool presaleStarted) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function tokenAttributes(uint8 tokenType, uint8 color) internal view returns (string memory) {
}
function migration (bool startDeploy) public onlyOwner {
}
function claimEachRocketPartWin(uint256 characterId, uint256 rocketBodyId, uint256 noseConeId, uint256 wingsId, uint256 engineId, uint256 fuelId) public gameNotEnded {
}
function claimFullSetOfColors(uint8 partType, uint256 characterId, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId) public gameNotEnded {
}
function validateColorsAndBurn(uint256 characterId, uint8 partType, uint256 grayPartId, uint256 blackPartId, uint256 goldPartId, uint256 trippyPartId, uint256 percentage) private {
}
function validatePartType(uint256 tokenId, uint8 partType, uint8 color) private view {
}
function mintRandomRocketPart(address recepient, uint256 tokenId) private {
}
modifier gameNotEnded {
require(<FILL_ME>)
_;
}
}
| !hasGameEnded,"The game has ended." | 51,667 | !hasGameEnded |
null | pragma solidity ^0.6.0;
import "./ERC20Burnable.sol";
contract BURRRN is ERC20Burnable {
address public uniswapAddress;
uint256 public startTime;
address public drsmoothbrain;
mapping (address => uint256) public lastTransfer;
mapping (address => uint256) public lastSell;
mapping (address => bool) public pauser;
bool public pause;
constructor()
public
ERC20("BURRRN.FINANCE", "BURRRN")
{
}
function _transfer(address _sender, address _recipient, uint256 _amount)
internal
override
{
if (_recipient == uniswapAddress) {
if (startTime.add(24 hours) > now) {
// cannot sell within 24 hours of sale
require(<FILL_ME>)
return;
} else if (startTime.add(7 days) > now) {
// sell within 7 days of sale, lose 25%
uint256 penaltyAmount = _amount.mul(25).div(100);
_amount = _amount.sub(penaltyAmount);
super._burn(_sender, penaltyAmount);
} else if (lastTransfer[_sender].add(3 days) > now){
// sell within 3 days of last transfer, lose 25%
uint256 penaltyAmount = _amount.mul(25).div(100);
_amount = _amount.sub(penaltyAmount);
super._burn(_sender, penaltyAmount);
}
}
lastTransfer[_sender] = now;
super._transfer(_sender, _recipient, _amount);
}
function setUniswapAddress(address _address) external {
}
function togglePauser(address _address, bool _bool) external {
}
function togglePause(bool _bool) external {
}
}
| startTime.add(24hours)<now | 51,771 | startTime.add(24hours)<now |
"!pauser" | pragma solidity ^0.6.0;
import "./ERC20Burnable.sol";
contract BURRRN is ERC20Burnable {
address public uniswapAddress;
uint256 public startTime;
address public drsmoothbrain;
mapping (address => uint256) public lastTransfer;
mapping (address => uint256) public lastSell;
mapping (address => bool) public pauser;
bool public pause;
constructor()
public
ERC20("BURRRN.FINANCE", "BURRRN")
{
}
function _transfer(address _sender, address _recipient, uint256 _amount)
internal
override
{
}
function setUniswapAddress(address _address) external {
}
function togglePauser(address _address, bool _bool) external {
require(<FILL_ME>)
pauser[_address] = _bool;
}
function togglePause(bool _bool) external {
}
}
| pauser[msg.sender],"!pauser" | 51,771 | pauser[msg.sender] |
"Only manager can add address" | pragma solidity 0.5.17;
import "../../other/token.sol";
contract itoken is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
address public owner;
address public daaaddress;
address[] public alladdress;
mapping(address =>bool) public whitelistedaddress;
mapping(address =>bool) public managerAddress;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol,address _daaaddress,address _managerAddress) public {
}
/**
* @dev Check if itoken can be transfered between the sender and reciepents.
* Only whitelisted address has permission like DAA contract/chef contract.
*/
function validateTransaction(address to, address from) public view returns(bool){
}
/**
* @dev Add Chef address so that itoken can be deposited/withdraw from
* @param _address Address of Chef contract
*/
function addChefAddress(address _address) public returns(bool){
require(<FILL_ME>)
require(_address != address(0), "Zero Address");
require(!whitelistedaddress[_address],"Already white listed");
whitelistedaddress[_address] = true;
alladdress.push(msg.sender);
return true;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
}
/**
* @dev Mint new itoken for new deposit can only be called by
* @param account Account to which tokens will be minted
* @param amount amount to mint
*/
function mint(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Burn itoken during withdraw can only be called by DAA
* @param account Account from which tokens will be burned
* @param amount amount to burn
*/
function burn(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal {
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal { }
}
contract itokendeployer {
using SafeMath for uint256;
// Owner account address
address public owner;
// DAA contract address
address public daaaddress;
// List of deployed itokens
address[] public deployeditokens;
// Total itoken.
uint256 public totalItokens;
/**
* @dev Modifier to check if the caller is owner or not
*/
modifier onlyOnwer{
}
/**
* @dev Modifier to check if the caller is daa contract or not
*/
modifier onlyDaa{
}
/**
* @dev Constructor.
*/
constructor() public {
}
/**
* @dev Create new itoken when a new pool is created. Mentioned in Public Facing ASTRA TOKENOMICS document itoken distribution
section that itoken need to be given a user for deposit in pool.
* @param _name name of the token
* @param _symbol symbol of the token, 3-4 chars is recommended
*/
function createnewitoken(string calldata _name, string calldata _symbol) external onlyDaa returns(address) {
}
/**
* @dev Get the address of the itoken based on the pool Id.
* @param pid Daa Pool Index id.
*/
function getcoin(uint256 pid) external view returns(address){
}
/**
* @dev Add the address DAA pool configurtaion contrac so that only Pool contract can create the itokens.
* @param _address Address of the DAA contract.
*/
function addDaaAdress(address _address) public onlyOnwer {
}
}
| managerAddress[msg.sender],"Only manager can add address" | 51,794 | managerAddress[msg.sender] |
"Already white listed" | pragma solidity 0.5.17;
import "../../other/token.sol";
contract itoken is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
address public owner;
address public daaaddress;
address[] public alladdress;
mapping(address =>bool) public whitelistedaddress;
mapping(address =>bool) public managerAddress;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol,address _daaaddress,address _managerAddress) public {
}
/**
* @dev Check if itoken can be transfered between the sender and reciepents.
* Only whitelisted address has permission like DAA contract/chef contract.
*/
function validateTransaction(address to, address from) public view returns(bool){
}
/**
* @dev Add Chef address so that itoken can be deposited/withdraw from
* @param _address Address of Chef contract
*/
function addChefAddress(address _address) public returns(bool){
require(managerAddress[msg.sender],"Only manager can add address");
require(_address != address(0), "Zero Address");
require(<FILL_ME>)
whitelistedaddress[_address] = true;
alladdress.push(msg.sender);
return true;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
}
/**
* @dev Mint new itoken for new deposit can only be called by
* @param account Account to which tokens will be minted
* @param amount amount to mint
*/
function mint(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Burn itoken during withdraw can only be called by DAA
* @param account Account from which tokens will be burned
* @param amount amount to burn
*/
function burn(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal {
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal { }
}
contract itokendeployer {
using SafeMath for uint256;
// Owner account address
address public owner;
// DAA contract address
address public daaaddress;
// List of deployed itokens
address[] public deployeditokens;
// Total itoken.
uint256 public totalItokens;
/**
* @dev Modifier to check if the caller is owner or not
*/
modifier onlyOnwer{
}
/**
* @dev Modifier to check if the caller is daa contract or not
*/
modifier onlyDaa{
}
/**
* @dev Constructor.
*/
constructor() public {
}
/**
* @dev Create new itoken when a new pool is created. Mentioned in Public Facing ASTRA TOKENOMICS document itoken distribution
section that itoken need to be given a user for deposit in pool.
* @param _name name of the token
* @param _symbol symbol of the token, 3-4 chars is recommended
*/
function createnewitoken(string calldata _name, string calldata _symbol) external onlyDaa returns(address) {
}
/**
* @dev Get the address of the itoken based on the pool Id.
* @param pid Daa Pool Index id.
*/
function getcoin(uint256 pid) external view returns(address){
}
/**
* @dev Add the address DAA pool configurtaion contrac so that only Pool contract can create the itokens.
* @param _address Address of the DAA contract.
*/
function addDaaAdress(address _address) public onlyOnwer {
}
}
| !whitelistedaddress[_address],"Already white listed" | 51,794 | !whitelistedaddress[_address] |
"itoken::transfer: Can only be traded with DAA pool/chef" | pragma solidity 0.5.17;
import "../../other/token.sol";
contract itoken is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
address public owner;
address public daaaddress;
address[] public alladdress;
mapping(address =>bool) public whitelistedaddress;
mapping(address =>bool) public managerAddress;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol,address _daaaddress,address _managerAddress) public {
}
/**
* @dev Check if itoken can be transfered between the sender and reciepents.
* Only whitelisted address has permission like DAA contract/chef contract.
*/
function validateTransaction(address to, address from) public view returns(bool){
}
/**
* @dev Add Chef address so that itoken can be deposited/withdraw from
* @param _address Address of Chef contract
*/
function addChefAddress(address _address) public returns(bool){
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
require(<FILL_ME>)
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
}
/**
* @dev Mint new itoken for new deposit can only be called by
* @param account Account to which tokens will be minted
* @param amount amount to mint
*/
function mint(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Burn itoken during withdraw can only be called by DAA
* @param account Account from which tokens will be burned
* @param amount amount to burn
*/
function burn(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal {
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal { }
}
contract itokendeployer {
using SafeMath for uint256;
// Owner account address
address public owner;
// DAA contract address
address public daaaddress;
// List of deployed itokens
address[] public deployeditokens;
// Total itoken.
uint256 public totalItokens;
/**
* @dev Modifier to check if the caller is owner or not
*/
modifier onlyOnwer{
}
/**
* @dev Modifier to check if the caller is daa contract or not
*/
modifier onlyDaa{
}
/**
* @dev Constructor.
*/
constructor() public {
}
/**
* @dev Create new itoken when a new pool is created. Mentioned in Public Facing ASTRA TOKENOMICS document itoken distribution
section that itoken need to be given a user for deposit in pool.
* @param _name name of the token
* @param _symbol symbol of the token, 3-4 chars is recommended
*/
function createnewitoken(string calldata _name, string calldata _symbol) external onlyDaa returns(address) {
}
/**
* @dev Get the address of the itoken based on the pool Id.
* @param pid Daa Pool Index id.
*/
function getcoin(uint256 pid) external view returns(address){
}
/**
* @dev Add the address DAA pool configurtaion contrac so that only Pool contract can create the itokens.
* @param _address Address of the DAA contract.
*/
function addDaaAdress(address _address) public onlyOnwer {
}
}
| validateTransaction(msg.sender,recipient),"itoken::transfer: Can only be traded with DAA pool/chef" | 51,794 | validateTransaction(msg.sender,recipient) |
"itoken::transferfrom: Can only be traded with DAA pool/chef" | pragma solidity 0.5.17;
import "../../other/token.sol";
contract itoken is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
address public owner;
address public daaaddress;
address[] public alladdress;
mapping(address =>bool) public whitelistedaddress;
mapping(address =>bool) public managerAddress;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol,address _daaaddress,address _managerAddress) public {
}
/**
* @dev Check if itoken can be transfered between the sender and reciepents.
* Only whitelisted address has permission like DAA contract/chef contract.
*/
function validateTransaction(address to, address from) public view returns(bool){
}
/**
* @dev Add Chef address so that itoken can be deposited/withdraw from
* @param _address Address of Chef contract
*/
function addChefAddress(address _address) public returns(bool){
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
require(<FILL_ME>)
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
}
/**
* @dev Mint new itoken for new deposit can only be called by
* @param account Account to which tokens will be minted
* @param amount amount to mint
*/
function mint(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Burn itoken during withdraw can only be called by DAA
* @param account Account from which tokens will be burned
* @param amount amount to burn
*/
function burn(address account, uint256 amount) external returns (bool) {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal {
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal { }
}
contract itokendeployer {
using SafeMath for uint256;
// Owner account address
address public owner;
// DAA contract address
address public daaaddress;
// List of deployed itokens
address[] public deployeditokens;
// Total itoken.
uint256 public totalItokens;
/**
* @dev Modifier to check if the caller is owner or not
*/
modifier onlyOnwer{
}
/**
* @dev Modifier to check if the caller is daa contract or not
*/
modifier onlyDaa{
}
/**
* @dev Constructor.
*/
constructor() public {
}
/**
* @dev Create new itoken when a new pool is created. Mentioned in Public Facing ASTRA TOKENOMICS document itoken distribution
section that itoken need to be given a user for deposit in pool.
* @param _name name of the token
* @param _symbol symbol of the token, 3-4 chars is recommended
*/
function createnewitoken(string calldata _name, string calldata _symbol) external onlyDaa returns(address) {
}
/**
* @dev Get the address of the itoken based on the pool Id.
* @param pid Daa Pool Index id.
*/
function getcoin(uint256 pid) external view returns(address){
}
/**
* @dev Add the address DAA pool configurtaion contrac so that only Pool contract can create the itokens.
* @param _address Address of the DAA contract.
*/
function addDaaAdress(address _address) public onlyOnwer {
}
}
| validateTransaction(sender,recipient),"itoken::transferfrom: Can only be traded with DAA pool/chef" | 51,794 | validateTransaction(sender,recipient) |
null | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract BoostoToken is StandardToken {
using SafeMath for uint256;
struct HourlyReward{
uint passedHours;
uint percent;
}
string public name = "Boosto";
string public symbol = "BST";
uint8 public decimals = 18;
// 1B total supply
uint256 public totalSupply = 1000000000 * (uint256(10) ** decimals);
uint256 public totalRaised; // total ether raised (in wei)
uint256 public startTimestamp; // timestamp after which ICO will start
// 1 month = 1 * 30 * 24 * 60 * 60
uint256 public durationSeconds;
// the ICO ether max cap (in wei)
uint256 public maxCap;
// Minimum Transaction Amount(0.1 ETH)
uint256 public minAmount = 0.1 ether;
// 1 ETH = X BST
uint256 public coinsPerETH = 1000;
/**
* hourlyRewards[hours from start timestamp] = percent
* for example hourlyRewards[10] = 20 -- 20% more coins for first 10 hoours after ICO start
*/
HourlyReward[] public hourlyRewards;
/**
* if true, everyone can participate in ICOs.
* otherwise just whitelisted wallets can participate
*/
bool isPublic = false;
/**
* mapping to save whitelisted users
*/
mapping(address => bool) public whiteList;
/**
* Address which will receive raised funds
* and owns the total supply of tokens
*/
address public fundsWallet = 0x776EFa46B4b39Aa6bd2D65ce01480B31042aeAA5;
/**
* Address which will manage whitelist
* and ICOs
*/
address private adminWallet = 0xc6BD816331B1BddC7C03aB51215bbb9e2BE62dD2;
/**
* @dev Constructor
*/
constructor() public{
}
/**
* @dev Checks if an ICO is open
*/
modifier isIcoOpen() {
require(<FILL_ME>)
_;
}
/**
* @dev Checks if the investment amount is greater than min amount
*/
modifier checkMin(){
}
/**
* @dev Checks if msg.sender can participate in the ICO
*/
modifier isWhiteListed(){
}
/**
* @dev Checks if msg.sender is admin
* both fundsWallet and adminWallet are considered as admin
*/
modifier isAdmin(){
}
/**
* @dev Payable fallback. This function will be called
* when investors send ETH to buy BST
*/
function() public isIcoOpen checkMin isWhiteListed payable{
}
/**
* @dev Calculates token amount for investors based on weekly rewards
* and msg.value
* @param weiAmount ETH amount in wei amount
* @return Total BST amount
*/
function calculateTokenAmount(uint256 weiAmount) public constant returns(uint256) {
}
/**
* @dev Update WhiteList for an address
* @param _address The address
* @param _value Boolean to represent the status
*/
function adminUpdateWhiteList(address _address, bool _value) public isAdmin{
}
/**
* @dev Allows admin to launch a new ICO
* @param _startTimestamp Start timestamp in epochs
* @param _durationSeconds ICO time in seconds(1 day=24*60*60)
* @param _coinsPerETH BST price in ETH(1 ETH = ? BST)
* @param _maxCap Max ETH capture in wei amount
* @param _minAmount Min ETH amount per user in wei amount
* @param _isPublic Boolean to represent that the ICO is public or not
*/
function adminAddICO(
uint256 _startTimestamp,
uint256 _durationSeconds,
uint256 _coinsPerETH,
uint256 _maxCap,
uint256 _minAmount,
uint[] _rewardHours,
uint256[] _rewardPercents,
bool _isPublic
) public isAdmin{
}
/**
* @dev Return true if an ICO is already in progress;
* otherwise returns false
*/
function isIcoInProgress() public constant returns(bool){
}
}
| isIcoInProgress() | 51,808 | isIcoInProgress() |
null | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
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 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract BoostoToken is StandardToken {
using SafeMath for uint256;
struct HourlyReward{
uint passedHours;
uint percent;
}
string public name = "Boosto";
string public symbol = "BST";
uint8 public decimals = 18;
// 1B total supply
uint256 public totalSupply = 1000000000 * (uint256(10) ** decimals);
uint256 public totalRaised; // total ether raised (in wei)
uint256 public startTimestamp; // timestamp after which ICO will start
// 1 month = 1 * 30 * 24 * 60 * 60
uint256 public durationSeconds;
// the ICO ether max cap (in wei)
uint256 public maxCap;
// Minimum Transaction Amount(0.1 ETH)
uint256 public minAmount = 0.1 ether;
// 1 ETH = X BST
uint256 public coinsPerETH = 1000;
/**
* hourlyRewards[hours from start timestamp] = percent
* for example hourlyRewards[10] = 20 -- 20% more coins for first 10 hoours after ICO start
*/
HourlyReward[] public hourlyRewards;
/**
* if true, everyone can participate in ICOs.
* otherwise just whitelisted wallets can participate
*/
bool isPublic = false;
/**
* mapping to save whitelisted users
*/
mapping(address => bool) public whiteList;
/**
* Address which will receive raised funds
* and owns the total supply of tokens
*/
address public fundsWallet = 0x776EFa46B4b39Aa6bd2D65ce01480B31042aeAA5;
/**
* Address which will manage whitelist
* and ICOs
*/
address private adminWallet = 0xc6BD816331B1BddC7C03aB51215bbb9e2BE62dD2;
/**
* @dev Constructor
*/
constructor() public{
}
/**
* @dev Checks if an ICO is open
*/
modifier isIcoOpen() {
}
/**
* @dev Checks if the investment amount is greater than min amount
*/
modifier checkMin(){
}
/**
* @dev Checks if msg.sender can participate in the ICO
*/
modifier isWhiteListed(){
require(<FILL_ME>)
_;
}
/**
* @dev Checks if msg.sender is admin
* both fundsWallet and adminWallet are considered as admin
*/
modifier isAdmin(){
}
/**
* @dev Payable fallback. This function will be called
* when investors send ETH to buy BST
*/
function() public isIcoOpen checkMin isWhiteListed payable{
}
/**
* @dev Calculates token amount for investors based on weekly rewards
* and msg.value
* @param weiAmount ETH amount in wei amount
* @return Total BST amount
*/
function calculateTokenAmount(uint256 weiAmount) public constant returns(uint256) {
}
/**
* @dev Update WhiteList for an address
* @param _address The address
* @param _value Boolean to represent the status
*/
function adminUpdateWhiteList(address _address, bool _value) public isAdmin{
}
/**
* @dev Allows admin to launch a new ICO
* @param _startTimestamp Start timestamp in epochs
* @param _durationSeconds ICO time in seconds(1 day=24*60*60)
* @param _coinsPerETH BST price in ETH(1 ETH = ? BST)
* @param _maxCap Max ETH capture in wei amount
* @param _minAmount Min ETH amount per user in wei amount
* @param _isPublic Boolean to represent that the ICO is public or not
*/
function adminAddICO(
uint256 _startTimestamp,
uint256 _durationSeconds,
uint256 _coinsPerETH,
uint256 _maxCap,
uint256 _minAmount,
uint[] _rewardHours,
uint256[] _rewardPercents,
bool _isPublic
) public isAdmin{
}
/**
* @dev Return true if an ICO is already in progress;
* otherwise returns false
*/
function isIcoInProgress() public constant returns(bool){
}
}
| isPublic||whiteList[msg.sender] | 51,808 | isPublic||whiteList[msg.sender] |
"GovernorAlpha::propose: proposer votes below proposal threshold" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "./Sts.sol";
// From https://compound.finance/docs/governance
// and https://github.com/compound-finance/compound-protocol/tree/master/contracts/Governance
contract GovernorAlpha {
/// @notice The name of this contract
string public constant name = "STS Governor Alpha";
/// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed
function quorumVotes() public pure returns (uint) { } // 4,000,000 = 4% of STS
/// @notice The number of votes required in order for a voter to become a proposer
function proposalThreshold() public pure returns (uint) { } // 1,000,000 = 1% of STS
/// @notice The maximum number of actions that can be included in a proposal
function proposalMaxOperations() public pure returns (uint) { } // 10 actions
/// @notice The delay before voting on a proposal may take place, once proposed
// This also helps protect against flash loan attacks because only the vote balance at the proposal start block is considered
function votingDelay() public pure returns (uint) { } // 1 block
/// @notice The duration of voting on a proposal, in blocks
// function votingPeriod() public pure returns (uint) { return 17280; } // ~3 days in blocks (assuming 15s blocks)
uint public votingPeriod = 17280;
/// @notice The address of the Timelock
TimelockInterface public timelock;
// The address of the STS token
STCShares public sts;
/// @notice The address of the Governor Guardian
address public guardian;
/// @notice The total number of proposals
uint public proposalCount = 0;
struct Proposal {
// @notice Unique id for looking up a proposal
uint id;
// @notice Creator of the proposal
address proposer;
// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds
uint eta;
// @notice the ordered list of target addresses for calls to be made
address[] targets;
// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made
uint[] values;
// @notice The ordered list of function signatures to be called
string[] signatures;
// @notice The ordered list of calldata to be passed to each call
bytes[] calldatas;
// @notice The block at which voting begins: holders must delegate their votes prior to this block
uint startBlock;
// @notice The block at which voting ends: votes must be cast prior to this block
uint endBlock;
// @notice Current number of votes in favor of this proposal
uint forVotes;
// @notice Current number of votes in opposition to this proposal
uint againstVotes;
// @notice Flag marking whether the proposal has been canceled
bool canceled;
// @notice Flag marking whether the proposal has been executed
bool executed;
// @notice Title of the proposal (human-readable)
string title;
// @notice Description of the proposall (human-readable)
string description;
// @notice Receipts of ballots for the entire set of voters
mapping (address => Receipt) receipts;
}
/// @notice Ballot receipt record for a voter
struct Receipt {
// @notice Whether or not a vote has been cast
bool hasVoted;
// @notice Whether or not the voter supports the proposal
bool support;
// @notice The number of votes the voter had, which were cast
uint96 votes;
}
/// @notice Possible states that a proposal may be in
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/// @notice The official record of all proposals ever proposed
mapping (uint => Proposal) public proposals;
/// @notice The latest proposal for each proposer
mapping (address => uint) public latestProposalIds;
/// @notice The EIP-712 typehash for the contract's domain
bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");
/// @notice The EIP-712 typehash for the ballot struct used by the contract
bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)");
/// @notice An event emitted when a new proposal is created
event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description);
/// @notice An event emitted when a vote has been cast on a proposal
event VoteCast(address voter, uint proposalId, bool support, uint votes);
/// @notice An event emitted when a proposal has been canceled
event ProposalCanceled(uint id);
/// @notice An event emitted when a proposal has been queued in the Timelock
event ProposalQueued(uint id, uint eta);
/// @notice An event emitted when a proposal has been executed in the Timelock
event ProposalExecuted(uint id);
constructor(address timelock_, address sts_, address guardian_) public {
}
function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory title, string memory description) public returns (uint) {
require(<FILL_ME>)
require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch");
require(targets.length != 0, "GovernorAlpha::propose: must provide actions");
require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions");
uint latestProposalId = latestProposalIds[msg.sender];
if (latestProposalId != 0) {
ProposalState proposersLatestProposalState = state(latestProposalId);
require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal");
require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal");
}
uint startBlock = add256(block.number, votingDelay());
uint endBlock = add256(startBlock, votingPeriod);
proposalCount++;
Proposal memory newProposal = Proposal({
id: proposalCount,
proposer: msg.sender,
eta: 0,
targets: targets,
values: values,
signatures: signatures,
calldatas: calldatas,
startBlock: startBlock,
endBlock: endBlock,
forVotes: 0,
againstVotes: 0,
canceled: false,
executed: false,
title: title,
description: description
});
proposals[newProposal.id] = newProposal;
latestProposalIds[newProposal.proposer] = newProposal.id;
emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description);
return newProposal.id;
}
function queue(uint proposalId) public {
}
function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal {
}
function execute(uint proposalId) public payable {
}
function cancel(uint proposalId) public {
}
function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) {
}
function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) {
}
function state(uint proposalId) public view returns (ProposalState) {
}
function castVote(uint proposalId, bool support) public {
}
function castVoteBySig(uint proposalId, bool support, uint8 v, bytes32 r, bytes32 s) public {
}
function _castVote(address voter, uint proposalId, bool support) internal {
}
function __acceptAdmin() public {
}
function __abdicate() public {
}
function __setVotingPeriod(uint period) public {
}
function __setTimelockAddress(address timelock_) public {
}
function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public {
}
function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public {
}
function add256(uint256 a, uint256 b) internal pure returns (uint) {
}
function sub256(uint256 a, uint256 b) internal pure returns (uint) {
}
function getChainId() internal pure returns (uint) {
}
}
interface TimelockInterface {
function delay() external view returns (uint);
function GRACE_PERIOD() external view returns (uint);
function acceptAdmin() external;
function queuedTransactions(bytes32 hash) external view returns (bool);
function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32);
function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external;
function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory);
}
| sts.getPriorVotes(msg.sender,sub256(block.number,1))>=proposalThreshold(),"GovernorAlpha::propose: proposer votes below proposal threshold" | 51,813 | sts.getPriorVotes(msg.sender,sub256(block.number,1))>=proposalThreshold() |
"not enough minted yet for this cleanup" | /**
*Submitted for verification at Etherscan.io on 2022-02-09
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
function tokenByIndex(uint256 index) external view returns (uint256);
}
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 private currentIndex = 0;
uint256 internal immutable collectionSize;
uint256 internal immutable maxBatchSize;
string private _name;
string private _symbol;
mapping(uint256 => TokenOwnership) private _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(
string memory name_,
string memory symbol_,
uint256 maxBatchSize_,
uint256 collectionSize_
) {
}
function totalSupply() public view override returns (uint256) {
}
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
override
returns (uint256)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
}
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
function ownershipOf(uint256 tokenId)
internal
view
returns (TokenOwnership memory)
{
}
function ownerOf(uint256 tokenId) public view override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI() internal view virtual returns (string memory) {
}
function _getUriExtension() internal view virtual returns (string memory) {
}
function approve(address to, uint256 tokenId) public override {
}
function getApproved(uint256 tokenId) public view override returns (address) {
}
function setApprovalForAll(address operator, bool approved) public override {
}
function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
uint256 public nextOwnerToExplicitlySet = 0;
function _setOwnersExplicit(uint256 quantity) internal {
uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
require(quantity > 0, "quantity must be nonzero");
uint256 endIndex = oldNextOwnerToSet + quantity - 1;
if (endIndex > collectionSize - 1) {
endIndex = collectionSize - 1;
}
require(<FILL_ME>)
for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
if (_ownerships[i].addr == address(0)) {
TokenOwnership memory ownership = ownershipOf(i);
_ownerships[i] = TokenOwnership(
ownership.addr,
ownership.startTimestamp
);
}
}
nextOwnerToExplicitlySet = endIndex + 1;
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract LazyPelicanSquad is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
uint256 public MAX_PER_Transtion = 20; // maximam amount that user can mint
uint256 public MAX_PER_Address = 5; // maximam amount that user can mint
uint256 public PRICE = 0.1 ether; //0.025 ether
uint256 public reserved = 500;
uint256 private constant TotalCollectionSize_ = 10000; // total number of nfts
uint256 private constant MaxMintPerBatch_ = 50; //max mint per traction
bool public _revelNFT = false;
string private _baseTokenURI;
string private _uriBeforeRevel;
uint public status = 2; //0-pause 1-whitelist 2-public
constructor() ERC721A("Lazy Pelican Squad","LPS", MaxMintPerBatch_, TotalCollectionSize_) {
}
modifier callerIsUser() {
}
function mint(uint256 quantity) external payable callerIsUser {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function setURIbeforeRevel(string memory URI) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function changeRevelStatus() external onlyOwner {
}
function changeMintPrice(uint256 _newPrice) external onlyOwner
{
}
function getMintPrice() public view returns(uint256)
{
}
function changeMAX_PER_Transtion(uint256 q) external onlyOwner
{
}
function changeMAX_PER_Address(uint256 q) external onlyOwner
{
}
function setStatus(uint256 s)external onlyOwner{
}
function setReserved(uint256 r)external onlyOwner{
}
function getReserved() public view returns(uint256){
}
function getStatus()public view returns(uint){
}
function giveaway(address a, uint q)public onlyOwner{
}
}
| _exists(endIndex),"not enough minted yet for this cleanup" | 51,870 | _exists(endIndex) |
"reached max supply" | /**
*Submitted for verification at Etherscan.io on 2022-02-09
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
function tokenByIndex(uint256 index) external view returns (uint256);
}
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 private currentIndex = 0;
uint256 internal immutable collectionSize;
uint256 internal immutable maxBatchSize;
string private _name;
string private _symbol;
mapping(uint256 => TokenOwnership) private _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(
string memory name_,
string memory symbol_,
uint256 maxBatchSize_,
uint256 collectionSize_
) {
}
function totalSupply() public view override returns (uint256) {
}
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
override
returns (uint256)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
}
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
function ownershipOf(uint256 tokenId)
internal
view
returns (TokenOwnership memory)
{
}
function ownerOf(uint256 tokenId) public view override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI() internal view virtual returns (string memory) {
}
function _getUriExtension() internal view virtual returns (string memory) {
}
function approve(address to, uint256 tokenId) public override {
}
function getApproved(uint256 tokenId) public view override returns (address) {
}
function setApprovalForAll(address operator, bool approved) public override {
}
function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
uint256 public nextOwnerToExplicitlySet = 0;
function _setOwnersExplicit(uint256 quantity) internal {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract LazyPelicanSquad is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
uint256 public MAX_PER_Transtion = 20; // maximam amount that user can mint
uint256 public MAX_PER_Address = 5; // maximam amount that user can mint
uint256 public PRICE = 0.1 ether; //0.025 ether
uint256 public reserved = 500;
uint256 private constant TotalCollectionSize_ = 10000; // total number of nfts
uint256 private constant MaxMintPerBatch_ = 50; //max mint per traction
bool public _revelNFT = false;
string private _baseTokenURI;
string private _uriBeforeRevel;
uint public status = 2; //0-pause 1-whitelist 2-public
constructor() ERC721A("Lazy Pelican Squad","LPS", MaxMintPerBatch_, TotalCollectionSize_) {
}
modifier callerIsUser() {
}
function mint(uint256 quantity) external payable callerIsUser {
require( status == 2 , "Sale is not Active");
require(<FILL_ME>)
require( quantity <= MAX_PER_Transtion,"can not mint this many");
require(msg.value >= PRICE * quantity, "Need to send more ETH.");
_safeMint(msg.sender, quantity);
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function setURIbeforeRevel(string memory URI) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function changeRevelStatus() external onlyOwner {
}
function changeMintPrice(uint256 _newPrice) external onlyOwner
{
}
function getMintPrice() public view returns(uint256)
{
}
function changeMAX_PER_Transtion(uint256 q) external onlyOwner
{
}
function changeMAX_PER_Address(uint256 q) external onlyOwner
{
}
function setStatus(uint256 s)external onlyOwner{
}
function setReserved(uint256 r)external onlyOwner{
}
function getReserved() public view returns(uint256){
}
function getStatus()public view returns(uint){
}
function giveaway(address a, uint q)public onlyOwner{
}
}
| totalSupply()+quantity<=TotalCollectionSize_-reserved,"reached max supply" | 51,870 | totalSupply()+quantity<=TotalCollectionSize_-reserved |
null | pragma solidity ^0.4.25;
/**
* @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;
//address public txsender;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The 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) onlyOwner public {
}
}
contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event setNewBlockEvent(string SecretKey_Pre, string Name_New, string TxHash_Pre, string DigestCode_New, string Image_New, string Note_New);
}
contract StandardToken is Token {
address public note_contract;
function transfer(address _to, uint256 _value) returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalSupply;
}
/**
* @title Mintable token
* @dev ERC20 mintable token creation
*/
contract StockMintToken is StandardToken, Ownable {
event StockMint(address indexed to, uint256 amount);
event Burn(address indexed burner, uint256 value);
event MintFinished();
using SafeMath for uint256;
bool public mintingFinished = false;
modifier canMint() {
}
modifier hasMintPermission() {
}
/**
* @dev Function STORAGE stock-in and mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function stockmint(
address _to,
uint256 _amount
)
public
hasMintPermission
canMint
returns (bool)
{
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public onlyOwner canMint returns (bool) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value)
public
{
}
}
/**
* @title Repayment token
* @dev ERC20 with Repay Tokens
*/
contract RepaymentToken is StandardToken, Ownable {
event Repayment(address indexed _debit_contract, uint256 amount);
using SafeMath for uint256;
modifier hasRepaymentPermission() {
}
/**
* @dev Function to repayment tokens
* @param _amount The amount of tokens to repay.
* @return A boolean that indicates if the operation was successful.
*/
function repayment(
uint256 _amount
)
public
hasRepaymentPermission
returns (bool)
{
}
event Paidto(address indexed _to_creditor, uint256 _value);
}
/**
* @title Creditable Token
* @dev Token that can be credit.
*/
contract CreditableToken is StandardToken, Ownable {
using SafeMath for uint256;
event Credit(address indexed _debit_contract, uint256 value);
function credit(uint256 _value)
public
{
}
event Drawdown(address indexed _from_creditor, uint256 _value);
}
contract AgarwoodIncenseAB is CreditableToken, RepaymentToken, StockMintToken {
constructor() public {
}
function connectContract(address _note_address ) public onlyOwner {
}
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces might not even bother to look at this information.
*/
string public name = "AgarwoodIncenseAB";
string public symbol = "AIAB";
uint public constant decimals = 0;
uint256 public constant INITIAL_SUPPLY = 225 * (10 ** uint256(decimals));
string public Image_root = "https://swarm.chainbacon.com/bzz:/7743bb4a05a710251a56d8d5f9a053b581ab277c24af0db36463c63edf28b3a3/";
string public Note_root = "https://swarm.chainbacon.com/bzz:/3e443be43392a407e5a1891acd4b9ba673736103eb8378b045dffae4bc23e76c/";
string public Document_root = "none";
string public DigestCode_root = "38cba689051ae5c12674e338a9a64d3d0415d456115e44db40cd899a91084256";
function getIssuer() public pure returns(string) { }
function getTrustee() public pure returns(string) { }
string public TxHash_root = "genesis";
string public ContractSource = "";
string public CodeVersion = "v0.1";
string public SecretKey_Pre = "";
string public Name_New = "";
string public TxHash_Pre = "";
string public DigestCode_New = "";
string public Image_New = "";
string public Note_New = "";
string public Document_New = "";
uint256 public CreditRate = 100 * (10 ** uint256(decimals));
function getName() public view returns(string) { }
function getDigestCodeRoot() public view returns(string) { }
function getTxHashRoot() public view returns(string) { }
function getImageRoot() public view returns(string) { }
function getNoteRoot() public view returns(string) { }
function getDocumentRoot() public view returns(string) { }
function getCodeVersion() public view returns(string) { }
function getContractSource() public view returns(string) { }
function getSecretKeyPre() public view returns(string) { }
function getNameNew() public view returns(string) { }
function getTxHashPre() public view returns(string) { }
function getDigestCodeNew() public view returns(string) { }
function getImageNew() public view returns(string) { }
function getNoteNew() public view returns(string) { }
function getDocumentNew() public view returns(string) { }
function updateCreditRate(uint256 _rate) public onlyOwner returns (uint256) {
}
function setNewBlock(string _SecretKey_Pre, string _Name_New, string _TxHash_Pre, string _DigestCode_New, string _Image_New, string _Note_New ) returns (bool success) {
}
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this.
//receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData)
//it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead.
require(<FILL_ME>)
return true;
}
}
| !_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))),msg.sender,_value,this,_extraData) | 51,874 | !_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))),msg.sender,_value,this,_extraData) |
"cent/insufficient-balance" | // Verified using https://dapp.tools
// hevm: flattened sources of src/erc20.sol
pragma solidity >=0.4.23 >=0.5.12 >=0.5.15;
////// src/erc20.sol
// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico, lucasvo
// 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.5.15; */
contract ERC20 {
// --- Auth ---
mapping (address => uint) public wards;
function rely(address usr) public auth { }
function deny(address usr) public auth { }
modifier auth { }
// --- ERC20 Data ---
uint8 public decimals = 18;
string public name;
string public symbol;
string public version;
uint256 public totalSupply;
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
mapping (address => uint) public nonces;
event Approval(address indexed src, address indexed usr, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
// --- Math ---
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
constructor(string memory symbol_, string memory name_) public {
}
// --- ERC20 ---
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public returns (bool)
{
}
function mint(address usr, uint wad) external auth {
}
function burn(address usr, uint wad) external {
require(<FILL_ME>)
if (usr != msg.sender && allowance[usr][msg.sender] != uint(-1)) {
require(allowance[usr][msg.sender] >= wad, "cent/insufficient-allowance");
allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);
}
balanceOf[usr] = sub(balanceOf[usr], wad);
totalSupply = sub(totalSupply, wad);
emit Transfer(usr, address(0), wad);
}
function approve(address usr, uint wad) external returns (bool) {
}
// --- Alias ---
function push(address usr, uint wad) external {
}
function pull(address usr, uint wad) external {
}
function move(address src, address dst, uint wad) external {
}
}
| balanceOf[usr]>=wad,"cent/insufficient-balance" | 51,907 | balanceOf[usr]>=wad |
"cent/insufficient-allowance" | // Verified using https://dapp.tools
// hevm: flattened sources of src/erc20.sol
pragma solidity >=0.4.23 >=0.5.12 >=0.5.15;
////// src/erc20.sol
// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico, lucasvo
// 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.5.15; */
contract ERC20 {
// --- Auth ---
mapping (address => uint) public wards;
function rely(address usr) public auth { }
function deny(address usr) public auth { }
modifier auth { }
// --- ERC20 Data ---
uint8 public decimals = 18;
string public name;
string public symbol;
string public version;
uint256 public totalSupply;
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
mapping (address => uint) public nonces;
event Approval(address indexed src, address indexed usr, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
// --- Math ---
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
constructor(string memory symbol_, string memory name_) public {
}
// --- ERC20 ---
function transfer(address dst, uint wad) external returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public returns (bool)
{
}
function mint(address usr, uint wad) external auth {
}
function burn(address usr, uint wad) external {
require(balanceOf[usr] >= wad, "cent/insufficient-balance");
if (usr != msg.sender && allowance[usr][msg.sender] != uint(-1)) {
require(<FILL_ME>)
allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);
}
balanceOf[usr] = sub(balanceOf[usr], wad);
totalSupply = sub(totalSupply, wad);
emit Transfer(usr, address(0), wad);
}
function approve(address usr, uint wad) external returns (bool) {
}
// --- Alias ---
function push(address usr, uint wad) external {
}
function pull(address usr, uint wad) external {
}
function move(address src, address dst, uint wad) external {
}
}
| allowance[usr][msg.sender]>=wad,"cent/insufficient-allowance" | 51,907 | allowance[usr][msg.sender]>=wad |
"Not whitelisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./NFTExtension.sol";
import "./SaleControl.sol";
contract WhitelistMerkleTreeExtension is NFTExtension, Ownable, SaleControl {
uint256 public price;
uint256 public maxPerAddress;
bytes32 public whitelistRoot;
mapping (address => uint256) claimedByAddress;
constructor(address _nft, bytes32 _whitelistRoot, uint256 _price, uint256 _maxPerAddress) NFTExtension(_nft) SaleControl() {
}
function updateMaxPerAddress(uint256 _maxPerAddress) public onlyOwner {
}
function updateWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner {
}
function mint(uint256 nTokens, bytes32[] memory proof) external whenSaleStarted payable {
super.beforeMint();
require(<FILL_ME>)
require(claimedByAddress[msg.sender] + nTokens <= maxPerAddress, "Cannot claim more per address");
require(msg.value >= nTokens * price, "Not enough ETH to mint");
nft.mintExternal{ value: msg.value }(nTokens, msg.sender, bytes32(0x0));
claimedByAddress[msg.sender] += nTokens;
}
function isWhitelisted(bytes32 root, address receiver, bytes32[] memory proof) public pure returns (bool) {
}
}
| isWhitelisted(whitelistRoot,msg.sender,proof),"Not whitelisted" | 51,940 | isWhitelisted(whitelistRoot,msg.sender,proof) |
"Cannot claim more per address" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./NFTExtension.sol";
import "./SaleControl.sol";
contract WhitelistMerkleTreeExtension is NFTExtension, Ownable, SaleControl {
uint256 public price;
uint256 public maxPerAddress;
bytes32 public whitelistRoot;
mapping (address => uint256) claimedByAddress;
constructor(address _nft, bytes32 _whitelistRoot, uint256 _price, uint256 _maxPerAddress) NFTExtension(_nft) SaleControl() {
}
function updateMaxPerAddress(uint256 _maxPerAddress) public onlyOwner {
}
function updateWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner {
}
function mint(uint256 nTokens, bytes32[] memory proof) external whenSaleStarted payable {
super.beforeMint();
require(isWhitelisted(whitelistRoot, msg.sender, proof), "Not whitelisted");
require(<FILL_ME>)
require(msg.value >= nTokens * price, "Not enough ETH to mint");
nft.mintExternal{ value: msg.value }(nTokens, msg.sender, bytes32(0x0));
claimedByAddress[msg.sender] += nTokens;
}
function isWhitelisted(bytes32 root, address receiver, bytes32[] memory proof) public pure returns (bool) {
}
}
| claimedByAddress[msg.sender]+nTokens<=maxPerAddress,"Cannot claim more per address" | 51,940 | claimedByAddress[msg.sender]+nTokens<=maxPerAddress |
"NFTExtension: this contract is not allowed to be used as an extension" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./INFTExtension.sol";
import "./IMetaverseNFT.sol";
contract NFTExtension is INFTExtension, ERC165 {
IMetaverseNFT public immutable nft;
constructor(address _nft) {
}
function beforeMint() internal view {
require(<FILL_ME>)
}
function supportsInterface(bytes4 interfaceId) public override(IERC165, ERC165) view returns (bool) {
}
}
| nft.isExtensionAllowed(address(this)),"NFTExtension: this contract is not allowed to be used as an extension" | 51,941 | nft.isExtensionAllowed(address(this)) |
"not eligible for allowlist mint" | pragma solidity ^0.8.0;
contract SuperBunny is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
struct SaleConfig {
uint64 mintlistPrice;
uint64 publicPrice;
uint256 tierSupply;
}
SaleConfig public saleConfig;
uint256 private _saleKey;
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_
) ERC721A("SuperBunny", "SuperBunny", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function allowlistMint() external payable callerIsUser {
uint256 price = uint256(saleConfig.mintlistPrice);
require(price != 0, "allowlist sale has not begun yet");
require(<FILL_ME>)
require(totalSupply() + 1 <= collectionSize, "reached max supply");
allowlist[msg.sender]--;
_safeMint(msg.sender, 1);
refundIfOver(price);
}
function publicSaleMint(uint256 quantity, uint256 callerSaleKey)
external
payable
callerIsUser
{
}
function refundIfOver(uint256 price) private {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For preserve mint.
function preserveMint(uint256 quantity, address to) external onlyOwner {
}
function setSaleKey(uint256 saleKey) external onlyOwner {
}
function setSaleConfig(
uint64 mintlistPriceWei,
uint64 publicPriceWei,
uint256 tierSupply
) external onlyOwner {
}
function getSaleConfig () public view returns (SaleConfig memory) {
}
// metadata URI
string private _baseTokenURI;
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)
{
}
}
| allowlist[msg.sender]>0,"not eligible for allowlist mint" | 52,021 | allowlist[msg.sender]>0 |
"reached max supply" | pragma solidity ^0.8.0;
contract SuperBunny is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
struct SaleConfig {
uint64 mintlistPrice;
uint64 publicPrice;
uint256 tierSupply;
}
SaleConfig public saleConfig;
uint256 private _saleKey;
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_
) ERC721A("SuperBunny", "SuperBunny", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function allowlistMint() external payable callerIsUser {
uint256 price = uint256(saleConfig.mintlistPrice);
require(price != 0, "allowlist sale has not begun yet");
require(allowlist[msg.sender] > 0, "not eligible for allowlist mint");
require(<FILL_ME>)
allowlist[msg.sender]--;
_safeMint(msg.sender, 1);
refundIfOver(price);
}
function publicSaleMint(uint256 quantity, uint256 callerSaleKey)
external
payable
callerIsUser
{
}
function refundIfOver(uint256 price) private {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For preserve mint.
function preserveMint(uint256 quantity, address to) external onlyOwner {
}
function setSaleKey(uint256 saleKey) external onlyOwner {
}
function setSaleConfig(
uint64 mintlistPriceWei,
uint64 publicPriceWei,
uint256 tierSupply
) external onlyOwner {
}
function getSaleConfig () public view returns (SaleConfig memory) {
}
// metadata URI
string private _baseTokenURI;
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()+1<=collectionSize,"reached max supply" | 52,021 | totalSupply()+1<=collectionSize |
'reached tier supply' | pragma solidity ^0.8.0;
contract SuperBunny is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
struct SaleConfig {
uint64 mintlistPrice;
uint64 publicPrice;
uint256 tierSupply;
}
SaleConfig public saleConfig;
uint256 private _saleKey;
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_
) ERC721A("SuperBunny", "SuperBunny", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function allowlistMint() external payable callerIsUser {
}
function publicSaleMint(uint256 quantity, uint256 callerSaleKey)
external
payable
callerIsUser
{
SaleConfig memory config = saleConfig;
uint256 publicPrice = uint256(config.publicPrice);
uint256 tierSupply = config.tierSupply;
require(
_saleKey == callerSaleKey,
"called with incorrect public sale key"
);
require(publicPrice != 0, "public sale has not begun yet");
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(<FILL_ME>)
require(
numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint,
"can not mint this many"
);
_safeMint(msg.sender, quantity);
refundIfOver(publicPrice * quantity);
}
function refundIfOver(uint256 price) private {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For preserve mint.
function preserveMint(uint256 quantity, address to) external onlyOwner {
}
function setSaleKey(uint256 saleKey) external onlyOwner {
}
function setSaleConfig(
uint64 mintlistPriceWei,
uint64 publicPriceWei,
uint256 tierSupply
) external onlyOwner {
}
function getSaleConfig () public view returns (SaleConfig memory) {
}
// metadata URI
string private _baseTokenURI;
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<=tierSupply,'reached tier supply' | 52,021 | totalSupply()+quantity<=tierSupply |
"Only controllers can mint" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IHoney.sol";
contract Honey is IHoney, ERC20, Ownable {
// a mapping of addresses allowedto mint / burn
mapping(address => bool) controllers;
// max amount of $HONEY for initial giveaway
uint256 public constant GIVEAWAY_MAX = 6000000 ether;
// how much of giveaway $HONEY was minted
uint256 public giveawayMinted;
constructor() ERC20("HONEY", "HONEY") {}
/**
* mints $HONEY to a recipient
* @param to the recipient of $HONEY
* @param amount the amount of $HONEY to mint
*/
function mint(address to, uint256 amount) external {
require(<FILL_ME>)
_mint(to, amount);
}
/**
* mints Giveaway $HONEY to a array of addresses
* @param addresses the recipients of $HONEY
* @param amount the amount of $HONEY to mint per address
* Cannot mint more than GIVEAWAY_MAX
*/
function mintGiveaway(address[] calldata addresses, uint256 amount) external onlyOwner {
}
/**
* burns $HONEY from a holder
* @param from the holder of the $HONEY
* @param amount the amount of $HONEY to burn
*/
function burn(address from, uint256 amount) external {
}
/**
* disables $honey giveaway
*/
function disableGiveaway() external onlyOwner {
}
/**
* enables an address to mint / burn
* @param controller the address to enable
*/
function addController(address controller) external onlyOwner {
}
/**
* disables an address from minting / burning
* @param controller the address to disbale
*/
function removeController(address controller) external onlyOwner {
}
}
| controllers[msg.sender],"Only controllers can mint" | 52,034 | controllers[msg.sender] |
null | pragma solidity ^0.8.4;
contract AngryMining is ReentrancyGuard{
using SafeERC20 for IERC20;
using ECDSA for bytes32;
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 reward;
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. ANGRYs to distribute per block.
uint256 lastRewardBlock; // Last block number that ANGRYs distribution occurs.
uint256 accAngryPerShare; // Accumulated ANGRYs per share, times 1e12. See below.
uint256 stakeAmount;
}
struct PoolItem {
uint256 pid;
uint256 allocPoint;
address lpToken;
}
struct BonusPeriod{
uint256 beginBlock;
uint256 endBlock;
}
struct LpMiningInfo{
uint256 pid;
address lpToken;
uint256 amount;
uint256 reward;
}
bool public bInited;
address public owner;
IERC20 public angryToken;
// ANGRY tokens created per block.
uint256 public angryPerBlock;
// Bonus muliplier for early angry makers.
uint256 public constant BONUS_MULTIPLIER = 2;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint;
BonusPeriod[] public bonusPeriods;
mapping(address => bool) public executorList;
address[5] public adminList;
mapping(string => bool) public usedUUIDs;
event ExecutorAdd(address _newAddr);
event ExecutorDel(address _oldAddr);
event BonusPeriodAdd(uint256 _beginBlock, uint256 _endBlock);
event LpDeposit(address indexed user, uint256 indexed pid, uint256 amount);
event LpWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event PoolAdd(uint256 _allocPoint, address indexed _lpToken, uint256 _pid);
event PoolChange(uint256 indexed pid, uint256 _allocPoint);
event LpMiningRewardHarvest(address _user, uint256 _pid, uint256 _amount);
event AdminChange(address _oldAddr, address _newAddr);
event RewardsPerBlockChange(uint256 _oldValue, uint256 _newValue);
modifier onlyOwner {
}
modifier onlyExecutor {
require(<FILL_ME>)
_;
}
modifier validPool(uint256 _pid) {
}
modifier checkSig(string memory _uuid, bytes[] memory _sigs) {
}
constructor(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) {
}
function initialize(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) public {
}
function addExecutor(address _newExecutor) onlyOwner public {
}
function delExecutor(address _oldExecutor) onlyOwner public {
}
function checkPoolDuplicate(IERC20 _lpToken) internal view {
}
function addBonusPeriod(uint256 _beginBlock, uint256 _endBlock) public onlyExecutor {
}
function addPool(
uint256 _allocPoint,
address _lpToken,
string memory _uuid,
bytes[] memory _sigs
) public checkSig(_uuid, _sigs) {
}
function changePool(
uint256 _pid,
uint256 _allocPoint,
string memory _uuid,
bytes[] memory _sigs
) public validPool(_pid) checkSig(_uuid, _sigs) {
}
function getMultiplier(uint256 _from, uint256 _to)
public
view
returns (uint256)
{
}
function getLpMiningReward(uint256 _pid, address _user)
public
validPool(_pid)
view
returns (uint256)
{
}
function getPoolList() public view returns(PoolItem[] memory _pools){
}
function getPoolListArr() public view returns(uint256[] memory _pids,address[] memory _tokenAddrs, uint256[] memory _allocPoints){
}
function massUpdatePools() public {
}
function getAccountLpMinings(address _addr) public view returns(LpMiningInfo[] memory _infos){
}
function updatePool(uint256 _pid) public validPool(_pid) {
}
function depositLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function withdrawLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function harvestLpMiningReward(uint256 _pid) public nonReentrant validPool(_pid){
}
function safeAngryTransfer(address _to, uint256 _amount) internal {
}
function getAdminList() public view returns (address[] memory _admins){
}
function changeAdmin(uint256 _index, address _newAddress, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs) {
}
function changeRewardsPerBlock(uint256 _angryPerBlock, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs){
}
}
| executorList[msg.sender] | 52,067 | executorList[msg.sender] |
"UUID exists!" | pragma solidity ^0.8.4;
contract AngryMining is ReentrancyGuard{
using SafeERC20 for IERC20;
using ECDSA for bytes32;
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 reward;
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. ANGRYs to distribute per block.
uint256 lastRewardBlock; // Last block number that ANGRYs distribution occurs.
uint256 accAngryPerShare; // Accumulated ANGRYs per share, times 1e12. See below.
uint256 stakeAmount;
}
struct PoolItem {
uint256 pid;
uint256 allocPoint;
address lpToken;
}
struct BonusPeriod{
uint256 beginBlock;
uint256 endBlock;
}
struct LpMiningInfo{
uint256 pid;
address lpToken;
uint256 amount;
uint256 reward;
}
bool public bInited;
address public owner;
IERC20 public angryToken;
// ANGRY tokens created per block.
uint256 public angryPerBlock;
// Bonus muliplier for early angry makers.
uint256 public constant BONUS_MULTIPLIER = 2;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint;
BonusPeriod[] public bonusPeriods;
mapping(address => bool) public executorList;
address[5] public adminList;
mapping(string => bool) public usedUUIDs;
event ExecutorAdd(address _newAddr);
event ExecutorDel(address _oldAddr);
event BonusPeriodAdd(uint256 _beginBlock, uint256 _endBlock);
event LpDeposit(address indexed user, uint256 indexed pid, uint256 amount);
event LpWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event PoolAdd(uint256 _allocPoint, address indexed _lpToken, uint256 _pid);
event PoolChange(uint256 indexed pid, uint256 _allocPoint);
event LpMiningRewardHarvest(address _user, uint256 _pid, uint256 _amount);
event AdminChange(address _oldAddr, address _newAddr);
event RewardsPerBlockChange(uint256 _oldValue, uint256 _newValue);
modifier onlyOwner {
}
modifier onlyExecutor {
}
modifier validPool(uint256 _pid) {
}
modifier checkSig(string memory _uuid, bytes[] memory _sigs) {
require(<FILL_ME>)
bool[5] memory flags = [false,false,false,false,false];
bytes32 hash = keccak256(abi.encodePacked(_uuid));
for(uint256 i = 0;i < _sigs.length; i++){
address signer = hash.recover(_sigs[i]);
if(signer == adminList[0]){
flags[0] = true;
}else if(signer == adminList[1]){
flags[1] = true;
}else if(signer == adminList[2]){
flags[2] = true;
}else if(signer == adminList[3]){
flags[3] = true;
}else if(signer == adminList[4]){
flags[4] = true;
}
}
uint256 cnt = 0;
for(uint256 i = 0; i < 5; i++){
if(flags[i]) cnt += 1;
}
usedUUIDs[_uuid] = true;
require( cnt >= 3, "Not enough sigs!" );
_;
}
constructor(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) {
}
function initialize(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) public {
}
function addExecutor(address _newExecutor) onlyOwner public {
}
function delExecutor(address _oldExecutor) onlyOwner public {
}
function checkPoolDuplicate(IERC20 _lpToken) internal view {
}
function addBonusPeriod(uint256 _beginBlock, uint256 _endBlock) public onlyExecutor {
}
function addPool(
uint256 _allocPoint,
address _lpToken,
string memory _uuid,
bytes[] memory _sigs
) public checkSig(_uuid, _sigs) {
}
function changePool(
uint256 _pid,
uint256 _allocPoint,
string memory _uuid,
bytes[] memory _sigs
) public validPool(_pid) checkSig(_uuid, _sigs) {
}
function getMultiplier(uint256 _from, uint256 _to)
public
view
returns (uint256)
{
}
function getLpMiningReward(uint256 _pid, address _user)
public
validPool(_pid)
view
returns (uint256)
{
}
function getPoolList() public view returns(PoolItem[] memory _pools){
}
function getPoolListArr() public view returns(uint256[] memory _pids,address[] memory _tokenAddrs, uint256[] memory _allocPoints){
}
function massUpdatePools() public {
}
function getAccountLpMinings(address _addr) public view returns(LpMiningInfo[] memory _infos){
}
function updatePool(uint256 _pid) public validPool(_pid) {
}
function depositLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function withdrawLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function harvestLpMiningReward(uint256 _pid) public nonReentrant validPool(_pid){
}
function safeAngryTransfer(address _to, uint256 _amount) internal {
}
function getAdminList() public view returns (address[] memory _admins){
}
function changeAdmin(uint256 _index, address _newAddress, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs) {
}
function changeRewardsPerBlock(uint256 _angryPerBlock, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs){
}
}
| !usedUUIDs[_uuid],"UUID exists!" | 52,067 | !usedUUIDs[_uuid] |
"already Inited!" | pragma solidity ^0.8.4;
contract AngryMining is ReentrancyGuard{
using SafeERC20 for IERC20;
using ECDSA for bytes32;
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 reward;
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. ANGRYs to distribute per block.
uint256 lastRewardBlock; // Last block number that ANGRYs distribution occurs.
uint256 accAngryPerShare; // Accumulated ANGRYs per share, times 1e12. See below.
uint256 stakeAmount;
}
struct PoolItem {
uint256 pid;
uint256 allocPoint;
address lpToken;
}
struct BonusPeriod{
uint256 beginBlock;
uint256 endBlock;
}
struct LpMiningInfo{
uint256 pid;
address lpToken;
uint256 amount;
uint256 reward;
}
bool public bInited;
address public owner;
IERC20 public angryToken;
// ANGRY tokens created per block.
uint256 public angryPerBlock;
// Bonus muliplier for early angry makers.
uint256 public constant BONUS_MULTIPLIER = 2;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint;
BonusPeriod[] public bonusPeriods;
mapping(address => bool) public executorList;
address[5] public adminList;
mapping(string => bool) public usedUUIDs;
event ExecutorAdd(address _newAddr);
event ExecutorDel(address _oldAddr);
event BonusPeriodAdd(uint256 _beginBlock, uint256 _endBlock);
event LpDeposit(address indexed user, uint256 indexed pid, uint256 amount);
event LpWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event PoolAdd(uint256 _allocPoint, address indexed _lpToken, uint256 _pid);
event PoolChange(uint256 indexed pid, uint256 _allocPoint);
event LpMiningRewardHarvest(address _user, uint256 _pid, uint256 _amount);
event AdminChange(address _oldAddr, address _newAddr);
event RewardsPerBlockChange(uint256 _oldValue, uint256 _newValue);
modifier onlyOwner {
}
modifier onlyExecutor {
}
modifier validPool(uint256 _pid) {
}
modifier checkSig(string memory _uuid, bytes[] memory _sigs) {
}
constructor(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) {
}
function initialize(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) public {
require(<FILL_ME>)
bInited = true;
owner = msg.sender;
executorList[msg.sender] = true;
angryToken = IERC20(_angryTokenAddr);
angryPerBlock = _angryPerBlock;
adminList[0] = _admin1;
adminList[1] = _admin2;
adminList[2] = _admin3;
adminList[3] = _admin4;
adminList[4] = _admin5;
emit ExecutorAdd(msg.sender);
}
function addExecutor(address _newExecutor) onlyOwner public {
}
function delExecutor(address _oldExecutor) onlyOwner public {
}
function checkPoolDuplicate(IERC20 _lpToken) internal view {
}
function addBonusPeriod(uint256 _beginBlock, uint256 _endBlock) public onlyExecutor {
}
function addPool(
uint256 _allocPoint,
address _lpToken,
string memory _uuid,
bytes[] memory _sigs
) public checkSig(_uuid, _sigs) {
}
function changePool(
uint256 _pid,
uint256 _allocPoint,
string memory _uuid,
bytes[] memory _sigs
) public validPool(_pid) checkSig(_uuid, _sigs) {
}
function getMultiplier(uint256 _from, uint256 _to)
public
view
returns (uint256)
{
}
function getLpMiningReward(uint256 _pid, address _user)
public
validPool(_pid)
view
returns (uint256)
{
}
function getPoolList() public view returns(PoolItem[] memory _pools){
}
function getPoolListArr() public view returns(uint256[] memory _pids,address[] memory _tokenAddrs, uint256[] memory _allocPoints){
}
function massUpdatePools() public {
}
function getAccountLpMinings(address _addr) public view returns(LpMiningInfo[] memory _infos){
}
function updatePool(uint256 _pid) public validPool(_pid) {
}
function depositLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function withdrawLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function harvestLpMiningReward(uint256 _pid) public nonReentrant validPool(_pid){
}
function safeAngryTransfer(address _to, uint256 _amount) internal {
}
function getAdminList() public view returns (address[] memory _admins){
}
function changeAdmin(uint256 _index, address _newAddress, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs) {
}
function changeRewardsPerBlock(uint256 _angryPerBlock, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs){
}
}
| !bInited,"already Inited!" | 52,067 | !bInited |
"duplicate pool!" | pragma solidity ^0.8.4;
contract AngryMining is ReentrancyGuard{
using SafeERC20 for IERC20;
using ECDSA for bytes32;
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 reward;
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. ANGRYs to distribute per block.
uint256 lastRewardBlock; // Last block number that ANGRYs distribution occurs.
uint256 accAngryPerShare; // Accumulated ANGRYs per share, times 1e12. See below.
uint256 stakeAmount;
}
struct PoolItem {
uint256 pid;
uint256 allocPoint;
address lpToken;
}
struct BonusPeriod{
uint256 beginBlock;
uint256 endBlock;
}
struct LpMiningInfo{
uint256 pid;
address lpToken;
uint256 amount;
uint256 reward;
}
bool public bInited;
address public owner;
IERC20 public angryToken;
// ANGRY tokens created per block.
uint256 public angryPerBlock;
// Bonus muliplier for early angry makers.
uint256 public constant BONUS_MULTIPLIER = 2;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint;
BonusPeriod[] public bonusPeriods;
mapping(address => bool) public executorList;
address[5] public adminList;
mapping(string => bool) public usedUUIDs;
event ExecutorAdd(address _newAddr);
event ExecutorDel(address _oldAddr);
event BonusPeriodAdd(uint256 _beginBlock, uint256 _endBlock);
event LpDeposit(address indexed user, uint256 indexed pid, uint256 amount);
event LpWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event PoolAdd(uint256 _allocPoint, address indexed _lpToken, uint256 _pid);
event PoolChange(uint256 indexed pid, uint256 _allocPoint);
event LpMiningRewardHarvest(address _user, uint256 _pid, uint256 _amount);
event AdminChange(address _oldAddr, address _newAddr);
event RewardsPerBlockChange(uint256 _oldValue, uint256 _newValue);
modifier onlyOwner {
}
modifier onlyExecutor {
}
modifier validPool(uint256 _pid) {
}
modifier checkSig(string memory _uuid, bytes[] memory _sigs) {
}
constructor(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) {
}
function initialize(address _angryTokenAddr, uint256 _angryPerBlock, address _admin1, address _admin2, address _admin3, address _admin4, address _admin5) public {
}
function addExecutor(address _newExecutor) onlyOwner public {
}
function delExecutor(address _oldExecutor) onlyOwner public {
}
function checkPoolDuplicate(IERC20 _lpToken) internal view {
uint256 length = poolInfo.length;
for(uint256 pid = 0; pid < length; ++pid){
require(<FILL_ME>)
}
}
function addBonusPeriod(uint256 _beginBlock, uint256 _endBlock) public onlyExecutor {
}
function addPool(
uint256 _allocPoint,
address _lpToken,
string memory _uuid,
bytes[] memory _sigs
) public checkSig(_uuid, _sigs) {
}
function changePool(
uint256 _pid,
uint256 _allocPoint,
string memory _uuid,
bytes[] memory _sigs
) public validPool(_pid) checkSig(_uuid, _sigs) {
}
function getMultiplier(uint256 _from, uint256 _to)
public
view
returns (uint256)
{
}
function getLpMiningReward(uint256 _pid, address _user)
public
validPool(_pid)
view
returns (uint256)
{
}
function getPoolList() public view returns(PoolItem[] memory _pools){
}
function getPoolListArr() public view returns(uint256[] memory _pids,address[] memory _tokenAddrs, uint256[] memory _allocPoints){
}
function massUpdatePools() public {
}
function getAccountLpMinings(address _addr) public view returns(LpMiningInfo[] memory _infos){
}
function updatePool(uint256 _pid) public validPool(_pid) {
}
function depositLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function withdrawLP(uint256 _pid, uint256 _amount) public nonReentrant validPool(_pid) {
}
function harvestLpMiningReward(uint256 _pid) public nonReentrant validPool(_pid){
}
function safeAngryTransfer(address _to, uint256 _amount) internal {
}
function getAdminList() public view returns (address[] memory _admins){
}
function changeAdmin(uint256 _index, address _newAddress, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs) {
}
function changeRewardsPerBlock(uint256 _angryPerBlock, string memory _uuid, bytes[] memory _sigs) public checkSig(_uuid, _sigs){
}
}
| poolInfo[pid].lpToken!=_lpToken,"duplicate pool!" | 52,067 | poolInfo[pid].lpToken!=_lpToken |
null | /*
The BancorX contract allows cross chain token transfers.
There are two processes that take place in the contract -
- Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)
- Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)
Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple
callers are required to report a transfer before tokens are released to the target account.
*/
contract BancorX is Owned, TokenHolder, ContractIds {
using SafeMath for uint256;
// represents a transaction on another blockchain where BNT was destroyed/locked
struct Transaction {
uint256 amount;
bytes32 fromBlockchain;
address to;
uint8 numOfReports;
bool completed;
}
uint16 public version = 1;
uint256 public maxLockLimit; // the maximum amount of BNT that can be locked in one transaction
uint256 public maxReleaseLimit; // the maximum amount of BNT that can be released in one transaction
uint256 public minLimit; // the minimum amount of BNT that can be transferred in one transaction
uint256 public prevLockLimit; // the lock limit *after* the last transaction
uint256 public prevReleaseLimit; // the release limit *after* the last transaction
uint256 public limitIncPerBlock; // how much the limit increases per block
uint256 public prevLockBlockNumber; // the block number of the last lock transaction
uint256 public prevReleaseBlockNumber; // the block number of the last release transaction
uint256 public minRequiredReports; // minimum number of required reports to release tokens
IContractRegistry public registry; // contract registry
IContractRegistry public prevRegistry; // address of previous registry as security mechanism
IBancorConverter public bntConverter; // BNT converter
ISmartToken public bntToken; // BNT token
bool public xTransfersEnabled = true; // true if x transfers are enabled, false if not
bool public reportingEnabled = true; // true if reporting is enabled, false if not
bool public allowRegistryUpdate = true; // allows the owner to prevent/allow the registry to be updated
// txId -> Transaction
mapping (uint256 => Transaction) public transactions;
// txId -> reporter -> true if reporter already reported txId
mapping (uint256 => mapping (address => bool)) public reportedTxs;
// address -> true if address is reporter
mapping (address => bool) public reporters;
// triggered when BNT is locked in smart contract
event TokensLock(
address indexed _from,
uint256 _amount
);
// triggered when BNT is released by the smart contract
event TokensRelease(
address indexed _to,
uint256 _amount
);
// triggered when xTransfer is successfully called
event XTransfer(
address indexed _from,
bytes32 _toBlockchain,
bytes32 indexed _to,
uint256 _amount
);
// triggered when report is successfully submitted
event TxReport(
address indexed _reporter,
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
);
/**
@dev constructor
@param _maxLockLimit maximum amount of BNT that can be locked in one transaction
@param _maxReleaseLimit maximum amount of BNT that can be released in one transaction
@param _minLimit minimum amount of BNT that can be transferred in one transaction
@param _limitIncPerBlock how much the limit increases per block
@param _minRequiredReports minimum number of reporters to report transaction before tokens can be released
@param _registry address of contract registry
*/
constructor(
uint256 _maxLockLimit,
uint256 _maxReleaseLimit,
uint256 _minLimit,
uint256 _limitIncPerBlock,
uint256 _minRequiredReports,
address _registry
)
public
{
}
// validates that the caller is a reporter
modifier isReporter {
require(<FILL_ME>)
_;
}
// allows execution only when x transfers are enabled
modifier whenXTransfersEnabled {
}
// allows execution only when reporting is enabled
modifier whenReportingEnabled {
}
/**
@dev setter
@param _maxLockLimit new maxLockLimit
*/
function setMaxLockLimit(uint256 _maxLockLimit) public ownerOnly {
}
/**
@dev setter
@param _maxReleaseLimit new maxReleaseLimit
*/
function setMaxReleaseLimit(uint256 _maxReleaseLimit) public ownerOnly {
}
/**
@dev setter
@param _minLimit new minLimit
*/
function setMinLimit(uint256 _minLimit) public ownerOnly {
}
/**
@dev setter
@param _limitIncPerBlock new limitIncPerBlock
*/
function setLimitIncPerBlock(uint256 _limitIncPerBlock) public ownerOnly {
}
/**
@dev setter
@param _minRequiredReports new minRequiredReports
*/
function setMinRequiredReports(uint256 _minRequiredReports) public ownerOnly {
}
/**
@dev allows the owner to set/remove reporters
@param _reporter reporter whos status is to be set
@param _active true if the reporter is approved, false otherwise
*/
function setReporter(address _reporter, bool _active) public ownerOnly {
}
/**
@dev allows the owner enable/disable the xTransfer method
@param _enable true to enable, false to disable
*/
function enableXTransfers(bool _enable) public ownerOnly {
}
/**
@dev allows the owner enable/disable the reportTransaction method
@param _enable true to enable, false to disable
*/
function enableReporting(bool _enable) public ownerOnly {
}
/**
@dev disables the registry update functionality
this is a safety mechanism in case of a emergency
can only be called by the manager or owner
@param _disable true to disable registry updates, false to re-enable them
*/
function disableRegistryUpdate(bool _disable) public ownerOnly {
}
/**
@dev allows the owner to set the BNT converters address to wherever the
contract registry currently points to
*/
function setBNTConverterAddress() public ownerOnly {
}
/**
@dev sets the contract registry to whichever address the current registry is pointing to
*/
function updateRegistry() public {
}
/**
@dev security mechanism allowing the converter owner to revert to the previous registry,
to be used in emergency scenario
*/
function restoreRegistry() public ownerOnly {
}
/**
@dev upgrades the contract to the latest version
can only be called by the owner
note that the owner needs to call acceptOwnership on the new contract after the upgrade
@param _reporters new list of reporters
*/
function upgrade(address[] _reporters) public ownerOnly {
}
/**
@dev claims BNT from msg.sender to be converted to BNT on another blockchain
@param _toBlockchain blockchain BNT will be issued on
@param _to address to send the BNT to
@param _amount the amount to transfer
*/
function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount) public whenXTransfersEnabled {
}
/**
@dev allows reporter to report transaction which occured on another blockchain
@param _fromBlockchain blockchain BNT was destroyed in
@param _txId transactionId of transaction thats being reported
@param _to address to receive BNT
@param _amount amount of BNT destroyed on another blockchain
*/
function reportTx(
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
)
public
isReporter
whenReportingEnabled
{
}
/**
@dev method for calculating current lock limit
@return the current maximum limit of BNT that can be locked
*/
function getCurrentLockLimit() public view returns (uint256) {
}
/**
@dev method for calculating current release limit
@return the current maximum limit of BNT that can be released
*/
function getCurrentReleaseLimit() public view returns (uint256) {
}
/**
@dev claims and locks BNT from msg.sender to be converted to BNT on another blockchain
@param _amount the amount to lock
*/
function lockTokens(uint256 _amount) private {
}
/**
@dev private method to release BNT the contract holds
@param _to the address to release BNT to
@param _amount the amount to release
*/
function releaseTokens(address _to, uint256 _amount) private {
}
}
| reporters[msg.sender] | 52,073 | reporters[msg.sender] |
null | /*
The BancorX contract allows cross chain token transfers.
There are two processes that take place in the contract -
- Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)
- Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)
Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple
callers are required to report a transfer before tokens are released to the target account.
*/
contract BancorX is Owned, TokenHolder, ContractIds {
using SafeMath for uint256;
// represents a transaction on another blockchain where BNT was destroyed/locked
struct Transaction {
uint256 amount;
bytes32 fromBlockchain;
address to;
uint8 numOfReports;
bool completed;
}
uint16 public version = 1;
uint256 public maxLockLimit; // the maximum amount of BNT that can be locked in one transaction
uint256 public maxReleaseLimit; // the maximum amount of BNT that can be released in one transaction
uint256 public minLimit; // the minimum amount of BNT that can be transferred in one transaction
uint256 public prevLockLimit; // the lock limit *after* the last transaction
uint256 public prevReleaseLimit; // the release limit *after* the last transaction
uint256 public limitIncPerBlock; // how much the limit increases per block
uint256 public prevLockBlockNumber; // the block number of the last lock transaction
uint256 public prevReleaseBlockNumber; // the block number of the last release transaction
uint256 public minRequiredReports; // minimum number of required reports to release tokens
IContractRegistry public registry; // contract registry
IContractRegistry public prevRegistry; // address of previous registry as security mechanism
IBancorConverter public bntConverter; // BNT converter
ISmartToken public bntToken; // BNT token
bool public xTransfersEnabled = true; // true if x transfers are enabled, false if not
bool public reportingEnabled = true; // true if reporting is enabled, false if not
bool public allowRegistryUpdate = true; // allows the owner to prevent/allow the registry to be updated
// txId -> Transaction
mapping (uint256 => Transaction) public transactions;
// txId -> reporter -> true if reporter already reported txId
mapping (uint256 => mapping (address => bool)) public reportedTxs;
// address -> true if address is reporter
mapping (address => bool) public reporters;
// triggered when BNT is locked in smart contract
event TokensLock(
address indexed _from,
uint256 _amount
);
// triggered when BNT is released by the smart contract
event TokensRelease(
address indexed _to,
uint256 _amount
);
// triggered when xTransfer is successfully called
event XTransfer(
address indexed _from,
bytes32 _toBlockchain,
bytes32 indexed _to,
uint256 _amount
);
// triggered when report is successfully submitted
event TxReport(
address indexed _reporter,
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
);
/**
@dev constructor
@param _maxLockLimit maximum amount of BNT that can be locked in one transaction
@param _maxReleaseLimit maximum amount of BNT that can be released in one transaction
@param _minLimit minimum amount of BNT that can be transferred in one transaction
@param _limitIncPerBlock how much the limit increases per block
@param _minRequiredReports minimum number of reporters to report transaction before tokens can be released
@param _registry address of contract registry
*/
constructor(
uint256 _maxLockLimit,
uint256 _maxReleaseLimit,
uint256 _minLimit,
uint256 _limitIncPerBlock,
uint256 _minRequiredReports,
address _registry
)
public
{
}
// validates that the caller is a reporter
modifier isReporter {
}
// allows execution only when x transfers are enabled
modifier whenXTransfersEnabled {
}
// allows execution only when reporting is enabled
modifier whenReportingEnabled {
}
/**
@dev setter
@param _maxLockLimit new maxLockLimit
*/
function setMaxLockLimit(uint256 _maxLockLimit) public ownerOnly {
}
/**
@dev setter
@param _maxReleaseLimit new maxReleaseLimit
*/
function setMaxReleaseLimit(uint256 _maxReleaseLimit) public ownerOnly {
}
/**
@dev setter
@param _minLimit new minLimit
*/
function setMinLimit(uint256 _minLimit) public ownerOnly {
}
/**
@dev setter
@param _limitIncPerBlock new limitIncPerBlock
*/
function setLimitIncPerBlock(uint256 _limitIncPerBlock) public ownerOnly {
}
/**
@dev setter
@param _minRequiredReports new minRequiredReports
*/
function setMinRequiredReports(uint256 _minRequiredReports) public ownerOnly {
}
/**
@dev allows the owner to set/remove reporters
@param _reporter reporter whos status is to be set
@param _active true if the reporter is approved, false otherwise
*/
function setReporter(address _reporter, bool _active) public ownerOnly {
}
/**
@dev allows the owner enable/disable the xTransfer method
@param _enable true to enable, false to disable
*/
function enableXTransfers(bool _enable) public ownerOnly {
}
/**
@dev allows the owner enable/disable the reportTransaction method
@param _enable true to enable, false to disable
*/
function enableReporting(bool _enable) public ownerOnly {
}
/**
@dev disables the registry update functionality
this is a safety mechanism in case of a emergency
can only be called by the manager or owner
@param _disable true to disable registry updates, false to re-enable them
*/
function disableRegistryUpdate(bool _disable) public ownerOnly {
}
/**
@dev allows the owner to set the BNT converters address to wherever the
contract registry currently points to
*/
function setBNTConverterAddress() public ownerOnly {
}
/**
@dev sets the contract registry to whichever address the current registry is pointing to
*/
function updateRegistry() public {
// require that upgrading is allowed or that the caller is the owner
require(<FILL_ME>)
// get the address of whichever registry the current registry is pointing to
address newRegistry = registry.addressOf(ContractIds.CONTRACT_REGISTRY);
// if the new registry hasn't changed or is the zero address, revert
require(newRegistry != address(registry) && newRegistry != address(0));
// set the previous registry as current registry and current registry as newRegistry
prevRegistry = registry;
registry = IContractRegistry(newRegistry);
}
/**
@dev security mechanism allowing the converter owner to revert to the previous registry,
to be used in emergency scenario
*/
function restoreRegistry() public ownerOnly {
}
/**
@dev upgrades the contract to the latest version
can only be called by the owner
note that the owner needs to call acceptOwnership on the new contract after the upgrade
@param _reporters new list of reporters
*/
function upgrade(address[] _reporters) public ownerOnly {
}
/**
@dev claims BNT from msg.sender to be converted to BNT on another blockchain
@param _toBlockchain blockchain BNT will be issued on
@param _to address to send the BNT to
@param _amount the amount to transfer
*/
function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount) public whenXTransfersEnabled {
}
/**
@dev allows reporter to report transaction which occured on another blockchain
@param _fromBlockchain blockchain BNT was destroyed in
@param _txId transactionId of transaction thats being reported
@param _to address to receive BNT
@param _amount amount of BNT destroyed on another blockchain
*/
function reportTx(
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
)
public
isReporter
whenReportingEnabled
{
}
/**
@dev method for calculating current lock limit
@return the current maximum limit of BNT that can be locked
*/
function getCurrentLockLimit() public view returns (uint256) {
}
/**
@dev method for calculating current release limit
@return the current maximum limit of BNT that can be released
*/
function getCurrentReleaseLimit() public view returns (uint256) {
}
/**
@dev claims and locks BNT from msg.sender to be converted to BNT on another blockchain
@param _amount the amount to lock
*/
function lockTokens(uint256 _amount) private {
}
/**
@dev private method to release BNT the contract holds
@param _to the address to release BNT to
@param _amount the amount to release
*/
function releaseTokens(address _to, uint256 _amount) private {
}
}
| allowRegistryUpdate||msg.sender==owner | 52,073 | allowRegistryUpdate||msg.sender==owner |
null | /*
The BancorX contract allows cross chain token transfers.
There are two processes that take place in the contract -
- Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)
- Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)
Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple
callers are required to report a transfer before tokens are released to the target account.
*/
contract BancorX is Owned, TokenHolder, ContractIds {
using SafeMath for uint256;
// represents a transaction on another blockchain where BNT was destroyed/locked
struct Transaction {
uint256 amount;
bytes32 fromBlockchain;
address to;
uint8 numOfReports;
bool completed;
}
uint16 public version = 1;
uint256 public maxLockLimit; // the maximum amount of BNT that can be locked in one transaction
uint256 public maxReleaseLimit; // the maximum amount of BNT that can be released in one transaction
uint256 public minLimit; // the minimum amount of BNT that can be transferred in one transaction
uint256 public prevLockLimit; // the lock limit *after* the last transaction
uint256 public prevReleaseLimit; // the release limit *after* the last transaction
uint256 public limitIncPerBlock; // how much the limit increases per block
uint256 public prevLockBlockNumber; // the block number of the last lock transaction
uint256 public prevReleaseBlockNumber; // the block number of the last release transaction
uint256 public minRequiredReports; // minimum number of required reports to release tokens
IContractRegistry public registry; // contract registry
IContractRegistry public prevRegistry; // address of previous registry as security mechanism
IBancorConverter public bntConverter; // BNT converter
ISmartToken public bntToken; // BNT token
bool public xTransfersEnabled = true; // true if x transfers are enabled, false if not
bool public reportingEnabled = true; // true if reporting is enabled, false if not
bool public allowRegistryUpdate = true; // allows the owner to prevent/allow the registry to be updated
// txId -> Transaction
mapping (uint256 => Transaction) public transactions;
// txId -> reporter -> true if reporter already reported txId
mapping (uint256 => mapping (address => bool)) public reportedTxs;
// address -> true if address is reporter
mapping (address => bool) public reporters;
// triggered when BNT is locked in smart contract
event TokensLock(
address indexed _from,
uint256 _amount
);
// triggered when BNT is released by the smart contract
event TokensRelease(
address indexed _to,
uint256 _amount
);
// triggered when xTransfer is successfully called
event XTransfer(
address indexed _from,
bytes32 _toBlockchain,
bytes32 indexed _to,
uint256 _amount
);
// triggered when report is successfully submitted
event TxReport(
address indexed _reporter,
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
);
/**
@dev constructor
@param _maxLockLimit maximum amount of BNT that can be locked in one transaction
@param _maxReleaseLimit maximum amount of BNT that can be released in one transaction
@param _minLimit minimum amount of BNT that can be transferred in one transaction
@param _limitIncPerBlock how much the limit increases per block
@param _minRequiredReports minimum number of reporters to report transaction before tokens can be released
@param _registry address of contract registry
*/
constructor(
uint256 _maxLockLimit,
uint256 _maxReleaseLimit,
uint256 _minLimit,
uint256 _limitIncPerBlock,
uint256 _minRequiredReports,
address _registry
)
public
{
}
// validates that the caller is a reporter
modifier isReporter {
}
// allows execution only when x transfers are enabled
modifier whenXTransfersEnabled {
}
// allows execution only when reporting is enabled
modifier whenReportingEnabled {
}
/**
@dev setter
@param _maxLockLimit new maxLockLimit
*/
function setMaxLockLimit(uint256 _maxLockLimit) public ownerOnly {
}
/**
@dev setter
@param _maxReleaseLimit new maxReleaseLimit
*/
function setMaxReleaseLimit(uint256 _maxReleaseLimit) public ownerOnly {
}
/**
@dev setter
@param _minLimit new minLimit
*/
function setMinLimit(uint256 _minLimit) public ownerOnly {
}
/**
@dev setter
@param _limitIncPerBlock new limitIncPerBlock
*/
function setLimitIncPerBlock(uint256 _limitIncPerBlock) public ownerOnly {
}
/**
@dev setter
@param _minRequiredReports new minRequiredReports
*/
function setMinRequiredReports(uint256 _minRequiredReports) public ownerOnly {
}
/**
@dev allows the owner to set/remove reporters
@param _reporter reporter whos status is to be set
@param _active true if the reporter is approved, false otherwise
*/
function setReporter(address _reporter, bool _active) public ownerOnly {
}
/**
@dev allows the owner enable/disable the xTransfer method
@param _enable true to enable, false to disable
*/
function enableXTransfers(bool _enable) public ownerOnly {
}
/**
@dev allows the owner enable/disable the reportTransaction method
@param _enable true to enable, false to disable
*/
function enableReporting(bool _enable) public ownerOnly {
}
/**
@dev disables the registry update functionality
this is a safety mechanism in case of a emergency
can only be called by the manager or owner
@param _disable true to disable registry updates, false to re-enable them
*/
function disableRegistryUpdate(bool _disable) public ownerOnly {
}
/**
@dev allows the owner to set the BNT converters address to wherever the
contract registry currently points to
*/
function setBNTConverterAddress() public ownerOnly {
}
/**
@dev sets the contract registry to whichever address the current registry is pointing to
*/
function updateRegistry() public {
}
/**
@dev security mechanism allowing the converter owner to revert to the previous registry,
to be used in emergency scenario
*/
function restoreRegistry() public ownerOnly {
}
/**
@dev upgrades the contract to the latest version
can only be called by the owner
note that the owner needs to call acceptOwnership on the new contract after the upgrade
@param _reporters new list of reporters
*/
function upgrade(address[] _reporters) public ownerOnly {
}
/**
@dev claims BNT from msg.sender to be converted to BNT on another blockchain
@param _toBlockchain blockchain BNT will be issued on
@param _to address to send the BNT to
@param _amount the amount to transfer
*/
function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount) public whenXTransfersEnabled {
}
/**
@dev allows reporter to report transaction which occured on another blockchain
@param _fromBlockchain blockchain BNT was destroyed in
@param _txId transactionId of transaction thats being reported
@param _to address to receive BNT
@param _amount amount of BNT destroyed on another blockchain
*/
function reportTx(
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
)
public
isReporter
whenReportingEnabled
{
// require that the transaction has not been reported yet by the reporter
require(<FILL_ME>)
// set reported as true
reportedTxs[_txId][msg.sender] = true;
Transaction storage txn = transactions[_txId];
// If the caller is the first reporter, set the transaction details
if (txn.numOfReports == 0) {
txn.to = _to;
txn.amount = _amount;
txn.fromBlockchain = _fromBlockchain;
} else {
// otherwise, verify transaction details
require(txn.to == _to && txn.amount == _amount && txn.fromBlockchain == _fromBlockchain);
}
// increment the number of reports
txn.numOfReports++;
emit TxReport(msg.sender, _fromBlockchain, _txId, _to, _amount);
// if theres enough reports, try to release tokens
if (txn.numOfReports >= minRequiredReports) {
require(!transactions[_txId].completed);
// set the transaction as completed
transactions[_txId].completed = true;
releaseTokens(_to, _amount);
}
}
/**
@dev method for calculating current lock limit
@return the current maximum limit of BNT that can be locked
*/
function getCurrentLockLimit() public view returns (uint256) {
}
/**
@dev method for calculating current release limit
@return the current maximum limit of BNT that can be released
*/
function getCurrentReleaseLimit() public view returns (uint256) {
}
/**
@dev claims and locks BNT from msg.sender to be converted to BNT on another blockchain
@param _amount the amount to lock
*/
function lockTokens(uint256 _amount) private {
}
/**
@dev private method to release BNT the contract holds
@param _to the address to release BNT to
@param _amount the amount to release
*/
function releaseTokens(address _to, uint256 _amount) private {
}
}
| !reportedTxs[_txId][msg.sender] | 52,073 | !reportedTxs[_txId][msg.sender] |
null | /*
The BancorX contract allows cross chain token transfers.
There are two processes that take place in the contract -
- Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)
- Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)
Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple
callers are required to report a transfer before tokens are released to the target account.
*/
contract BancorX is Owned, TokenHolder, ContractIds {
using SafeMath for uint256;
// represents a transaction on another blockchain where BNT was destroyed/locked
struct Transaction {
uint256 amount;
bytes32 fromBlockchain;
address to;
uint8 numOfReports;
bool completed;
}
uint16 public version = 1;
uint256 public maxLockLimit; // the maximum amount of BNT that can be locked in one transaction
uint256 public maxReleaseLimit; // the maximum amount of BNT that can be released in one transaction
uint256 public minLimit; // the minimum amount of BNT that can be transferred in one transaction
uint256 public prevLockLimit; // the lock limit *after* the last transaction
uint256 public prevReleaseLimit; // the release limit *after* the last transaction
uint256 public limitIncPerBlock; // how much the limit increases per block
uint256 public prevLockBlockNumber; // the block number of the last lock transaction
uint256 public prevReleaseBlockNumber; // the block number of the last release transaction
uint256 public minRequiredReports; // minimum number of required reports to release tokens
IContractRegistry public registry; // contract registry
IContractRegistry public prevRegistry; // address of previous registry as security mechanism
IBancorConverter public bntConverter; // BNT converter
ISmartToken public bntToken; // BNT token
bool public xTransfersEnabled = true; // true if x transfers are enabled, false if not
bool public reportingEnabled = true; // true if reporting is enabled, false if not
bool public allowRegistryUpdate = true; // allows the owner to prevent/allow the registry to be updated
// txId -> Transaction
mapping (uint256 => Transaction) public transactions;
// txId -> reporter -> true if reporter already reported txId
mapping (uint256 => mapping (address => bool)) public reportedTxs;
// address -> true if address is reporter
mapping (address => bool) public reporters;
// triggered when BNT is locked in smart contract
event TokensLock(
address indexed _from,
uint256 _amount
);
// triggered when BNT is released by the smart contract
event TokensRelease(
address indexed _to,
uint256 _amount
);
// triggered when xTransfer is successfully called
event XTransfer(
address indexed _from,
bytes32 _toBlockchain,
bytes32 indexed _to,
uint256 _amount
);
// triggered when report is successfully submitted
event TxReport(
address indexed _reporter,
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
);
/**
@dev constructor
@param _maxLockLimit maximum amount of BNT that can be locked in one transaction
@param _maxReleaseLimit maximum amount of BNT that can be released in one transaction
@param _minLimit minimum amount of BNT that can be transferred in one transaction
@param _limitIncPerBlock how much the limit increases per block
@param _minRequiredReports minimum number of reporters to report transaction before tokens can be released
@param _registry address of contract registry
*/
constructor(
uint256 _maxLockLimit,
uint256 _maxReleaseLimit,
uint256 _minLimit,
uint256 _limitIncPerBlock,
uint256 _minRequiredReports,
address _registry
)
public
{
}
// validates that the caller is a reporter
modifier isReporter {
}
// allows execution only when x transfers are enabled
modifier whenXTransfersEnabled {
}
// allows execution only when reporting is enabled
modifier whenReportingEnabled {
}
/**
@dev setter
@param _maxLockLimit new maxLockLimit
*/
function setMaxLockLimit(uint256 _maxLockLimit) public ownerOnly {
}
/**
@dev setter
@param _maxReleaseLimit new maxReleaseLimit
*/
function setMaxReleaseLimit(uint256 _maxReleaseLimit) public ownerOnly {
}
/**
@dev setter
@param _minLimit new minLimit
*/
function setMinLimit(uint256 _minLimit) public ownerOnly {
}
/**
@dev setter
@param _limitIncPerBlock new limitIncPerBlock
*/
function setLimitIncPerBlock(uint256 _limitIncPerBlock) public ownerOnly {
}
/**
@dev setter
@param _minRequiredReports new minRequiredReports
*/
function setMinRequiredReports(uint256 _minRequiredReports) public ownerOnly {
}
/**
@dev allows the owner to set/remove reporters
@param _reporter reporter whos status is to be set
@param _active true if the reporter is approved, false otherwise
*/
function setReporter(address _reporter, bool _active) public ownerOnly {
}
/**
@dev allows the owner enable/disable the xTransfer method
@param _enable true to enable, false to disable
*/
function enableXTransfers(bool _enable) public ownerOnly {
}
/**
@dev allows the owner enable/disable the reportTransaction method
@param _enable true to enable, false to disable
*/
function enableReporting(bool _enable) public ownerOnly {
}
/**
@dev disables the registry update functionality
this is a safety mechanism in case of a emergency
can only be called by the manager or owner
@param _disable true to disable registry updates, false to re-enable them
*/
function disableRegistryUpdate(bool _disable) public ownerOnly {
}
/**
@dev allows the owner to set the BNT converters address to wherever the
contract registry currently points to
*/
function setBNTConverterAddress() public ownerOnly {
}
/**
@dev sets the contract registry to whichever address the current registry is pointing to
*/
function updateRegistry() public {
}
/**
@dev security mechanism allowing the converter owner to revert to the previous registry,
to be used in emergency scenario
*/
function restoreRegistry() public ownerOnly {
}
/**
@dev upgrades the contract to the latest version
can only be called by the owner
note that the owner needs to call acceptOwnership on the new contract after the upgrade
@param _reporters new list of reporters
*/
function upgrade(address[] _reporters) public ownerOnly {
}
/**
@dev claims BNT from msg.sender to be converted to BNT on another blockchain
@param _toBlockchain blockchain BNT will be issued on
@param _to address to send the BNT to
@param _amount the amount to transfer
*/
function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount) public whenXTransfersEnabled {
}
/**
@dev allows reporter to report transaction which occured on another blockchain
@param _fromBlockchain blockchain BNT was destroyed in
@param _txId transactionId of transaction thats being reported
@param _to address to receive BNT
@param _amount amount of BNT destroyed on another blockchain
*/
function reportTx(
bytes32 _fromBlockchain,
uint256 _txId,
address _to,
uint256 _amount
)
public
isReporter
whenReportingEnabled
{
// require that the transaction has not been reported yet by the reporter
require(!reportedTxs[_txId][msg.sender]);
// set reported as true
reportedTxs[_txId][msg.sender] = true;
Transaction storage txn = transactions[_txId];
// If the caller is the first reporter, set the transaction details
if (txn.numOfReports == 0) {
txn.to = _to;
txn.amount = _amount;
txn.fromBlockchain = _fromBlockchain;
} else {
// otherwise, verify transaction details
require(txn.to == _to && txn.amount == _amount && txn.fromBlockchain == _fromBlockchain);
}
// increment the number of reports
txn.numOfReports++;
emit TxReport(msg.sender, _fromBlockchain, _txId, _to, _amount);
// if theres enough reports, try to release tokens
if (txn.numOfReports >= minRequiredReports) {
require(<FILL_ME>)
// set the transaction as completed
transactions[_txId].completed = true;
releaseTokens(_to, _amount);
}
}
/**
@dev method for calculating current lock limit
@return the current maximum limit of BNT that can be locked
*/
function getCurrentLockLimit() public view returns (uint256) {
}
/**
@dev method for calculating current release limit
@return the current maximum limit of BNT that can be released
*/
function getCurrentReleaseLimit() public view returns (uint256) {
}
/**
@dev claims and locks BNT from msg.sender to be converted to BNT on another blockchain
@param _amount the amount to lock
*/
function lockTokens(uint256 _amount) private {
}
/**
@dev private method to release BNT the contract holds
@param _to the address to release BNT to
@param _amount the amount to release
*/
function releaseTokens(address _to, uint256 _amount) private {
}
}
| !transactions[_txId].completed | 52,073 | !transactions[_txId].completed |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.