comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
null | contract ProxyData {
address internal proxied;
}
contract Proxy is ProxyData {
constructor(address _proxied) public {
}
function () external payable {
}
}
contract UniswapFactoryInterface {
// Public Variables
address public exchangeTemplate;
uint256 public tokenCount;
// Create Exchange
function createExchange(address token) external returns (address exchange);
// Get Exchange and Token Info
function getExchange(address token) external view returns (address exchange);
function getToken(address exchange) external view returns (address token);
function getTokenWithId(uint256 tokenId) external view returns (address token);
// Never use
function initializeFactory(address template) external;
}
contract FundHeader {
address constant internal cEth = address(0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5);
UniswapFactoryInterface constant internal uniswapFactory = UniswapFactoryInterface(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
}
contract FundDataInternal is ProxyData, FundHeader {
address internal collateralOwner;
address internal interestWithdrawer;
// cTokenAddress -> sum deposits denominated in underlying
mapping(address => uint) internal initialDepositCollateral;
// cTokenAddresses
address[] internal markets;
}
contract CERC20NoBorrowInterface {
function mint(uint mintAmount) external returns (uint);
address public underlying;
}
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract FundProxy is Proxy, FundDataInternal {
constructor(
address proxied,
address _collateralOwner,
address _interestWithdrawer,
address[] memory _markets
)
public
Proxy(proxied)
{
for (uint i=0; i < _markets.length; i++) {
markets.push(_markets[i]);
if (_markets[i] == cEth) {
continue;
}
address underlying = CERC20NoBorrowInterface(_markets[i]).underlying();
require(IERC20(underlying).approve(_markets[i], uint(-1)));
require(<FILL_ME>)
}
collateralOwner = _collateralOwner;
interestWithdrawer = _interestWithdrawer;
}
}
contract FundFactory {
address private implementation;
event NewFundCreated(address indexed collateralOwner, address proxyAddress);
constructor(address _implementation) public {
}
function createFund(address _interestWithdrawer, address[] calldata _markets)
external
{
}
}
| IERC20(underlying).approve(uniswapFactory.getExchange(underlying),uint(-1)) | 307,189 | IERC20(underlying).approve(uniswapFactory.getExchange(underlying),uint(-1)) |
"Cannot find Issuer address" | pragma solidity ^0.5.16;
// Inheritance
import "./Owned.sol";
import "./interfaces/IAddressResolver.sol";
// Internal references
import "./interfaces/IIssuer.sol";
import "./MixinResolver.sol";
// https://docs.synthetix.io/contracts/source/contracts/addressresolver
contract AddressResolver is Owned, IAddressResolver {
mapping(bytes32 => address) public repository;
constructor(address _owner) public Owned(_owner) {}
/* ========== RESTRICTED FUNCTIONS ========== */
function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner {
}
/* ========= PUBLIC FUNCTIONS ========== */
function rebuildCaches(MixinResolver[] calldata destinations) external {
}
/* ========== VIEWS ========== */
function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) {
}
function getAddress(bytes32 name) external view returns (address) {
}
function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) {
}
function getSynth(bytes32 key) external view returns (address) {
IIssuer issuer = IIssuer(repository["Issuer"]);
require(<FILL_ME>)
return address(issuer.synths(key));
}
/* ========== EVENTS ========== */
event AddressImported(bytes32 name, address destination);
}
| address(issuer)!=address(0),"Cannot find Issuer address" | 307,220 | address(issuer)!=address(0) |
null | pragma solidity ^0.4.24;
/*
Developed by: https://www.tradecryptocurrency.com/
*/
contract owned {
address public owner;
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner)
onlyOwner public {
}
}
contract pays_commission {
address public commissionGetter;
uint256 public minimumEtherCommission;
uint public minimumTokenCommission;
constructor() public {
}
modifier onlyCommissionGetter {
}
function transferCommissionGetter(address newCommissionGetter)
onlyCommissionGetter public {
}
function changeMinimumCommission(
uint256 newMinEtherCommission, uint newMinTokenCommission)
onlyCommissionGetter public {
}
}
contract XCPToken is pays_commission, owned {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
uint256 public buyPrice = 70000000000;
uint256 public sellPrice = 50000000000;
bool public closeSell = false;
mapping (address => bool) public frozenAccount;
// Events
event Transfer(address indexed from, address indexed to, uint256 value);
event FrozenFunds(address target, bool frozen);
event Deposit(address sender, uint amount);
event Withdrawal(address receiver, uint amount);
// Constructor
constructor(uint256 initialSupply, string tokenName, string tokenSymbol)
public {
}
// Internal functions
function _transfer(address _from, address _to, uint _value)
internal {
}
function _pay_token_commission (uint256 _value)
internal {
}
// Only owner functions
function refillTokens(uint256 _value)
onlyOwner public {
}
function mintToken(uint256 mintedAmount)
onlyOwner public {
}
function freezeAccount(address target, bool freeze)
onlyOwner public {
}
function setPrices(uint256 newSellPrice, uint256 newBuyPrice)
onlyOwner public {
}
function setStatus(bool isClosedSell)
onlyOwner public {
}
function withdrawEther(uint amountInWeis)
onlyOwner public {
}
// Public functions
function transfer(address _to, uint256 _value)
public {
}
function approve(address _spender, uint256 _value)
public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool success) {
}
function depositEther() payable
public returns(bool success) {
address contr = this;
require(<FILL_ME>)
emit Deposit(msg.sender, msg.value);
return true;
}
function buy() payable
public {
}
function sell(uint256 amount)
public {
}
function () payable
public {
}
}
| (contr.balance+msg.value)>contr.balance | 307,229 | (contr.balance+msg.value)>contr.balance |
null | pragma solidity ^0.4.24;
/*
Developed by: https://www.tradecryptocurrency.com/
*/
contract owned {
address public owner;
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner)
onlyOwner public {
}
}
contract pays_commission {
address public commissionGetter;
uint256 public minimumEtherCommission;
uint public minimumTokenCommission;
constructor() public {
}
modifier onlyCommissionGetter {
}
function transferCommissionGetter(address newCommissionGetter)
onlyCommissionGetter public {
}
function changeMinimumCommission(
uint256 newMinEtherCommission, uint newMinTokenCommission)
onlyCommissionGetter public {
}
}
contract XCPToken is pays_commission, owned {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
uint256 public buyPrice = 70000000000;
uint256 public sellPrice = 50000000000;
bool public closeSell = false;
mapping (address => bool) public frozenAccount;
// Events
event Transfer(address indexed from, address indexed to, uint256 value);
event FrozenFunds(address target, bool frozen);
event Deposit(address sender, uint amount);
event Withdrawal(address receiver, uint amount);
// Constructor
constructor(uint256 initialSupply, string tokenName, string tokenSymbol)
public {
}
// Internal functions
function _transfer(address _from, address _to, uint _value)
internal {
}
function _pay_token_commission (uint256 _value)
internal {
}
// Only owner functions
function refillTokens(uint256 _value)
onlyOwner public {
}
function mintToken(uint256 mintedAmount)
onlyOwner public {
}
function freezeAccount(address target, bool freeze)
onlyOwner public {
}
function setPrices(uint256 newSellPrice, uint256 newBuyPrice)
onlyOwner public {
}
function setStatus(bool isClosedSell)
onlyOwner public {
}
function withdrawEther(uint amountInWeis)
onlyOwner public {
}
// Public functions
function transfer(address _to, uint256 _value)
public {
}
function approve(address _spender, uint256 _value)
public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool success) {
}
function depositEther() payable
public returns(bool success) {
}
function buy() payable
public {
}
function sell(uint256 amount)
public {
require(<FILL_ME>)
_pay_token_commission(amount);
_transfer(msg.sender, this, amount);
uint market_value = amount * sellPrice;
address contr = this;
require(contr.balance >= market_value);
msg.sender.transfer(market_value);
}
function () payable
public {
}
}
| !closeSell | 307,229 | !closeSell |
"Cannot claim 0 or less" | /**
*Submitted for verification at Etherscan.io on 2021-02-12
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-12
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-11
*/
pragma solidity 0.6.12;
// SPDX-License-Identifier: No License
/**
* @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) {
}
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
function balanceOf(address) external view returns (uint256);
}
contract PredictzPoints is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
// PRDZ token contract address
address public constant tokenAddress = 0x4e085036A1b732cBe4FfB1C12ddfDd87E7C3664d;
mapping(address => uint) public unclaimed;
mapping(address => uint) public claimed;
event RewardAdded(address indexed user,uint amount ,uint time);
event RewardClaimed(address indexed user, uint amount ,uint time );
function addCashback(address _user , uint _amount ) public onlyOwner returns (bool) {
}
function addCashbackBulk(address[] memory _users, uint[] memory _amount) public onlyOwner {
}
function claim() public returns (uint) {
require(<FILL_ME>)
uint amount = unclaimed[msg.sender] ;
Token(tokenAddress).transfer(msg.sender, amount);
emit RewardClaimed(msg.sender,unclaimed[msg.sender],now);
claimed[msg.sender] = claimed[msg.sender].add(unclaimed[msg.sender]) ;
unclaimed[msg.sender] = 0 ;
}
function getUnclaimedCashback(address _user) view public returns ( uint ) {
}
function getClaimedCashback(address _user) view public returns ( uint ) {
}
function addContractBalance(uint amount) public onlyOwner{
}
function withdrawBalance() public onlyOwner {
}
function withdrawToken() public onlyOwner {
}
}
| unclaimed[msg.sender]>0,"Cannot claim 0 or less" | 307,274 | unclaimed[msg.sender]>0 |
"Cannot add balance!" | /**
*Submitted for verification at Etherscan.io on 2021-02-12
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-12
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-11
*/
pragma solidity 0.6.12;
// SPDX-License-Identifier: No License
/**
* @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) {
}
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
function balanceOf(address) external view returns (uint256);
}
contract PredictzPoints is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
// PRDZ token contract address
address public constant tokenAddress = 0x4e085036A1b732cBe4FfB1C12ddfDd87E7C3664d;
mapping(address => uint) public unclaimed;
mapping(address => uint) public claimed;
event RewardAdded(address indexed user,uint amount ,uint time);
event RewardClaimed(address indexed user, uint amount ,uint time );
function addCashback(address _user , uint _amount ) public onlyOwner returns (bool) {
}
function addCashbackBulk(address[] memory _users, uint[] memory _amount) public onlyOwner {
}
function claim() public returns (uint) {
}
function getUnclaimedCashback(address _user) view public returns ( uint ) {
}
function getClaimedCashback(address _user) view public returns ( uint ) {
}
function addContractBalance(uint amount) public onlyOwner{
require(<FILL_ME>)
}
function withdrawBalance() public onlyOwner {
}
function withdrawToken() public onlyOwner {
}
}
| Token(tokenAddress).transferFrom(msg.sender,address(this),amount),"Cannot add balance!" | 307,274 | Token(tokenAddress).transferFrom(msg.sender,address(this),amount) |
"Cannot withdraw balance!" | /**
*Submitted for verification at Etherscan.io on 2021-02-12
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-12
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-11
*/
pragma solidity 0.6.12;
// SPDX-License-Identifier: No License
/**
* @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) {
}
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
function balanceOf(address) external view returns (uint256);
}
contract PredictzPoints is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
// PRDZ token contract address
address public constant tokenAddress = 0x4e085036A1b732cBe4FfB1C12ddfDd87E7C3664d;
mapping(address => uint) public unclaimed;
mapping(address => uint) public claimed;
event RewardAdded(address indexed user,uint amount ,uint time);
event RewardClaimed(address indexed user, uint amount ,uint time );
function addCashback(address _user , uint _amount ) public onlyOwner returns (bool) {
}
function addCashbackBulk(address[] memory _users, uint[] memory _amount) public onlyOwner {
}
function claim() public returns (uint) {
}
function getUnclaimedCashback(address _user) view public returns ( uint ) {
}
function getClaimedCashback(address _user) view public returns ( uint ) {
}
function addContractBalance(uint amount) public onlyOwner{
}
function withdrawBalance() public onlyOwner {
}
function withdrawToken() public onlyOwner {
require(<FILL_ME>)
}
}
| Token(tokenAddress).transfer(msg.sender,Token(tokenAddress).balanceOf(address(this))),"Cannot withdraw balance!" | 307,274 | Token(tokenAddress).transfer(msg.sender,Token(tokenAddress).balanceOf(address(this))) |
"NFT contract already registered" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./XanaNFTTradable.sol";
contract XanaNFTFactory is Ownable {
/// @dev Events of the contract
event ContractCreated(address creator, address nft);
event ContractDisabled(address caller, address nft);
/// @notice Xana auction contract address;
address public auction;
/// @notice Xana marketplace contract address;
address public marketplace;
/// @notice Xana bundle marketplace contract address;
address public bundleMarketplace;
/// @notice NFT mint fee
uint256 public mintFee;
/// @notice Platform fee for deploying new NFT contract
uint256 public platformFee;
/// @notice Platform fee recipient
address payable public feeRecipient;
/// @notice NFT Address => Bool
mapping(address => bool) public exists;
bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd;
/// @notice Contract constructor
constructor(
address _auction,
address _marketplace,
address _bundleMarketplace,
uint256 _mintFee,
address payable _feeRecipient,
uint256 _platformFee
) public {
}
/**
@notice Update auction contract
@dev Only admin
@param _auction address the auction contract address to set
*/
function updateAuction(address _auction) external onlyOwner {
}
/**
@notice Update marketplace contract
@dev Only admin
@param _marketplace address the marketplace contract address to set
*/
function updateMarketplace(address _marketplace) external onlyOwner {
}
/**
@notice Update bundle marketplace contract
@dev Only admin
@param _bundleMarketplace address the bundle marketplace contract address to set
*/
function updateBundleMarketplace(address _bundleMarketplace)
external
onlyOwner
{
}
/**
@notice Update mint fee
@dev Only admin
@param _mintFee uint256 the platform fee to set
*/
function updateMintFee(uint256 _mintFee) external onlyOwner {
}
/**
@notice Update platform fee
@dev Only admin
@param _platformFee uint256 the platform fee to set
*/
function updatePlatformFee(uint256 _platformFee) external onlyOwner {
}
/**
@notice Method for updating platform fee address
@dev Only admin
@param _feeRecipient payable address the address to sends the funds to
*/
function updateFeeRecipient(address payable _feeRecipient)
external
onlyOwner
{
}
/// @notice Method for deploy new XanaNFTTradable contract
/// @param _name Name of NFT contract
/// @param _symbol Symbol of NFT contract
function createNFTContract(string memory _name, string memory _symbol)
external
payable
returns (address)
{
}
/// @notice Method for registering existing XanaNFTTradable contract
/// @param tokenContractAddress Address of NFT contract
function registerTokenContract(address tokenContractAddress)
external
onlyOwner
{
require(<FILL_ME>)
require(IERC165(tokenContractAddress).supportsInterface(INTERFACE_ID_ERC721), "Not an ERC721 contract");
exists[tokenContractAddress] = true;
emit ContractCreated(_msgSender(), tokenContractAddress);
}
/// @notice Method for disabling existing XanaNFTTradable contract
/// @param tokenContractAddress Address of NFT contract
function disableTokenContract(address tokenContractAddress)
external
onlyOwner
{
}
}
| !exists[tokenContractAddress],"NFT contract already registered" | 307,320 | !exists[tokenContractAddress] |
"Not an ERC721 contract" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./XanaNFTTradable.sol";
contract XanaNFTFactory is Ownable {
/// @dev Events of the contract
event ContractCreated(address creator, address nft);
event ContractDisabled(address caller, address nft);
/// @notice Xana auction contract address;
address public auction;
/// @notice Xana marketplace contract address;
address public marketplace;
/// @notice Xana bundle marketplace contract address;
address public bundleMarketplace;
/// @notice NFT mint fee
uint256 public mintFee;
/// @notice Platform fee for deploying new NFT contract
uint256 public platformFee;
/// @notice Platform fee recipient
address payable public feeRecipient;
/// @notice NFT Address => Bool
mapping(address => bool) public exists;
bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd;
/// @notice Contract constructor
constructor(
address _auction,
address _marketplace,
address _bundleMarketplace,
uint256 _mintFee,
address payable _feeRecipient,
uint256 _platformFee
) public {
}
/**
@notice Update auction contract
@dev Only admin
@param _auction address the auction contract address to set
*/
function updateAuction(address _auction) external onlyOwner {
}
/**
@notice Update marketplace contract
@dev Only admin
@param _marketplace address the marketplace contract address to set
*/
function updateMarketplace(address _marketplace) external onlyOwner {
}
/**
@notice Update bundle marketplace contract
@dev Only admin
@param _bundleMarketplace address the bundle marketplace contract address to set
*/
function updateBundleMarketplace(address _bundleMarketplace)
external
onlyOwner
{
}
/**
@notice Update mint fee
@dev Only admin
@param _mintFee uint256 the platform fee to set
*/
function updateMintFee(uint256 _mintFee) external onlyOwner {
}
/**
@notice Update platform fee
@dev Only admin
@param _platformFee uint256 the platform fee to set
*/
function updatePlatformFee(uint256 _platformFee) external onlyOwner {
}
/**
@notice Method for updating platform fee address
@dev Only admin
@param _feeRecipient payable address the address to sends the funds to
*/
function updateFeeRecipient(address payable _feeRecipient)
external
onlyOwner
{
}
/// @notice Method for deploy new XanaNFTTradable contract
/// @param _name Name of NFT contract
/// @param _symbol Symbol of NFT contract
function createNFTContract(string memory _name, string memory _symbol)
external
payable
returns (address)
{
}
/// @notice Method for registering existing XanaNFTTradable contract
/// @param tokenContractAddress Address of NFT contract
function registerTokenContract(address tokenContractAddress)
external
onlyOwner
{
require(!exists[tokenContractAddress], "NFT contract already registered");
require(<FILL_ME>)
exists[tokenContractAddress] = true;
emit ContractCreated(_msgSender(), tokenContractAddress);
}
/// @notice Method for disabling existing XanaNFTTradable contract
/// @param tokenContractAddress Address of NFT contract
function disableTokenContract(address tokenContractAddress)
external
onlyOwner
{
}
}
| IERC165(tokenContractAddress).supportsInterface(INTERFACE_ID_ERC721),"Not an ERC721 contract" | 307,320 | IERC165(tokenContractAddress).supportsInterface(INTERFACE_ID_ERC721) |
"NFT contract is not registered" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./XanaNFTTradable.sol";
contract XanaNFTFactory is Ownable {
/// @dev Events of the contract
event ContractCreated(address creator, address nft);
event ContractDisabled(address caller, address nft);
/// @notice Xana auction contract address;
address public auction;
/// @notice Xana marketplace contract address;
address public marketplace;
/// @notice Xana bundle marketplace contract address;
address public bundleMarketplace;
/// @notice NFT mint fee
uint256 public mintFee;
/// @notice Platform fee for deploying new NFT contract
uint256 public platformFee;
/// @notice Platform fee recipient
address payable public feeRecipient;
/// @notice NFT Address => Bool
mapping(address => bool) public exists;
bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd;
/// @notice Contract constructor
constructor(
address _auction,
address _marketplace,
address _bundleMarketplace,
uint256 _mintFee,
address payable _feeRecipient,
uint256 _platformFee
) public {
}
/**
@notice Update auction contract
@dev Only admin
@param _auction address the auction contract address to set
*/
function updateAuction(address _auction) external onlyOwner {
}
/**
@notice Update marketplace contract
@dev Only admin
@param _marketplace address the marketplace contract address to set
*/
function updateMarketplace(address _marketplace) external onlyOwner {
}
/**
@notice Update bundle marketplace contract
@dev Only admin
@param _bundleMarketplace address the bundle marketplace contract address to set
*/
function updateBundleMarketplace(address _bundleMarketplace)
external
onlyOwner
{
}
/**
@notice Update mint fee
@dev Only admin
@param _mintFee uint256 the platform fee to set
*/
function updateMintFee(uint256 _mintFee) external onlyOwner {
}
/**
@notice Update platform fee
@dev Only admin
@param _platformFee uint256 the platform fee to set
*/
function updatePlatformFee(uint256 _platformFee) external onlyOwner {
}
/**
@notice Method for updating platform fee address
@dev Only admin
@param _feeRecipient payable address the address to sends the funds to
*/
function updateFeeRecipient(address payable _feeRecipient)
external
onlyOwner
{
}
/// @notice Method for deploy new XanaNFTTradable contract
/// @param _name Name of NFT contract
/// @param _symbol Symbol of NFT contract
function createNFTContract(string memory _name, string memory _symbol)
external
payable
returns (address)
{
}
/// @notice Method for registering existing XanaNFTTradable contract
/// @param tokenContractAddress Address of NFT contract
function registerTokenContract(address tokenContractAddress)
external
onlyOwner
{
}
/// @notice Method for disabling existing XanaNFTTradable contract
/// @param tokenContractAddress Address of NFT contract
function disableTokenContract(address tokenContractAddress)
external
onlyOwner
{
require(<FILL_ME>)
exists[tokenContractAddress] = false;
emit ContractDisabled(_msgSender(), tokenContractAddress);
}
}
| exists[tokenContractAddress],"NFT contract is not registered" | 307,320 | exists[tokenContractAddress] |
null | /**
* Investors relations: [email protected]
**/
pragma solidity ^0.4.24;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract 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() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Standard
* @dev Strong version of ERC20 interface
*/
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract CoinLottoToken is ERC20Interface,Ownable {
using SafeMath for uint256;
uint256 public totalSupply;
mapping(address => uint256) tokenBalances;
string public constant name = "CoinLottoToken";
string public constant symbol = "CLT";
uint256 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 10000000000;
address ownerWallet;
// Owner of account approves the transfer of an amount to another account
mapping (address => mapping (address => uint256)) allowed;
event Debug(string message, address addr, uint256 number);
function CoinLottoToken (address wallet) public {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
require(<FILL_ME>)
tokenBalances[msg.sender] = tokenBalances[msg.sender].sub(_value);
tokenBalances[_to] = tokenBalances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
}
/**
* @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) {
}
// ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------
function totalSupply() public constant returns (uint) {
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
/**
* @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) {
}
// ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------
function () public payable {
}
/**
* @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) constant public returns (uint256 balance) {
}
function Return(address wallet, address buyer, uint256 tokenAmount) public onlyOwner {
}
function showMyTokenBalance(address addr) public view returns (uint tokenBalance) {
}
}
| tokenBalances[msg.sender]>=_value | 307,323 | tokenBalances[msg.sender]>=_value |
null | /**
* Investors relations: [email protected]
**/
pragma solidity ^0.4.24;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract 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() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Standard
* @dev Strong version of ERC20 interface
*/
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract CoinLottoToken is ERC20Interface,Ownable {
using SafeMath for uint256;
uint256 public totalSupply;
mapping(address => uint256) tokenBalances;
string public constant name = "CoinLottoToken";
string public constant symbol = "CLT";
uint256 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 10000000000;
address ownerWallet;
// Owner of account approves the transfer of an amount to another account
mapping (address => mapping (address => uint256)) allowed;
event Debug(string message, address addr, uint256 number);
function CoinLottoToken (address wallet) public {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @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) {
}
// ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------
function totalSupply() public constant returns (uint) {
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
/**
* @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) {
}
// ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------
function () public payable {
}
/**
* @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) constant public returns (uint256 balance) {
}
function Return(address wallet, address buyer, uint256 tokenAmount) public onlyOwner {
require(<FILL_ME>)
tokenBalances[buyer] = tokenBalances[buyer].add(tokenAmount);
tokenBalances[wallet] = tokenBalances[wallet].sub(tokenAmount);
Transfer(buyer, wallet, tokenAmount);
}
function showMyTokenBalance(address addr) public view returns (uint tokenBalance) {
}
}
| tokenBalances[buyer]<=tokenAmount | 307,323 | tokenBalances[buyer]<=tokenAmount |
null | pragma solidity ^0.8.0;
contract ProxyRegistry is Ownable {
/* DelegateProxy implementation contract. Must be initialized. */
address public delegateProxyImplementation;
/* Authenticated proxies by user. */
mapping(address => OwnableDelegateProxy) public proxies;
/* Contracts pending access. */
mapping(address => uint256) public pending;
/* Contracts allowed to call those proxies. */
mapping(address => bool) public contracts;
/* Delay period for adding an authenticated contract.
This mitigates a particular class of potential attack on the Elementix DAO (which owns this registry) - if at any point the value of assets held by proxy contracts exceeded the value of half the ELT supply (votes in the DAO),
a malicious but rational attacker could buy half the Elementix and grant themselves access to all the proxy contracts. A delay period renders this attack nonthreatening - given one weeks, if that happened, users would have
plenty of time to notice and transfer their assets.
*/
uint256 public DELAY_PERIOD = 7 days;
// event
event RegisterProxy(address indexed sender, address proxyAddr);
event AuthenticationOperation(address indexed addr, bool opt);
/**
* Start the process to enable access for specified contract. Subject to delay period.
*
* @dev ProxyRegistry owner only
* @param addr Address to which to grant permissions
*/
function startGrantAuthentication (address addr)
public
onlyOwner
{
require(<FILL_ME>)
pending[addr] = block.timestamp;
}
/**
* End the process to nable access for specified contract after delay period has passed.
*
* @dev ProxyRegistry owner only
* @param addr Address to which to grant permissions
*/
function endGrantAuthentication (address addr)
public
onlyOwner
{
}
/**
* Revoke access for specified contract. Can be done instantly.
*
* @dev ProxyRegistry owner only
* @param addr Address of which to revoke permissions
*/
function revokeAuthentication (address addr)
public
onlyOwner
{
}
/**
* Register a proxy contract with this registry
*
* @dev Must be called by the user which the proxy is for, creates a new AuthenticatedProxy
* @return proxy New AuthenticatedProxy contract
*/
function registerProxy()
public
returns (OwnableDelegateProxy proxy)
{
}
}
| !contracts[addr]&&pending[addr]==0 | 307,339 | !contracts[addr]&&pending[addr]==0 |
null | pragma solidity ^0.8.0;
contract ProxyRegistry is Ownable {
/* DelegateProxy implementation contract. Must be initialized. */
address public delegateProxyImplementation;
/* Authenticated proxies by user. */
mapping(address => OwnableDelegateProxy) public proxies;
/* Contracts pending access. */
mapping(address => uint256) public pending;
/* Contracts allowed to call those proxies. */
mapping(address => bool) public contracts;
/* Delay period for adding an authenticated contract.
This mitigates a particular class of potential attack on the Elementix DAO (which owns this registry) - if at any point the value of assets held by proxy contracts exceeded the value of half the ELT supply (votes in the DAO),
a malicious but rational attacker could buy half the Elementix and grant themselves access to all the proxy contracts. A delay period renders this attack nonthreatening - given one weeks, if that happened, users would have
plenty of time to notice and transfer their assets.
*/
uint256 public DELAY_PERIOD = 7 days;
// event
event RegisterProxy(address indexed sender, address proxyAddr);
event AuthenticationOperation(address indexed addr, bool opt);
/**
* Start the process to enable access for specified contract. Subject to delay period.
*
* @dev ProxyRegistry owner only
* @param addr Address to which to grant permissions
*/
function startGrantAuthentication (address addr)
public
onlyOwner
{
}
/**
* End the process to nable access for specified contract after delay period has passed.
*
* @dev ProxyRegistry owner only
* @param addr Address to which to grant permissions
*/
function endGrantAuthentication (address addr)
public
onlyOwner
{
require(<FILL_ME>)
pending[addr] = 0;
contracts[addr] = true;
emit AuthenticationOperation(addr, true);
}
/**
* Revoke access for specified contract. Can be done instantly.
*
* @dev ProxyRegistry owner only
* @param addr Address of which to revoke permissions
*/
function revokeAuthentication (address addr)
public
onlyOwner
{
}
/**
* Register a proxy contract with this registry
*
* @dev Must be called by the user which the proxy is for, creates a new AuthenticatedProxy
* @return proxy New AuthenticatedProxy contract
*/
function registerProxy()
public
returns (OwnableDelegateProxy proxy)
{
}
}
| !contracts[addr]&&pending[addr]!=0&&((pending[addr]+DELAY_PERIOD)<block.timestamp) | 307,339 | !contracts[addr]&&pending[addr]!=0&&((pending[addr]+DELAY_PERIOD)<block.timestamp) |
"Purchase would exceed max supply of Helpers" | /*
* Holiday Helpers NFT
*/
pragma solidity ^0.8.10;
contract HolidayHelpersNFT is ERC721, Ownable, ERC721Burnable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public baseURI;
string public baseExtension = ".json";
uint256 private presalePrice = 0.06 ether;
uint256 private helperPrice = 0.08 ether;
uint256 private maxHelperPurchase = 10;
uint256 private maxHelpersPresale = 5001;
uint256 private maxHelpers = 10001;
bool public saleIsActive = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
)
ERC721(_name, _symbol)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintHelpers(uint256 _numberOfHelpers) public payable {
require(tx.origin == msg.sender, "Can not mint through another contract");
require(saleIsActive, "Sale must be active to mint Holiday Helpers");
require(_numberOfHelpers > 0, "Must mint at least 1 Helper");
require(_numberOfHelpers <= maxHelperPurchase, "Can only mint 10 tokens at a time");
require(<FILL_ME>)
if (_tokenIdCounter.current() <= maxHelpersPresale) {
require(presalePrice*_numberOfHelpers <= msg.value, "Ether sent for presale price not correct");
}
else {
require(helperPrice*_numberOfHelpers <= msg.value, "Ether value sent is not correct");
}
for(uint256 i = 0; i < _numberOfHelpers; i++) {
uint256 mintIndex = _tokenIdCounter.current();
if (mintIndex <= maxHelpers) {
_tokenIdCounter.increment();
_safeMint(msg.sender, mintIndex);
}
}
}
function reserveMint(uint8 _reservedAmount) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxHelperAmount(uint256 _newMaxHelperAmount) public onlyOwner {
}
function setPresalePrice(uint256 _newPresalePrice) public onlyOwner {
}
function setPrice(uint256 _newHelperPrice) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSaleState(bool _val) external onlyOwner {
}
function helpersMinted() public view returns (uint256) {
}
function giveaway(uint256 _amount, address payable _to) external onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| _tokenIdCounter.current()+_numberOfHelpers<=maxHelpers,"Purchase would exceed max supply of Helpers" | 307,348 | _tokenIdCounter.current()+_numberOfHelpers<=maxHelpers |
"Ether sent for presale price not correct" | /*
* Holiday Helpers NFT
*/
pragma solidity ^0.8.10;
contract HolidayHelpersNFT is ERC721, Ownable, ERC721Burnable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public baseURI;
string public baseExtension = ".json";
uint256 private presalePrice = 0.06 ether;
uint256 private helperPrice = 0.08 ether;
uint256 private maxHelperPurchase = 10;
uint256 private maxHelpersPresale = 5001;
uint256 private maxHelpers = 10001;
bool public saleIsActive = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
)
ERC721(_name, _symbol)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintHelpers(uint256 _numberOfHelpers) public payable {
require(tx.origin == msg.sender, "Can not mint through another contract");
require(saleIsActive, "Sale must be active to mint Holiday Helpers");
require(_numberOfHelpers > 0, "Must mint at least 1 Helper");
require(_numberOfHelpers <= maxHelperPurchase, "Can only mint 10 tokens at a time");
require(_tokenIdCounter.current() + _numberOfHelpers <= maxHelpers, "Purchase would exceed max supply of Helpers");
if (_tokenIdCounter.current() <= maxHelpersPresale) {
require(<FILL_ME>)
}
else {
require(helperPrice*_numberOfHelpers <= msg.value, "Ether value sent is not correct");
}
for(uint256 i = 0; i < _numberOfHelpers; i++) {
uint256 mintIndex = _tokenIdCounter.current();
if (mintIndex <= maxHelpers) {
_tokenIdCounter.increment();
_safeMint(msg.sender, mintIndex);
}
}
}
function reserveMint(uint8 _reservedAmount) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxHelperAmount(uint256 _newMaxHelperAmount) public onlyOwner {
}
function setPresalePrice(uint256 _newPresalePrice) public onlyOwner {
}
function setPrice(uint256 _newHelperPrice) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSaleState(bool _val) external onlyOwner {
}
function helpersMinted() public view returns (uint256) {
}
function giveaway(uint256 _amount, address payable _to) external onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| presalePrice*_numberOfHelpers<=msg.value,"Ether sent for presale price not correct" | 307,348 | presalePrice*_numberOfHelpers<=msg.value |
"Ether value sent is not correct" | /*
* Holiday Helpers NFT
*/
pragma solidity ^0.8.10;
contract HolidayHelpersNFT is ERC721, Ownable, ERC721Burnable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public baseURI;
string public baseExtension = ".json";
uint256 private presalePrice = 0.06 ether;
uint256 private helperPrice = 0.08 ether;
uint256 private maxHelperPurchase = 10;
uint256 private maxHelpersPresale = 5001;
uint256 private maxHelpers = 10001;
bool public saleIsActive = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
)
ERC721(_name, _symbol)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintHelpers(uint256 _numberOfHelpers) public payable {
require(tx.origin == msg.sender, "Can not mint through another contract");
require(saleIsActive, "Sale must be active to mint Holiday Helpers");
require(_numberOfHelpers > 0, "Must mint at least 1 Helper");
require(_numberOfHelpers <= maxHelperPurchase, "Can only mint 10 tokens at a time");
require(_tokenIdCounter.current() + _numberOfHelpers <= maxHelpers, "Purchase would exceed max supply of Helpers");
if (_tokenIdCounter.current() <= maxHelpersPresale) {
require(presalePrice*_numberOfHelpers <= msg.value, "Ether sent for presale price not correct");
}
else {
require(<FILL_ME>)
}
for(uint256 i = 0; i < _numberOfHelpers; i++) {
uint256 mintIndex = _tokenIdCounter.current();
if (mintIndex <= maxHelpers) {
_tokenIdCounter.increment();
_safeMint(msg.sender, mintIndex);
}
}
}
function reserveMint(uint8 _reservedAmount) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxHelperAmount(uint256 _newMaxHelperAmount) public onlyOwner {
}
function setPresalePrice(uint256 _newPresalePrice) public onlyOwner {
}
function setPrice(uint256 _newHelperPrice) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSaleState(bool _val) external onlyOwner {
}
function helpersMinted() public view returns (uint256) {
}
function giveaway(uint256 _amount, address payable _to) external onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| helperPrice*_numberOfHelpers<=msg.value,"Ether value sent is not correct" | 307,348 | helperPrice*_numberOfHelpers<=msg.value |
"Purchase would exceed max supply of Helpers" | /*
* Holiday Helpers NFT
*/
pragma solidity ^0.8.10;
contract HolidayHelpersNFT is ERC721, Ownable, ERC721Burnable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public baseURI;
string public baseExtension = ".json";
uint256 private presalePrice = 0.06 ether;
uint256 private helperPrice = 0.08 ether;
uint256 private maxHelperPurchase = 10;
uint256 private maxHelpersPresale = 5001;
uint256 private maxHelpers = 10001;
bool public saleIsActive = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
)
ERC721(_name, _symbol)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintHelpers(uint256 _numberOfHelpers) public payable {
}
function reserveMint(uint8 _reservedAmount) public onlyOwner {
require(<FILL_ME>)
for(uint256 i = 0; i < _reservedAmount; i++) {
uint256 mintIndex = _tokenIdCounter.current();
if (mintIndex <= maxHelpers) {
_safeMint(msg.sender, mintIndex);
_tokenIdCounter.increment();
}
}
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxHelperAmount(uint256 _newMaxHelperAmount) public onlyOwner {
}
function setPresalePrice(uint256 _newPresalePrice) public onlyOwner {
}
function setPrice(uint256 _newHelperPrice) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSaleState(bool _val) external onlyOwner {
}
function helpersMinted() public view returns (uint256) {
}
function giveaway(uint256 _amount, address payable _to) external onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| _tokenIdCounter.current()+_reservedAmount<=maxHelpers,"Purchase would exceed max supply of Helpers" | 307,348 | _tokenIdCounter.current()+_reservedAmount<=maxHelpers |
null | /*
* Holiday Helpers NFT
*/
pragma solidity ^0.8.10;
contract HolidayHelpersNFT is ERC721, Ownable, ERC721Burnable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public baseURI;
string public baseExtension = ".json";
uint256 private presalePrice = 0.06 ether;
uint256 private helperPrice = 0.08 ether;
uint256 private maxHelperPurchase = 10;
uint256 private maxHelpersPresale = 5001;
uint256 private maxHelpers = 10001;
bool public saleIsActive = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
)
ERC721(_name, _symbol)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintHelpers(uint256 _numberOfHelpers) public payable {
}
function reserveMint(uint8 _reservedAmount) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxHelperAmount(uint256 _newMaxHelperAmount) public onlyOwner {
}
function setPresalePrice(uint256 _newPresalePrice) public onlyOwner {
}
function setPrice(uint256 _newHelperPrice) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSaleState(bool _val) external onlyOwner {
}
function helpersMinted() public view returns (uint256) {
}
function giveaway(uint256 _amount, address payable _to) external onlyOwner {
require(<FILL_ME>)
}
function withdrawAll() public payable onlyOwner {
}
}
| payable(_to).send(_amount) | 307,348 | payable(_to).send(_amount) |
null | /*
* Holiday Helpers NFT
*/
pragma solidity ^0.8.10;
contract HolidayHelpersNFT is ERC721, Ownable, ERC721Burnable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public baseURI;
string public baseExtension = ".json";
uint256 private presalePrice = 0.06 ether;
uint256 private helperPrice = 0.08 ether;
uint256 private maxHelperPurchase = 10;
uint256 private maxHelpersPresale = 5001;
uint256 private maxHelpers = 10001;
bool public saleIsActive = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
)
ERC721(_name, _symbol)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintHelpers(uint256 _numberOfHelpers) public payable {
}
function reserveMint(uint8 _reservedAmount) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxHelperAmount(uint256 _newMaxHelperAmount) public onlyOwner {
}
function setPresalePrice(uint256 _newPresalePrice) public onlyOwner {
}
function setPrice(uint256 _newHelperPrice) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSaleState(bool _val) external onlyOwner {
}
function helpersMinted() public view returns (uint256) {
}
function giveaway(uint256 _amount, address payable _to) external onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 balance = address(this).balance;
require(<FILL_ME>)
}
}
| payable(owner()).send(balance) | 307,348 | payable(owner()).send(balance) |
'Invalid caller' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
contract CouncilOfKingzMintPass is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
// Contract controls
bool public isPaused; //defaults to false
address public redeemer;
uint256 public expiration = 7 days; // 7 days
// counters
uint256 private _totalSupply = 0; // start with zero
uint256 private _totalUsed = 0; // start with zero
// metadata URIs
string private _contractURI; // initially set at deploy
string private _validURI; // initially set at deploy
string private _usedURI; // initially set at deploy
string private _expiredURI; // initially set at deploy
mapping(uint256 => bool) public usedTokens;
mapping(uint256 => uint256) public mintTime;
constructor(
string memory _name,
string memory _symbol,
string memory _initContractURI,
string memory _initValidURI,
string memory _initUsedURI,
string memory _initExpiredURI
) ERC721(_name, _symbol) {
}
modifier contractIsNotPaused() {
}
/**
* @dev Returns the URI to the contract metadata
*/
function contractURI() external view returns (string memory) {
}
/**
* @dev Returns the URI to the tokens metadata
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Returns whether a token has been used for a claim or not
*/
function isValid(uint256 tokenId) external view returns (bool) {
}
/**
* @dev Returns whether a token has been used for a claim or not
*/
function isUsed(uint256 tokenId) public view returns (bool) {
}
/**
* @dev Returns the amount of time (sec) a token has for validity
*/
function isExpired(uint256 tokenId) public view returns (bool) {
}
/**
* @dev Returns the amount of time (sec) until the pass is expired
*/
function secondsUntilExpired(uint256 tokenId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the amount of time (sec) have passed since the token was minted
*/
function secondsSinceMint(uint256 tokenId) public view returns (uint256) {
}
/**
* @dev Returns the total number of tokens in circulation
*/
function totalSupply() external view returns (uint256) {
}
/**
* @dev Returns the total number of valid tokens in circulation
*/
function totalValid() external view returns (uint256) {
}
/**
* @dev Returns the total number of used tokens in circulation
*/
function totalUsed() external view returns (uint256) {
}
/**
* @dev Returns the total number of expired tokens in circulation
*/
function totalExpired() public view returns (uint256) {
}
/**
* @dev Returns list of token ids owned by address
*/
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Flags the tokens as used
*/
function setAsUsed(uint256 tokenId) external contractIsNotPaused {
require(<FILL_ME>)
require(_exists(tokenId), 'Nonexistent token');
require(!isUsed(tokenId), 'Token used');
require(!isExpired(tokenId), 'Token expired');
_totalUsed++;
usedTokens[tokenId] = true;
}
// Owner Functions
/**
* @dev Owner mint function
*/
function ownerMintTokensToAddresses(address[] memory _addresses)
external
onlyOwner
contractIsNotPaused
{
}
/**
* @dev Sets the paused state of the contract
*/
function flipPausedState() external onlyOwner {
}
/**
* @dev Sets the address that can use the tokens
*/
function setRedeemer(address _redeemer) external onlyOwner {
}
/**
* @dev Sets the expiration duration
*/
function setExpiration(uint256 _newExpiration) external onlyOwner {
}
/**
* @dev Sets the Contract URI
*/
function setContractURI(string memory _newContractURI) external onlyOwner {
}
/**
* @dev Sets the uri for valid passes
*/
function setValidURI(string memory _newValidURI) external onlyOwner {
}
/**
* @dev Sets the uri for used passes
*/
function setUsedURI(string memory _newUsedURI) external onlyOwner {
}
/**
* @dev Sets the uri for expired passes
*/
function setExpiredURI(string memory _newExpiredURI) external onlyOwner {
}
/**
* @dev Reset an expired pass
*/
function resetTokens(uint256[] memory _tokenIds) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
/**
* @dev A fallback functions in case someone sends ETH to the contract
*/
fallback() external payable {}
receive() external payable {}
}
| _msgSender()==redeemer,'Invalid caller' | 307,383 | _msgSender()==redeemer |
'Token used' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
contract CouncilOfKingzMintPass is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
// Contract controls
bool public isPaused; //defaults to false
address public redeemer;
uint256 public expiration = 7 days; // 7 days
// counters
uint256 private _totalSupply = 0; // start with zero
uint256 private _totalUsed = 0; // start with zero
// metadata URIs
string private _contractURI; // initially set at deploy
string private _validURI; // initially set at deploy
string private _usedURI; // initially set at deploy
string private _expiredURI; // initially set at deploy
mapping(uint256 => bool) public usedTokens;
mapping(uint256 => uint256) public mintTime;
constructor(
string memory _name,
string memory _symbol,
string memory _initContractURI,
string memory _initValidURI,
string memory _initUsedURI,
string memory _initExpiredURI
) ERC721(_name, _symbol) {
}
modifier contractIsNotPaused() {
}
/**
* @dev Returns the URI to the contract metadata
*/
function contractURI() external view returns (string memory) {
}
/**
* @dev Returns the URI to the tokens metadata
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Returns whether a token has been used for a claim or not
*/
function isValid(uint256 tokenId) external view returns (bool) {
}
/**
* @dev Returns whether a token has been used for a claim or not
*/
function isUsed(uint256 tokenId) public view returns (bool) {
}
/**
* @dev Returns the amount of time (sec) a token has for validity
*/
function isExpired(uint256 tokenId) public view returns (bool) {
}
/**
* @dev Returns the amount of time (sec) until the pass is expired
*/
function secondsUntilExpired(uint256 tokenId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the amount of time (sec) have passed since the token was minted
*/
function secondsSinceMint(uint256 tokenId) public view returns (uint256) {
}
/**
* @dev Returns the total number of tokens in circulation
*/
function totalSupply() external view returns (uint256) {
}
/**
* @dev Returns the total number of valid tokens in circulation
*/
function totalValid() external view returns (uint256) {
}
/**
* @dev Returns the total number of used tokens in circulation
*/
function totalUsed() external view returns (uint256) {
}
/**
* @dev Returns the total number of expired tokens in circulation
*/
function totalExpired() public view returns (uint256) {
}
/**
* @dev Returns list of token ids owned by address
*/
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Flags the tokens as used
*/
function setAsUsed(uint256 tokenId) external contractIsNotPaused {
require(_msgSender() == redeemer, 'Invalid caller');
require(_exists(tokenId), 'Nonexistent token');
require(<FILL_ME>)
require(!isExpired(tokenId), 'Token expired');
_totalUsed++;
usedTokens[tokenId] = true;
}
// Owner Functions
/**
* @dev Owner mint function
*/
function ownerMintTokensToAddresses(address[] memory _addresses)
external
onlyOwner
contractIsNotPaused
{
}
/**
* @dev Sets the paused state of the contract
*/
function flipPausedState() external onlyOwner {
}
/**
* @dev Sets the address that can use the tokens
*/
function setRedeemer(address _redeemer) external onlyOwner {
}
/**
* @dev Sets the expiration duration
*/
function setExpiration(uint256 _newExpiration) external onlyOwner {
}
/**
* @dev Sets the Contract URI
*/
function setContractURI(string memory _newContractURI) external onlyOwner {
}
/**
* @dev Sets the uri for valid passes
*/
function setValidURI(string memory _newValidURI) external onlyOwner {
}
/**
* @dev Sets the uri for used passes
*/
function setUsedURI(string memory _newUsedURI) external onlyOwner {
}
/**
* @dev Sets the uri for expired passes
*/
function setExpiredURI(string memory _newExpiredURI) external onlyOwner {
}
/**
* @dev Reset an expired pass
*/
function resetTokens(uint256[] memory _tokenIds) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
/**
* @dev A fallback functions in case someone sends ETH to the contract
*/
fallback() external payable {}
receive() external payable {}
}
| !isUsed(tokenId),'Token used' | 307,383 | !isUsed(tokenId) |
'Token expired' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
contract CouncilOfKingzMintPass is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
// Contract controls
bool public isPaused; //defaults to false
address public redeemer;
uint256 public expiration = 7 days; // 7 days
// counters
uint256 private _totalSupply = 0; // start with zero
uint256 private _totalUsed = 0; // start with zero
// metadata URIs
string private _contractURI; // initially set at deploy
string private _validURI; // initially set at deploy
string private _usedURI; // initially set at deploy
string private _expiredURI; // initially set at deploy
mapping(uint256 => bool) public usedTokens;
mapping(uint256 => uint256) public mintTime;
constructor(
string memory _name,
string memory _symbol,
string memory _initContractURI,
string memory _initValidURI,
string memory _initUsedURI,
string memory _initExpiredURI
) ERC721(_name, _symbol) {
}
modifier contractIsNotPaused() {
}
/**
* @dev Returns the URI to the contract metadata
*/
function contractURI() external view returns (string memory) {
}
/**
* @dev Returns the URI to the tokens metadata
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Returns whether a token has been used for a claim or not
*/
function isValid(uint256 tokenId) external view returns (bool) {
}
/**
* @dev Returns whether a token has been used for a claim or not
*/
function isUsed(uint256 tokenId) public view returns (bool) {
}
/**
* @dev Returns the amount of time (sec) a token has for validity
*/
function isExpired(uint256 tokenId) public view returns (bool) {
}
/**
* @dev Returns the amount of time (sec) until the pass is expired
*/
function secondsUntilExpired(uint256 tokenId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the amount of time (sec) have passed since the token was minted
*/
function secondsSinceMint(uint256 tokenId) public view returns (uint256) {
}
/**
* @dev Returns the total number of tokens in circulation
*/
function totalSupply() external view returns (uint256) {
}
/**
* @dev Returns the total number of valid tokens in circulation
*/
function totalValid() external view returns (uint256) {
}
/**
* @dev Returns the total number of used tokens in circulation
*/
function totalUsed() external view returns (uint256) {
}
/**
* @dev Returns the total number of expired tokens in circulation
*/
function totalExpired() public view returns (uint256) {
}
/**
* @dev Returns list of token ids owned by address
*/
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Flags the tokens as used
*/
function setAsUsed(uint256 tokenId) external contractIsNotPaused {
require(_msgSender() == redeemer, 'Invalid caller');
require(_exists(tokenId), 'Nonexistent token');
require(!isUsed(tokenId), 'Token used');
require(<FILL_ME>)
_totalUsed++;
usedTokens[tokenId] = true;
}
// Owner Functions
/**
* @dev Owner mint function
*/
function ownerMintTokensToAddresses(address[] memory _addresses)
external
onlyOwner
contractIsNotPaused
{
}
/**
* @dev Sets the paused state of the contract
*/
function flipPausedState() external onlyOwner {
}
/**
* @dev Sets the address that can use the tokens
*/
function setRedeemer(address _redeemer) external onlyOwner {
}
/**
* @dev Sets the expiration duration
*/
function setExpiration(uint256 _newExpiration) external onlyOwner {
}
/**
* @dev Sets the Contract URI
*/
function setContractURI(string memory _newContractURI) external onlyOwner {
}
/**
* @dev Sets the uri for valid passes
*/
function setValidURI(string memory _newValidURI) external onlyOwner {
}
/**
* @dev Sets the uri for used passes
*/
function setUsedURI(string memory _newUsedURI) external onlyOwner {
}
/**
* @dev Sets the uri for expired passes
*/
function setExpiredURI(string memory _newExpiredURI) external onlyOwner {
}
/**
* @dev Reset an expired pass
*/
function resetTokens(uint256[] memory _tokenIds) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
/**
* @dev A fallback functions in case someone sends ETH to the contract
*/
fallback() external payable {}
receive() external payable {}
}
| !isExpired(tokenId),'Token expired' | 307,383 | !isExpired(tokenId) |
"x" | /*
🐴WELCOME TO Bojack Horseman 🐴
Supply 1B
🔥Burn 40%
💹Tokenomics:
4% Tax
2% Reward for Holders
TG : @BojackToken
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract BojackToken is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "@BojackToken";
string private constant _symbol = "Bojack";
uint8 private constant _decimals = 9;
//RFI
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _taxFee = 4;
uint256 private _redisfee = 2;
//Bots
mapping (address => bool) bannedUsers;
mapping(address => bool) private bots;
mapping(address => uint256) private cooldown;
address payable private _teamAddress;
address payable private _marketingFunds;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private _maxTxAmount = _tTotal;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor(address payable addr1, address payable addr2) {
}
function openTrading() external onlyOwner() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function removebot(address account, bool banned) public {
require(_msgSender() == _teamAddress);
if (banned) {
require(<FILL_ME>)
bannedUsers[account] = true;
} else {
delete bannedUsers[account];
}
emit WalletBanStatusUpdated(account, banned);
}
function unban(address account) public {
}
event WalletBanStatusUpdated(address user, bool banned);
function manualswap() external {
}
function manualsend() external {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function maxtx(uint256 maxTxPercent) external {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
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) {
}
}
| block.timestamp+3days>block.timestamp,"x" | 307,407 | block.timestamp+3days>block.timestamp |
null | pragma solidity ^0.4.18;
/**
* @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 {
}
}
contract PreSale is Ownable {
uint256 constant public INCREASE_RATE = 350000000000000;
uint256 constant public START_TIME = 1514228838;
uint256 constant public END_TIME = 1524251238;
uint256 public landsSold;
mapping (address => uint32) public lands;
bool private paused = false;
function PreSale() payable public {
}
event landsPurchased(address indexed purchaser, uint256 value, uint32 quantity);
event landsRedeemed(address indexed sender, uint256 lands);
function bulkPurchageLand() payable public {
require(now > START_TIME);
require(now < END_TIME);
require(paused == false);
require(<FILL_ME>)
lands[msg.sender] = lands[msg.sender] + 5;
landsSold = landsSold + 5;
landsPurchased(msg.sender, msg.value, 5);
}
function purchaseLand() payable public {
}
function redeemLand(address targetUser) public onlyOwner returns(uint256) {
}
function landPriceCurrent() view public returns(uint256) {
}
function landPricePrevious() view public returns(uint256) {
}
function withdrawal() onlyOwner public {
}
function pause() onlyOwner public {
}
function resume() onlyOwner public {
}
function isPaused () onlyOwner public view returns(bool) {
}
}
| msg.value>=(landPriceCurrent()*5+INCREASE_RATE*10) | 307,540 | msg.value>=(landPriceCurrent()*5+INCREASE_RATE*10) |
null | pragma solidity ^0.4.18;
/**
* @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 {
}
}
contract PreSale is Ownable {
uint256 constant public INCREASE_RATE = 350000000000000;
uint256 constant public START_TIME = 1514228838;
uint256 constant public END_TIME = 1524251238;
uint256 public landsSold;
mapping (address => uint32) public lands;
bool private paused = false;
function PreSale() payable public {
}
event landsPurchased(address indexed purchaser, uint256 value, uint32 quantity);
event landsRedeemed(address indexed sender, uint256 lands);
function bulkPurchageLand() payable public {
}
function purchaseLand() payable public {
}
function redeemLand(address targetUser) public onlyOwner returns(uint256) {
require(paused == false);
require(<FILL_ME>)
landsRedeemed(targetUser, lands[targetUser]);
uint256 userlands = lands[targetUser];
lands[targetUser] = 0;
return userlands;
}
function landPriceCurrent() view public returns(uint256) {
}
function landPricePrevious() view public returns(uint256) {
}
function withdrawal() onlyOwner public {
}
function pause() onlyOwner public {
}
function resume() onlyOwner public {
}
function isPaused () onlyOwner public view returns(bool) {
}
}
| lands[targetUser]>0 | 307,540 | lands[targetUser]>0 |
"Sale has already ended" | // contracts/HashScapes.sol
//
pragma solidity ^0.8.0;
// Inspired/Copied fromm BGANPUNKS V2 (bastardganpunks.club)
contract HashScapes is ERC721Enumerable, Ownable {
using SafeMath for uint256;
uint public constant MAX_SCAPES = 7778;
uint public constant numReserved = 70;
uint private curIndex = 71;
bool public hasSaleStarted = false;
string public METADATA_PROVENANCE_HASH = "";
string public baseURL = "";
constructor() ERC721("HashScapes","HASHSCAPES") {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function calculatePrice(uint256 cur_id) public view returns (uint256) {
}
function buyScape(uint256 numScapes) public payable {
require(hasSaleStarted, "Sale isn't active");
require(<FILL_ME>)
require(numScapes > 0 && numScapes <= 20, "You can buy a maximum of 20 scapes at a time");
require(totalSupply().add(numScapes) <= MAX_SCAPES, "All scapes are sold!");
uint totalPrice = 0; //calculates total price, keeping in mind purchases that span across prices
for (uint i = 0; i < numScapes; i++) {
totalPrice += calculatePrice(curIndex + i);
}
require(msg.value >= totalPrice, "Ether value sent is below the price");
for (uint i = 0; i < numScapes; i++) {
uint mintIndex = curIndex;
_safeMint(msg.sender, mintIndex);
adjustIndex();
}
}
//skip % 1111 == 0 since they are already reserved
function adjustIndex() private {
}
function getCurrentIndex() public view returns (uint) {
}
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserve() public onlyOwner {
}
function reserveCur() public onlyOwner {
}
}
| totalSupply()<MAX_SCAPES,"Sale has already ended" | 307,942 | totalSupply()<MAX_SCAPES |
"All scapes are sold!" | // contracts/HashScapes.sol
//
pragma solidity ^0.8.0;
// Inspired/Copied fromm BGANPUNKS V2 (bastardganpunks.club)
contract HashScapes is ERC721Enumerable, Ownable {
using SafeMath for uint256;
uint public constant MAX_SCAPES = 7778;
uint public constant numReserved = 70;
uint private curIndex = 71;
bool public hasSaleStarted = false;
string public METADATA_PROVENANCE_HASH = "";
string public baseURL = "";
constructor() ERC721("HashScapes","HASHSCAPES") {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function calculatePrice(uint256 cur_id) public view returns (uint256) {
}
function buyScape(uint256 numScapes) public payable {
require(hasSaleStarted, "Sale isn't active");
require(totalSupply() < MAX_SCAPES, "Sale has already ended");
require(numScapes > 0 && numScapes <= 20, "You can buy a maximum of 20 scapes at a time");
require(<FILL_ME>)
uint totalPrice = 0; //calculates total price, keeping in mind purchases that span across prices
for (uint i = 0; i < numScapes; i++) {
totalPrice += calculatePrice(curIndex + i);
}
require(msg.value >= totalPrice, "Ether value sent is below the price");
for (uint i = 0; i < numScapes; i++) {
uint mintIndex = curIndex;
_safeMint(msg.sender, mintIndex);
adjustIndex();
}
}
//skip % 1111 == 0 since they are already reserved
function adjustIndex() private {
}
function getCurrentIndex() public view returns (uint) {
}
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserve() public onlyOwner {
}
function reserveCur() public onlyOwner {
}
}
| totalSupply().add(numScapes)<=MAX_SCAPES,"All scapes are sold!" | 307,942 | totalSupply().add(numScapes)<=MAX_SCAPES |
"Auction Date Too Far" | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
require(block.timestamp < _expiry, "Auction Date Passed");
require(<FILL_ME>)
require(_price > 0, "Auction Price Cannot Be 0");
for(uint x = 0; x < _amount; x++){
safeTransferFrom(msg.sender, address(this), _token, 1, "");
auctionList[auctionCount] = auctionData(msg.sender, address(0), _price, _expiry, _token);
emit AuctionStart(msg.sender, _token, _price, auctionCount, _expiry);
auctionCount++;
}
}
function bid(uint256 _index) public payable {
}
function buy(uint256 _index) public payable {
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
}
}
| block.timestamp+(86400*14)>_expiry,"Auction Date Too Far" | 307,963 | block.timestamp+(86400*14)>_expiry |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
}
function bid(uint256 _index) public payable {
require(<FILL_ME>)
require(auctionList[_index].bid + 10000000000000000 <= msg.value);
require(msg.sender != auctionList[_index].owner);
require(msg.sender != auctionList[_index].lastBidder);
if(auctionList[_index].lastBidder != address(0)){
auctionList[_index].lastBidder.call.value(auctionList[_index].bid)("");
}
auctionList[_index].bid = msg.value;
auctionList[_index].lastBidder = msg.sender;
emit Bid(msg.sender, auctionList[_index].token, _index, msg.value);
}
function buy(uint256 _index) public payable {
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
}
}
| auctionList[_index].expiry>block.timestamp | 307,963 | auctionList[_index].expiry>block.timestamp |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
}
function bid(uint256 _index) public payable {
require(auctionList[_index].expiry > block.timestamp);
require(<FILL_ME>)
require(msg.sender != auctionList[_index].owner);
require(msg.sender != auctionList[_index].lastBidder);
if(auctionList[_index].lastBidder != address(0)){
auctionList[_index].lastBidder.call.value(auctionList[_index].bid)("");
}
auctionList[_index].bid = msg.value;
auctionList[_index].lastBidder = msg.sender;
emit Bid(msg.sender, auctionList[_index].token, _index, msg.value);
}
function buy(uint256 _index) public payable {
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
}
}
| auctionList[_index].bid+10000000000000000<=msg.value | 307,963 | auctionList[_index].bid+10000000000000000<=msg.value |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
}
function bid(uint256 _index) public payable {
}
function buy(uint256 _index) public payable {
require(<FILL_ME>)
require(auctionList[_index].bid <= msg.value);
require(address(0) == auctionList[_index].lastBidder);
require(auctionList[_index].bid > 0);
this.safeTransferFrom(address(this), msg.sender, auctionList[_index].token, 1, "");
uint256 fee = auctionList[_index].bid * auctionFee / 1000;
treasurer.call.value(fee)("");
auctionList[_index].owner.call.value(auctionList[_index].bid.sub(fee))("");
emit AuctionEnd(auctionList[_index].token, auctionList[_index].bid, auctionList[_index].owner, msg.sender, _index);
auctionList[_index].lastBidder = msg.sender;
auctionList[_index].bid = 0;
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
}
}
| auctionList[_index].expiry<block.timestamp | 307,963 | auctionList[_index].expiry<block.timestamp |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
}
function bid(uint256 _index) public payable {
}
function buy(uint256 _index) public payable {
require(auctionList[_index].expiry < block.timestamp);
require(<FILL_ME>)
require(address(0) == auctionList[_index].lastBidder);
require(auctionList[_index].bid > 0);
this.safeTransferFrom(address(this), msg.sender, auctionList[_index].token, 1, "");
uint256 fee = auctionList[_index].bid * auctionFee / 1000;
treasurer.call.value(fee)("");
auctionList[_index].owner.call.value(auctionList[_index].bid.sub(fee))("");
emit AuctionEnd(auctionList[_index].token, auctionList[_index].bid, auctionList[_index].owner, msg.sender, _index);
auctionList[_index].lastBidder = msg.sender;
auctionList[_index].bid = 0;
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
}
}
| auctionList[_index].bid<=msg.value | 307,963 | auctionList[_index].bid<=msg.value |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
}
function bid(uint256 _index) public payable {
}
function buy(uint256 _index) public payable {
require(auctionList[_index].expiry < block.timestamp);
require(auctionList[_index].bid <= msg.value);
require(<FILL_ME>)
require(auctionList[_index].bid > 0);
this.safeTransferFrom(address(this), msg.sender, auctionList[_index].token, 1, "");
uint256 fee = auctionList[_index].bid * auctionFee / 1000;
treasurer.call.value(fee)("");
auctionList[_index].owner.call.value(auctionList[_index].bid.sub(fee))("");
emit AuctionEnd(auctionList[_index].token, auctionList[_index].bid, auctionList[_index].owner, msg.sender, _index);
auctionList[_index].lastBidder = msg.sender;
auctionList[_index].bid = 0;
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
}
}
| address(0)==auctionList[_index].lastBidder | 307,963 | address(0)==auctionList[_index].lastBidder |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
}
function bid(uint256 _index) public payable {
}
function buy(uint256 _index) public payable {
require(auctionList[_index].expiry < block.timestamp);
require(auctionList[_index].bid <= msg.value);
require(address(0) == auctionList[_index].lastBidder);
require(<FILL_ME>)
this.safeTransferFrom(address(this), msg.sender, auctionList[_index].token, 1, "");
uint256 fee = auctionList[_index].bid * auctionFee / 1000;
treasurer.call.value(fee)("");
auctionList[_index].owner.call.value(auctionList[_index].bid.sub(fee))("");
emit AuctionEnd(auctionList[_index].token, auctionList[_index].bid, auctionList[_index].owner, msg.sender, _index);
auctionList[_index].lastBidder = msg.sender;
auctionList[_index].bid = 0;
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
}
}
| auctionList[_index].bid>0 | 307,963 | auctionList[_index].bid>0 |
"Auction Concluded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.12;
contract BAE is ERC1155Tradable {
event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);
uint256 public auctionCount;
uint256 public auctionFee = 5; //Out of 1000 for 100%
struct auctionData{
address owner;
address lastBidder;
uint256 bid;
uint256 expiry;
uint256 token;
}
mapping(uint256 => auctionData) public auctionList;
constructor(address _proxyRegistryAddress)
ERC1155Tradable(
"Blockchain Art Exchange",
"BAE",
_proxyRegistryAddress
) public {
}
function changePrintFee(uint256 _newPrice) public onlyAdmin{
}
function setAuctionFee(uint256 _newFee) public onlyAdmin{
}
function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
}
function bid(uint256 _index) public payable {
}
function buy(uint256 _index) public payable {
}
function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
}
function concludeAuction(uint256 _index) public{
require(auctionList[_index].expiry < block.timestamp, "Auction Not Expired");
require(<FILL_ME>)
if(auctionList[_index].lastBidder != address(0)){
this.safeTransferFrom(address(this), auctionList[_index].lastBidder, auctionList[_index].token, 1, "");
uint256 fee = auctionList[_index].bid * auctionFee / 1000;
treasurer.call.value(fee)("");
auctionList[_index].owner.call.value(auctionList[_index].bid.sub(fee))("");
emit AuctionEnd(auctionList[_index].token, auctionList[_index].bid, auctionList[_index].owner, auctionList[_index].lastBidder, _index);
}
else{
this.safeTransferFrom(address(this), auctionList[_index].owner, auctionList[_index].token, 1, "");
emit AuctionEnd(auctionList[_index].token, 0, auctionList[_index].owner, auctionList[_index].owner, _index);
}
auctionList[_index].lastBidder = address(0);
auctionList[_index].bid = 0;
}
}
| auctionList[_index].bid!=0,"Auction Concluded" | 307,963 | auctionList[_index].bid!=0 |
"FarmerApes: Oops, sorry you're not whitelisted." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
require(<FILL_ME>)
_;
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
}
function getAirdrop() external {
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| checkWhiteList(msg.sender),"FarmerApes: Oops, sorry you're not whitelisted." | 307,972 | checkWhiteList(msg.sender) |
"FarmerApe: You had already participated in presale." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
require(
block.timestamp >= presaleTime &&
block.timestamp < presaleTime + 1 days,
"FarmerApes: Presale has yet to be started."
);
require(msg.value == presalePrice, "FarmerApes: Invalid value.");
require(<FILL_ME>)
require(
totalSupply() + 1 <= MAX_SUPPLY - GIFT_COUNT,
"FarmerApes: Sorry, we are sold out."
);
_mintMany(1);
presaleStatus[msg.sender] = true;
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
}
function getAirdrop() external {
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| !presaleStatus[msg.sender],"FarmerApe: You had already participated in presale." | 307,972 | !presaleStatus[msg.sender] |
"FarmerApes: Sorry, we are sold out." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
require(
block.timestamp >= presaleTime &&
block.timestamp < presaleTime + 1 days,
"FarmerApes: Presale has yet to be started."
);
require(msg.value == presalePrice, "FarmerApes: Invalid value.");
require(
!presaleStatus[msg.sender],
"FarmerApe: You had already participated in presale."
);
require(<FILL_ME>)
_mintMany(1);
presaleStatus[msg.sender] = true;
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
}
function getAirdrop() external {
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| totalSupply()+1<=MAX_SUPPLY-GIFT_COUNT,"FarmerApes: Sorry, we are sold out." | 307,972 | totalSupply()+1<=MAX_SUPPLY-GIFT_COUNT |
"FarmerApes: Each address is allowed to purchase up to 10 FarmerApes." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
require(
block.timestamp >= publicSaleTime &&
block.timestamp <= publicSaleTime + 7 days,
"FarmerApes: Public sale has yet to be started."
);
if (mintBeforeReserve == 0) {
mintBeforeReserve = totalSupply();
}
require(<FILL_ME>)
require(
mintBeforeReserve + uint256(_num) <=
MAX_SUPPLY - totalReserved - (GIFT_COUNT - totalAirdropNum),
"FarmerApes: Sorry, we are sold out."
);
require(
msg.value == uint256(_num) * publicSalePrice,
"FarmerApes: Invalid value."
);
reserved[msg.sender] += _num;
totalReserved += uint256(_num);
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
}
function getAirdrop() external {
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| (_num+reserved[msg.sender]+claimed[msg.sender])<=MAX_MINT_LIMIT,"FarmerApes: Each address is allowed to purchase up to 10 FarmerApes." | 307,972 | (_num+reserved[msg.sender]+claimed[msg.sender])<=MAX_MINT_LIMIT |
"FarmerApes: Sorry, we are sold out." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
require(
block.timestamp >= publicSaleTime &&
block.timestamp <= publicSaleTime + 7 days,
"FarmerApes: Public sale has yet to be started."
);
if (mintBeforeReserve == 0) {
mintBeforeReserve = totalSupply();
}
require(
(_num + reserved[msg.sender] + claimed[msg.sender]) <=
MAX_MINT_LIMIT,
"FarmerApes: Each address is allowed to purchase up to 10 FarmerApes."
);
require(<FILL_ME>)
require(
msg.value == uint256(_num) * publicSalePrice,
"FarmerApes: Invalid value."
);
reserved[msg.sender] += _num;
totalReserved += uint256(_num);
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
}
function getAirdrop() external {
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| mintBeforeReserve+uint256(_num)<=MAX_SUPPLY-totalReserved-(GIFT_COUNT-totalAirdropNum),"FarmerApes: Sorry, we are sold out." | 307,972 | mintBeforeReserve+uint256(_num)<=MAX_SUPPLY-totalReserved-(GIFT_COUNT-totalAirdropNum) |
"We've reached the maximum of airdrop limits." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
for (uint256 i = 0; i < _recipients.length; i++) {
uint256 newTokenId = _getNextTokenId();
_mintTo(_recipients[i], newTokenId, rTypes[i]);
checkRoadmap(newTokenId);
_incrementTokenId();
}
require(<FILL_ME>)
totalAirdropNum += _recipients.length;
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
}
function getAirdrop() external {
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| GIFT_COUNT-totalAirdropNum>=_recipients.length,"We've reached the maximum of airdrop limits." | 307,972 | GIFT_COUNT-totalAirdropNum>=_recipients.length |
"We've reached the maximum of airdrop limits." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
uint256 _airdropNum;
require(
block.timestamp >= publicSaleTime,
"FarmerApes: Public sale has yet to be started."
);
for (uint256 i = 0; i < _recipients.length; i++) {
_airdropNum += _amounts[i];
airdropNum[_recipients[i]] = _amounts[i];
}
require(<FILL_ME>)
totalAirdropNum += _airdropNum;
}
function getAirdrop() external {
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| GIFT_COUNT-totalAirdropNum>=_airdropNum,"We've reached the maximum of airdrop limits." | 307,972 | GIFT_COUNT-totalAirdropNum>=_airdropNum |
"FarmerApes: You have missed the time window. Your Farmer Ape has escaped." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
import "./ContentMixin.sol";
import "./NativeMetaTransaction.sol";
interface IERC721Contract {
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
}
interface YieldToken {
function updateRewardOnMint(address _user) external;
function updateReward(address _from, address _to) external;
function claimReward(address _to) external;
}
/**
* @title FarmerApes
*/
contract FarmerApes is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using SafeMath for uint256;
string public baseTokenURI;
uint256 private _currentTokenId;
uint256 public constant MAX_SUPPLY = 8888;
uint8 public constant MAX_MINT_LIMIT = 10;
uint256 private constant GIFT_COUNT = 88;
uint256 public mintBeforeReserve;
uint256 public totalAirdropNum;
address public hawaiiApe;
uint256 public totalReserved;
uint256 public presalePrice = .0588 ether;
uint256 public publicSalePrice = .06 ether;
uint256 public presaleTime = 1639584000;
uint256 public publicSaleTime = 1639670415;
bool public ApprovedAsHolder = true;
bool public inPublic;
mapping(address => bool) public whitelisters;
mapping(address => bool) public presaleStatus;
mapping(address => uint8) public reserved;
mapping(address => uint8) public claimed;
mapping(address => uint8) public airdropNum;
mapping(uint256 => RarityType) private apeType;
mapping(address => uint256) private yield;
enum RarityType {
Null,
Common,
Rare,
SuperRare,
Epic,
Lengendary
}
YieldToken public yieldToken;
IERC721Contract public BAYC;
IERC721Contract public MAYC;
event ValueChanged(string indexed fieldName, uint256 newValue);
event LuckyApe(uint256 indexed tokenId, address indexed luckyAddress);
event LegendaryDrop(uint256 indexed tokenId, address indexed luckyAddress);
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
constructor(
string memory _name,
string memory _symbol,
string memory _uri,
address _BAYC,
address _MAYC
) ERC721(_name, _symbol) {
}
/**
* @dev Check user is on the whitelist or not.
* @param user msg.sender
*/
function checkWhiteList(address user) public view returns (bool) {
}
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
function setPublicPrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Mint to msg.sender. Only whitelisted users can participate
*/
function presale() external payable onlyWhitelisted {
}
/**
* @dev Reserve for the purchase. Each address is allowed to purchase up to 10 FarmerApes.
* @param _num Quantity to purchase
*/
function reserve(uint8 _num) external payable {
}
/**
* @dev FarmerApes can only be claimed after your reservation.
*/
function claim() external {
}
/**
* @dev set the presale and public sale time only by Admin
*/
function updateTime(uint256 _preSaleTime, uint256 _publicSaleTime)
external
onlyOwner
{
}
function setAPCToken(address _APC) external onlyOwner {
}
function setInPublic(bool _inPublic) external onlyOwner {
}
function setIfApprovedAsHolder(bool _ApprovedAsHolder) external onlyOwner {
}
/**
* @dev Mint and airdrop apes to several addresses directly.
* @param _recipients addressses of the future holder of Farmer Apes.
* @param rTypes rarity types of the future holder of Farmer Apes.
*/
function mintTo(address[] memory _recipients, uint8[] memory rTypes)
external
onlyOwner
{
}
function _mintTo(
address to,
uint256 tokenId,
uint8 rType
) internal {
}
function randomRarity() internal view returns (RarityType rtype) {
}
/**
* @dev Airdrop apes to several addresses.
* @param _recipients Holders are able to mint Farmer Apes for free.
*/
function airdrop(address[] memory _recipients, uint8[] memory _amounts)
external
onlyOwner
{
}
function getAirdrop() external {
require(<FILL_ME>)
_mintMany(airdropNum[msg.sender]);
airdropNum[msg.sender] = 0;
}
function checkRoadmap(uint256 newTokenId) internal {
}
/**
* @dev Mint Farmer Apes.
*/
function _mintMany(uint8 _num) private {
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev Once we sell out, a lucky Hawaii ape holder with at least 2 Farmer Apes will be selected to jump to a paid trip.
*/
function _randomTripApeAddress(uint256 seed) internal returns (address) {
}
/**
* @dev Get the lucky ape for a paid trip to Hawaii
* @return address
*/
function randomTripApeAddress() external onlyOwner returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
/**
* @dev change the baseTokenURI only by Admin
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function _msgSender() internal view override returns (address sender) {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
/**
* @dev Set whitelist
* @param whitelistAddresses Whitelist addresses
*/
function addWhitelisters(address[] calldata whitelistAddresses)
external
onlyOwner
{
}
/**
* @dev To know each Token's type and daily Yield.
* @param tokenId token id
*/
function getApeTypeAndYield(uint256 tokenId)
external
view
returns (RarityType rType, uint256 apeYield)
{
}
/**
* @dev To know each Token's daily Yield.
* @param tokenId token id
*/
function getApeYield(uint256 tokenId)
internal
view
returns (uint256 apeYield)
{
}
/**
* @dev To know each address's total daily Yield.
* @param user address
*/
function getUserYield(address user) external view returns (uint256) {
}
/**
* @dev To claim your total reward.
*/
function claimReward() external {
}
function _mint(address to, uint256 tokenId) internal virtual override {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
}
| airdropNum[msg.sender]>0&&block.timestamp<=publicSaleTime+7days,"FarmerApes: You have missed the time window. Your Farmer Ape has escaped." | 307,972 | airdropNum[msg.sender]>0&&block.timestamp<=publicSaleTime+7days |
"Already minted" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface CryptoPolzInterface {
function ownerOf(uint256 tokenId) external view returns (address);
function walletOfOwner(address _owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
}
contract Polzilla is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0 ether;
uint256 public maxSupply = 9696;
bool public paused = true;
bool public privateSale = true;
CryptoPolzInterface polz;
uint256[] private _claimedTokens;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
address _polzContractAddress
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _tokenId) public payable {
require(paused == false, "Paused");
require(<FILL_ME>)
require((_tokenId > 0) && (_tokenId <= maxSupply), "Invalid token ID");
if (privateSale == true) {
require(polz.ownerOf(_tokenId) == msg.sender, "Wrong owner");
} else {
if (msg.sender != owner()) {
require(msg.value >= cost, "Not enough funds");
}
}
_safeMint(msg.sender, _tokenId);
_claimedTokens.push(_tokenId);
}
function claimWallet() public payable {
}
function claimedTokens() public view returns (uint256[] memory) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setPolzContract(address _polzContractAddress) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function flipPause() public onlyOwner {
}
function flipPrivateSale() public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| _exists(_tokenId)==false,"Already minted" | 307,999 | _exists(_tokenId)==false |
"Invalid token ID" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface CryptoPolzInterface {
function ownerOf(uint256 tokenId) external view returns (address);
function walletOfOwner(address _owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
}
contract Polzilla is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0 ether;
uint256 public maxSupply = 9696;
bool public paused = true;
bool public privateSale = true;
CryptoPolzInterface polz;
uint256[] private _claimedTokens;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
address _polzContractAddress
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _tokenId) public payable {
require(paused == false, "Paused");
require(_exists(_tokenId) == false, "Already minted");
require(<FILL_ME>)
if (privateSale == true) {
require(polz.ownerOf(_tokenId) == msg.sender, "Wrong owner");
} else {
if (msg.sender != owner()) {
require(msg.value >= cost, "Not enough funds");
}
}
_safeMint(msg.sender, _tokenId);
_claimedTokens.push(_tokenId);
}
function claimWallet() public payable {
}
function claimedTokens() public view returns (uint256[] memory) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setPolzContract(address _polzContractAddress) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function flipPause() public onlyOwner {
}
function flipPrivateSale() public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| (_tokenId>0)&&(_tokenId<=maxSupply),"Invalid token ID" | 307,999 | (_tokenId>0)&&(_tokenId<=maxSupply) |
"Wrong owner" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface CryptoPolzInterface {
function ownerOf(uint256 tokenId) external view returns (address);
function walletOfOwner(address _owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
}
contract Polzilla is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0 ether;
uint256 public maxSupply = 9696;
bool public paused = true;
bool public privateSale = true;
CryptoPolzInterface polz;
uint256[] private _claimedTokens;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
address _polzContractAddress
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _tokenId) public payable {
require(paused == false, "Paused");
require(_exists(_tokenId) == false, "Already minted");
require((_tokenId > 0) && (_tokenId <= maxSupply), "Invalid token ID");
if (privateSale == true) {
require(<FILL_ME>)
} else {
if (msg.sender != owner()) {
require(msg.value >= cost, "Not enough funds");
}
}
_safeMint(msg.sender, _tokenId);
_claimedTokens.push(_tokenId);
}
function claimWallet() public payable {
}
function claimedTokens() public view returns (uint256[] memory) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setPolzContract(address _polzContractAddress) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function flipPause() public onlyOwner {
}
function flipPrivateSale() public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| polz.ownerOf(_tokenId)==msg.sender,"Wrong owner" | 307,999 | polz.ownerOf(_tokenId)==msg.sender |
null | pragma solidity ^0.5.0;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @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;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
* all accounts just by listening to said events. Note that this isn't required by the specification, and other
* compliant implementations may not do it.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @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 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 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 Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @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 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
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 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
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
contract BlackList is Ownable, ERC20 {
mapping (address => bool) public blackListed;
function getOwner() external view returns (address) {
}
function getBlackListStatus(address _maker) external view returns (bool) {
}
function destroyBlackFunds (address _blackListedUser) public onlyOwner {
require(<FILL_ME>)
uint dirtyFunds = balanceOf(_blackListedUser);
_burn(_blackListedUser, dirtyFunds);
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event AddedBlackList(address _user);
event RemovedBlackList(address _user);
}
/**
* @title BLT
* @author BLT
*
* @dev Standard ERC20 token with burn, mint & blacklist.
*/
contract BLT is BlackList {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Constructor.
* @param name name of the token
* @param symbol symbol of the token, 3-4 chars is recommended
* @param decimals number of decimal places of one token unit, 18 is widely used
* @param totalSupply total supply of tokens in lowest units (depending on decimals)
* @param tokenOwnerAddress address that gets 100% of token supply
*/
constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of lowest token units to be burned.
*/
function burn(uint256 value) public {
}
function transfer(address _to, uint256 _value) public returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev See {ERC20-_mint}.
*
* Requirements:
*
* - the caller must have the {MinterRole}.
*/
function mint(address account, uint256 amount) public onlyOwner returns (bool) {
}
}
| blackListed[_blackListedUser] | 308,031 | blackListed[_blackListedUser] |
null | pragma solidity ^0.5.0;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @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;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
* all accounts just by listening to said events. Note that this isn't required by the specification, and other
* compliant implementations may not do it.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @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 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 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 Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @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 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
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 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
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
contract BlackList is Ownable, ERC20 {
mapping (address => bool) public blackListed;
function getOwner() external view returns (address) {
}
function getBlackListStatus(address _maker) external view returns (bool) {
}
function destroyBlackFunds (address _blackListedUser) public onlyOwner {
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event AddedBlackList(address _user);
event RemovedBlackList(address _user);
}
/**
* @title BLT
* @author BLT
*
* @dev Standard ERC20 token with burn, mint & blacklist.
*/
contract BLT is BlackList {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Constructor.
* @param name name of the token
* @param symbol symbol of the token, 3-4 chars is recommended
* @param decimals number of decimal places of one token unit, 18 is widely used
* @param totalSupply total supply of tokens in lowest units (depending on decimals)
* @param tokenOwnerAddress address that gets 100% of token supply
*/
constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of lowest token units to be burned.
*/
function burn(uint256 value) public {
}
function transfer(address _to, uint256 _value) public returns (bool)
{
require(<FILL_ME>)
return super.transfer(_to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev See {ERC20-_mint}.
*
* Requirements:
*
* - the caller must have the {MinterRole}.
*/
function mint(address account, uint256 amount) public onlyOwner returns (bool) {
}
}
| !blackListed[msg.sender] | 308,031 | !blackListed[msg.sender] |
null | pragma solidity ^0.5.0;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @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;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
* all accounts just by listening to said events. Note that this isn't required by the specification, and other
* compliant implementations may not do it.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @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 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 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 Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @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 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
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 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
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
contract BlackList is Ownable, ERC20 {
mapping (address => bool) public blackListed;
function getOwner() external view returns (address) {
}
function getBlackListStatus(address _maker) external view returns (bool) {
}
function destroyBlackFunds (address _blackListedUser) public onlyOwner {
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event AddedBlackList(address _user);
event RemovedBlackList(address _user);
}
/**
* @title BLT
* @author BLT
*
* @dev Standard ERC20 token with burn, mint & blacklist.
*/
contract BLT is BlackList {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Constructor.
* @param name name of the token
* @param symbol symbol of the token, 3-4 chars is recommended
* @param decimals number of decimal places of one token unit, 18 is widely used
* @param totalSupply total supply of tokens in lowest units (depending on decimals)
* @param tokenOwnerAddress address that gets 100% of token supply
*/
constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of lowest token units to be burned.
*/
function burn(uint256 value) public {
}
function transfer(address _to, uint256 _value) public returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(<FILL_ME>)
return super.transferFrom(_from, _to, _value);
}
/**
* @dev See {ERC20-_mint}.
*
* Requirements:
*
* - the caller must have the {MinterRole}.
*/
function mint(address account, uint256 amount) public onlyOwner returns (bool) {
}
}
| !blackListed[_from] | 308,031 | !blackListed[_from] |
"Written contract ipfs hash has been proposed yet!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
require(<FILL_ME>)
require(hasSigned[msg.sender] == false, "Spouse has already signed the contract!");
// Sender signed
hasSigned[msg.sender] = true;
emit Signed(now, msg.sender);
// Check if both spouses have signed
if (hasSigned[husbandAddress] && hasSigned[wifeAddress]) {
signed = true;
emit ContractSigned(now);
}
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| isSameString(writtenContractIpfsHash,""),"Written contract ipfs hash has been proposed yet!" | 308,111 | isSameString(writtenContractIpfsHash,"") |
"Spouse has already signed the contract!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
require(isSameString(writtenContractIpfsHash, ""), "Written contract ipfs hash has been proposed yet!");
require(<FILL_ME>)
// Sender signed
hasSigned[msg.sender] = true;
emit Signed(now, msg.sender);
// Check if both spouses have signed
if (hasSigned[husbandAddress] && hasSigned[wifeAddress]) {
signed = true;
emit ContractSigned(now);
}
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| hasSigned[msg.sender]==false,"Spouse has already signed the contract!" | 308,111 | hasSigned[msg.sender]==false |
"No asset data provided!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
require(<FILL_ME>)
require(_husbandAllocation >= 0, "Husband allocation invalid!");
require(_wifeAllocation >= 0, "Wife allocation invalid!");
require((_husbandAllocation + _wifeAllocation) == 100, "Total allocation must be equal to 100%!");
// Add new asset
Asset memory newAsset = Asset({
data: _data,
husbandAllocation: _husbandAllocation,
wifeAllocation: _wifeAllocation,
added: false,
removed: false
});
uint newAssetId = assets.push(newAsset);
emit AssetProposed(now, _data, msg.sender);
// Map to a storage object (otherwise mappings could not be accessed)
Asset storage asset = assets[newAssetId - 1];
// Instantly approve it by the sender
asset.hasApprovedAdd[msg.sender] = true;
emit AssetAddApproved(now, _data, msg.sender);
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| isSameString(_data,""),"No asset data provided!" | 308,111 | isSameString(_data,"") |
"Total allocation must be equal to 100%!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
require(isSameString(_data, ""), "No asset data provided!");
require(_husbandAllocation >= 0, "Husband allocation invalid!");
require(_wifeAllocation >= 0, "Wife allocation invalid!");
require(<FILL_ME>)
// Add new asset
Asset memory newAsset = Asset({
data: _data,
husbandAllocation: _husbandAllocation,
wifeAllocation: _wifeAllocation,
added: false,
removed: false
});
uint newAssetId = assets.push(newAsset);
emit AssetProposed(now, _data, msg.sender);
// Map to a storage object (otherwise mappings could not be accessed)
Asset storage asset = assets[newAssetId - 1];
// Instantly approve it by the sender
asset.hasApprovedAdd[msg.sender] = true;
emit AssetAddApproved(now, _data, msg.sender);
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| (_husbandAllocation+_wifeAllocation)==100,"Total allocation must be equal to 100%!" | 308,111 | (_husbandAllocation+_wifeAllocation)==100 |
"Asset has already approved by sender!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
require(_assetId > 0 && _assetId <= assets.length, "Invalid asset id!");
Asset storage asset = assets[_assetId - 1];
require(asset.added == false, "Asset has already been added!");
require(asset.removed == false, "Asset has already been removed!");
require(<FILL_ME>)
// Sender approved
asset.hasApprovedAdd[msg.sender] = true;
emit AssetAddApproved(now, asset.data, msg.sender);
// Check if both spouses have approved
if (asset.hasApprovedAdd[husbandAddress] && asset.hasApprovedAdd[wifeAddress]) {
asset.added = true;
emit AssetAdded(now, asset.data);
}
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| asset.hasApprovedAdd[msg.sender]==false,"Asset has already approved by sender!" | 308,111 | asset.hasApprovedAdd[msg.sender]==false |
"Asset has not been added yet!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
require(_assetId > 0 && _assetId <= assets.length, "Invalid asset id!");
Asset storage asset = assets[_assetId - 1];
require(<FILL_ME>)
require(asset.removed == false, "Asset has already been removed!");
require(asset.hasApprovedRemove[msg.sender] == false, "Removing the asset has already been approved by the sender!");
// Approve removal by the sender
asset.hasApprovedRemove[msg.sender] = true;
emit AssetRemoveApproved(now, asset.data, msg.sender);
// Check if both spouses have approved the removal of the asset
if (asset.hasApprovedRemove[husbandAddress] && asset.hasApprovedRemove[wifeAddress]) {
asset.removed = true;
emit AssetRemoved(now, asset.data);
}
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| asset.added,"Asset has not been added yet!" | 308,111 | asset.added |
"Removing the asset has already been approved by the sender!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
require(_assetId > 0 && _assetId <= assets.length, "Invalid asset id!");
Asset storage asset = assets[_assetId - 1];
require(asset.added, "Asset has not been added yet!");
require(asset.removed == false, "Asset has already been removed!");
require(<FILL_ME>)
// Approve removal by the sender
asset.hasApprovedRemove[msg.sender] = true;
emit AssetRemoveApproved(now, asset.data, msg.sender);
// Check if both spouses have approved the removal of the asset
if (asset.hasApprovedRemove[husbandAddress] && asset.hasApprovedRemove[wifeAddress]) {
asset.removed = true;
emit AssetRemoved(now, asset.data);
}
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| asset.hasApprovedRemove[msg.sender]==false,"Removing the asset has already been approved by the sender!" | 308,111 | asset.hasApprovedRemove[msg.sender]==false |
"Sender has already approved to divorce!" | pragma solidity ^0.4.24;
/**
* @title SmartWeddingContract
* @dev The contract has both addresses of the husband and the wife. It is capable of handling assets, funds and
* divorce. A multisig variant is used to consider the decision of both parties.
*/
contract SmartWeddingContract {
event WrittenContractProposed(uint timestamp, string ipfsHash, address wallet);
event Signed(uint timestamp, address wallet);
event ContractSigned(uint timestamp);
event AssetProposed(uint timestamp, string asset, address wallet);
event AssetAddApproved(uint timestamp, string asset, address wallet);
event AssetAdded(uint timestamp, string asset);
event AssetRemoveApproved(uint timestamp, string asset, address wallet);
event AssetRemoved(uint timestamp, string asset);
event DivorceApproved(uint timestamp, address wallet);
event Divorced(uint timestamp);
event FundsSent(uint timestamp, address wallet, uint amount);
event FundsReceived(uint timestamp, address wallet, uint amount);
bool public signed = false;
bool public divorced = false;
mapping (address => bool) private hasSigned;
mapping (address => bool) private hasDivorced;
address public husbandAddress;
address public wifeAddress;
string public writtenContractIpfsHash;
struct Asset {
string data;
uint husbandAllocation;
uint wifeAllocation;
bool added;
bool removed;
mapping (address => bool) hasApprovedAdd;
mapping (address => bool) hasApprovedRemove;
}
Asset[] public assets;
/**
* @dev Modifier that only allows spouse execution.
*/
modifier onlySpouse() {
}
/**
* @dev Modifier that checks if the contract has been signed by both spouses.
*/
modifier isSigned() {
}
/**
* @dev Modifier that only allows execution if the spouses have not been divorced.
*/
modifier isNotDivorced() {
}
/**
* @dev Private helper function to check if a string is the same as another.
*/
function isSameString(string memory string1, string memory string2) private pure returns (bool) {
}
/**
* @dev Constructor: Set the wallet addresses of both spouses.
* @param _husbandAddress Wallet address of the husband.
* @param _wifeAddress Wallet address of the wife.
*/
constructor(address _husbandAddress, address _wifeAddress) public {
}
/**
* @dev Default function to enable the contract to receive funds.
*/
function() external payable isSigned isNotDivorced {
}
/**
* @dev Propose a written contract (update).
* @param _writtenContractIpfsHash IPFS hash of the written contract PDF.
*/
function proposeWrittenContract(string _writtenContractIpfsHash) external onlySpouse {
}
/**
* @dev Sign the contract.
*/
function signContract() external onlySpouse {
}
/**
* @dev Send ETH to a target address.
* @param _to Destination wallet address.
* @param _amount Amount of ETH to send.
*/
function pay(address _to, uint _amount) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Propose an asset to add. The other spouse needs to approve this action.
* @param _data The asset represented as a string.
* @param _husbandAllocation Allocation of the husband.
* @param _wifeAllocation Allocation of the wife.
*/
function proposeAsset(string _data, uint _husbandAllocation, uint _wifeAllocation) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the addition of a prior proposed asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be approved.
*/
function approveAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Approve the removal of a prior proposed/already added asset. The other spouse needs to approve this action.
* @param _assetId The id of the asset that should be removed.
*/
function removeAsset(uint _assetId) external onlySpouse isSigned isNotDivorced {
}
/**
* @dev Request to divorce. The other spouse needs to approve this action.
*/
function divorce() external onlySpouse isSigned isNotDivorced {
require(<FILL_ME>)
// Sender approved
hasDivorced[msg.sender] = true;
emit DivorceApproved(now, msg.sender);
// Check if both spouses have approved to divorce
if (hasDivorced[husbandAddress] && hasDivorced[wifeAddress]) {
divorced = true;
emit Divorced(now);
// Get the contracts balance
uint balance = address(this).balance;
// Split the remaining balance half-half
if (balance != 0) {
uint balancePerSpouse = balance / 2;
// Send transfer to the husband
husbandAddress.transfer(balancePerSpouse);
emit FundsSent(now, husbandAddress, balancePerSpouse);
// Send transfer to the wife
wifeAddress.transfer(balancePerSpouse);
emit FundsSent(now, wifeAddress, balancePerSpouse);
}
}
}
/**
* @dev Return a list of all asset ids.
*/
function getAssetIds() external view returns (uint[]) {
}
}
| hasDivorced[msg.sender]==false,"Sender has already approved to divorce!" | 308,111 | hasDivorced[msg.sender]==false |
"No more tokens available in this series" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./IFactoryERC721.sol";
import "./Token.sol";
/**
* @title The Mike Tyson NFT Collection by Cory Van Lew
* An NFT powered by Ether Cards - https://ether.cards
*/
contract TokenFactory is FactoryERC721, Ownable {
using Strings for string;
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
uint256 public HG2G = 42;
address public proxyRegistryAddress;
address public nftAddress;
string public baseURI = "https://client-metadata.ether.cards/api/tyson/collection/";
constructor(address _proxyRegistryAddress, address _nftAddress) {
}
function name() override external pure returns (string memory) {
}
function symbol() override external pure returns (string memory) {
}
function supportsFactoryInterface() override public pure returns (bool) {
}
function numOptions() override public view returns (uint256) {
}
function transferOwnership(address newOwner) override public onlyOwner {
}
function fireTransferEvents(address _from, address _to) private {
}
function mint(uint256 _optionId, address _toAddress) override public {
// Must be sent from the owner proxy or owner.
ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress);
assert(
address(proxyRegistry.proxies(owner())) == _msgSender() ||
owner() == _msgSender()
);
Token token = Token(nftAddress);
require(_optionId < numOptions(), "Series does not exist");
require(<FILL_ME>)
token.mintTo(_toAddress,_optionId);
}
function canMint(uint256 _optionId) override public view returns (bool) {
}
function tokenURI(uint256 _optionId) override external view returns (string memory) {
}
/**
* Hack to get things to work automatically on OpenSea.
* Use transferFrom so the frontend doesn't have to worry about different method names.
*/
function transferFrom(
address _from,
address _to,
uint256 _tokenId
) public {
}
function setBaseURI(string memory _base) external onlyOwner {
}
/**
* Hack to get things to work automatically on OpenSea.
* Use isApprovedForAll so the frontend doesn't have to worry about different method names.
*/
function isApprovedForAll(address _owner, address _operator)
public
view
returns (bool)
{
}
/**
* Hack to get things to work automatically on OpenSea.
* Use isApprovedForAll so the frontend doesn't have to worry about different method names.
*/
function ownerOf(uint256 _tokenId) public view returns (address _owner) {
}
}
| token.available(_optionId)>0,"No more tokens available in this series" | 308,144 | token.available(_optionId)>0 |
"Not Enough 0xCubes to Forge 0x0ctahedron" | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
}
contract Oxic0sahedron is ERC721Burnable, Ownable {
string public OxIC0SAHEDRON_PROVENANCE = "";
uint256 private Ox0_REQUIRED = 1000 *10**18;
uint256 private OxCUBE_REQUIRED = 10;
address public Ox0Address = 0x416C1005A1954f136c753260847d5768395db09D;
address public OxCubesAddress = 0x5f7B42e237600530E8d286F9C4ef48F5Ea5EF518;
address private burnAddress = 0x000000000000000000000000000000000000dEaD;
IERC20 private Ox0Token = IERC20(Ox0Address);
IERC721Enumerable private OxCubes = IERC721Enumerable(OxCubesAddress);
bool public IS_FORGING_ACTIVE;
constructor()ERC721("0xic0sahedron", "0xIC0SAHEDRON") {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) external onlyOwner {
}
function set0x0TokenAddress(address ox0TokenAddress) external onlyOwner {
}
function set0xCubesAddress(address oxCubesAddress) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function flipForgeState() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function forge0xic0sahedron(uint256 numberOfTokens) external {
require(IS_FORGING_ACTIVE, "Forging is Not Active");
require(<FILL_ME>)
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
require(Ox0Token.balanceOf(msg.sender) >= Ox0_REQUIRED, "Not Enough 0x0 Tokens balance to Forge 0x0ctahedron");
Ox0Token.transferFrom(msg.sender, burnAddress, Ox0_REQUIRED);
Ox0_REQUIRED = ((Ox0_REQUIRED*150)/100);
_safeMint(msg.sender, mintIndex);
}
}
}
| OxCubes.balanceOf(msg.sender)>=OxCUBE_REQUIRED,"Not Enough 0xCubes to Forge 0x0ctahedron" | 308,324 | OxCubes.balanceOf(msg.sender)>=OxCUBE_REQUIRED |
"Not Enough 0x0 Tokens balance to Forge 0x0ctahedron" | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
}
contract Oxic0sahedron is ERC721Burnable, Ownable {
string public OxIC0SAHEDRON_PROVENANCE = "";
uint256 private Ox0_REQUIRED = 1000 *10**18;
uint256 private OxCUBE_REQUIRED = 10;
address public Ox0Address = 0x416C1005A1954f136c753260847d5768395db09D;
address public OxCubesAddress = 0x5f7B42e237600530E8d286F9C4ef48F5Ea5EF518;
address private burnAddress = 0x000000000000000000000000000000000000dEaD;
IERC20 private Ox0Token = IERC20(Ox0Address);
IERC721Enumerable private OxCubes = IERC721Enumerable(OxCubesAddress);
bool public IS_FORGING_ACTIVE;
constructor()ERC721("0xic0sahedron", "0xIC0SAHEDRON") {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) external onlyOwner {
}
function set0x0TokenAddress(address ox0TokenAddress) external onlyOwner {
}
function set0xCubesAddress(address oxCubesAddress) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function flipForgeState() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function forge0xic0sahedron(uint256 numberOfTokens) external {
require(IS_FORGING_ACTIVE, "Forging is Not Active");
require(OxCubes.balanceOf(msg.sender) >= OxCUBE_REQUIRED, "Not Enough 0xCubes to Forge 0x0ctahedron");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
require(<FILL_ME>)
Ox0Token.transferFrom(msg.sender, burnAddress, Ox0_REQUIRED);
Ox0_REQUIRED = ((Ox0_REQUIRED*150)/100);
_safeMint(msg.sender, mintIndex);
}
}
}
| Ox0Token.balanceOf(msg.sender)>=Ox0_REQUIRED,"Not Enough 0x0 Tokens balance to Forge 0x0ctahedron" | 308,324 | Ox0Token.balanceOf(msg.sender)>=Ox0_REQUIRED |
"invalid" | pragma solidity 0.6.12;
// SPDX-License-Identifier: MIT
//
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor() internal {}
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
//
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
//
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the token decimals.
*/
function decimals() external view returns (uint8);
/**
* @dev Returns the token symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the token name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the bep token owner.
*/
function getOwner() external view returns (address);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address _owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
//
/**
* @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 min(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
function sqrt(uint256 y) internal pure returns (uint256 z) {
}
}
contract ReEntrancyGuard {
bool internal locked;
modifier noReentrant() {
}
}
contract ClaimClaim is Ownable, ReEntrancyGuard{
using SafeMath for uint256;
IBEP20 public poolToken; // token in airdrop
constructor(IBEP20 _addr) public {
}
mapping(address => uint256) public amountss;
function allowUser(address[] memory _addr, uint256[] memory _vals) onlyOwner public {
}
function withdraw() public noReentrant {
require(<FILL_ME>)
uint256 amountToSend = amountss[msg.sender];
amountss[msg.sender] = 0;
poolToken.transfer(msg.sender, amountToSend);
}
}
| amountss[msg.sender]>0,"invalid" | 308,326 | amountss[msg.sender]>0 |
"GovernorAlpha::propose: proposer votes below proposal threshold" | // SPDX-License-Identifier: (c) Armor.Fi DAO, 2021
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract ArmorGovernorTwo {
address public admin;
address public pendingAdmin;
/// @notice The name of this contract
string public constant name = "VArmor Governor Alpha";
uint256 public quorumAmount;
uint256 public thresholdAmount;
uint256 public votingPeriod;
function setQuorumAmount(uint256 newAmount) external {
}
function setThresholdAmount(uint256 newAmount) external {
}
function setVotingPeriod(uint256 newPeriod) external {
}
/// @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(uint256 blockNumber) public view returns (uint) { } // 4% of VArmor
/// @notice The number of votes required in order for a voter to become a proposer
function proposalThreshold(uint256 blockNumber) public view returns (uint) { } // 1% of VArmor
/// @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
function votingDelay() public pure returns (uint) { } // 1 block
/// @notice The address of the VArmorswap Protocol Timelock
ITimelock public timelock;
/// @notice The address of the VArmorswap governance token
IVArmor public varmor;
/// @notice The total number of proposals
uint public proposalCount;
struct Proposal {
/// @notice VArmorque 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 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 admin_, address timelock_, address varmor_, uint256 quorum_, uint256 threshold_, uint256 votingPeriod_) public {
}
function setPendingAdmin(address pendingAdmin_) public {
}
function acceptAdmin() public {
}
function acceptTimelockGov() public {
}
function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, 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
});
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 reject(uint proposalId) public {
}
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 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) {
}
}
| varmor.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold(sub256(block.number,1))||msg.sender==admin,"GovernorAlpha::propose: proposer votes below proposal threshold" | 308,340 | varmor.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold(sub256(block.number,1))||msg.sender==admin |
"GovernorAlpha::queue: proposal can only be queued if it is succeeded" | // SPDX-License-Identifier: (c) Armor.Fi DAO, 2021
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract ArmorGovernorTwo {
address public admin;
address public pendingAdmin;
/// @notice The name of this contract
string public constant name = "VArmor Governor Alpha";
uint256 public quorumAmount;
uint256 public thresholdAmount;
uint256 public votingPeriod;
function setQuorumAmount(uint256 newAmount) external {
}
function setThresholdAmount(uint256 newAmount) external {
}
function setVotingPeriod(uint256 newPeriod) external {
}
/// @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(uint256 blockNumber) public view returns (uint) { } // 4% of VArmor
/// @notice The number of votes required in order for a voter to become a proposer
function proposalThreshold(uint256 blockNumber) public view returns (uint) { } // 1% of VArmor
/// @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
function votingDelay() public pure returns (uint) { } // 1 block
/// @notice The address of the VArmorswap Protocol Timelock
ITimelock public timelock;
/// @notice The address of the VArmorswap governance token
IVArmor public varmor;
/// @notice The total number of proposals
uint public proposalCount;
struct Proposal {
/// @notice VArmorque 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 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 admin_, address timelock_, address varmor_, uint256 quorum_, uint256 threshold_, uint256 votingPeriod_) public {
}
function setPendingAdmin(address pendingAdmin_) public {
}
function acceptAdmin() public {
}
function acceptTimelockGov() public {
}
function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) {
}
function queue(uint proposalId) public {
// executing the executed, canceled, expired proposal will be guarded in timelock so no check for state when admin
Proposal storage proposal = proposals[proposalId];
require(<FILL_ME>)
uint eta = add256(block.timestamp, timelock.delay());
for (uint i = 0; i < proposal.targets.length; i++) {
_queueOrRevert(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta);
}
proposal.eta = eta;
emit ProposalQueued(proposalId, eta);
}
function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal {
}
function execute(uint proposalId) public payable {
}
function reject(uint proposalId) public {
}
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 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) {
}
}
| state(proposalId)==ProposalState.Succeeded||msg.sender==admin,"GovernorAlpha::queue: proposal can only be queued if it is succeeded" | 308,340 | state(proposalId)==ProposalState.Succeeded||msg.sender==admin |
"GovernorAlpha::execute: proposal can only be executed if it is queued" | // SPDX-License-Identifier: (c) Armor.Fi DAO, 2021
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract ArmorGovernorTwo {
address public admin;
address public pendingAdmin;
/// @notice The name of this contract
string public constant name = "VArmor Governor Alpha";
uint256 public quorumAmount;
uint256 public thresholdAmount;
uint256 public votingPeriod;
function setQuorumAmount(uint256 newAmount) external {
}
function setThresholdAmount(uint256 newAmount) external {
}
function setVotingPeriod(uint256 newPeriod) external {
}
/// @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(uint256 blockNumber) public view returns (uint) { } // 4% of VArmor
/// @notice The number of votes required in order for a voter to become a proposer
function proposalThreshold(uint256 blockNumber) public view returns (uint) { } // 1% of VArmor
/// @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
function votingDelay() public pure returns (uint) { } // 1 block
/// @notice The address of the VArmorswap Protocol Timelock
ITimelock public timelock;
/// @notice The address of the VArmorswap governance token
IVArmor public varmor;
/// @notice The total number of proposals
uint public proposalCount;
struct Proposal {
/// @notice VArmorque 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 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 admin_, address timelock_, address varmor_, uint256 quorum_, uint256 threshold_, uint256 votingPeriod_) public {
}
function setPendingAdmin(address pendingAdmin_) public {
}
function acceptAdmin() public {
}
function acceptTimelockGov() public {
}
function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) {
}
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 {
//admin can bypass this
// executing the executed, canceled, expired proposal will be guarded in timelock so no check for state when admin
require(<FILL_ME>)
Proposal storage proposal = proposals[proposalId];
proposal.executed = true;
for (uint i = 0; i < proposal.targets.length; i++) {
timelock.executeTransaction{value:proposal.values[i]}(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);
}
emit ProposalExecuted(proposalId);
}
function reject(uint proposalId) public {
}
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 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) {
}
}
| state(proposalId)==ProposalState.Queued||msg.sender==admin,"GovernorAlpha::execute: proposal can only be executed if it is queued" | 308,340 | state(proposalId)==ProposalState.Queued||msg.sender==admin |
"GovernorAlpha::cancel: proposer above threshold" | // SPDX-License-Identifier: (c) Armor.Fi DAO, 2021
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract ArmorGovernorTwo {
address public admin;
address public pendingAdmin;
/// @notice The name of this contract
string public constant name = "VArmor Governor Alpha";
uint256 public quorumAmount;
uint256 public thresholdAmount;
uint256 public votingPeriod;
function setQuorumAmount(uint256 newAmount) external {
}
function setThresholdAmount(uint256 newAmount) external {
}
function setVotingPeriod(uint256 newPeriod) external {
}
/// @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(uint256 blockNumber) public view returns (uint) { } // 4% of VArmor
/// @notice The number of votes required in order for a voter to become a proposer
function proposalThreshold(uint256 blockNumber) public view returns (uint) { } // 1% of VArmor
/// @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
function votingDelay() public pure returns (uint) { } // 1 block
/// @notice The address of the VArmorswap Protocol Timelock
ITimelock public timelock;
/// @notice The address of the VArmorswap governance token
IVArmor public varmor;
/// @notice The total number of proposals
uint public proposalCount;
struct Proposal {
/// @notice VArmorque 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 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 admin_, address timelock_, address varmor_, uint256 quorum_, uint256 threshold_, uint256 votingPeriod_) public {
}
function setPendingAdmin(address pendingAdmin_) public {
}
function acceptAdmin() public {
}
function acceptTimelockGov() public {
}
function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) {
}
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 reject(uint proposalId) public {
}
function cancel(uint proposalId) public {
ProposalState state = state(proposalId);
require(state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal");
Proposal storage proposal = proposals[proposalId];
//admin can bypass this
require(<FILL_ME>)
proposal.canceled = true;
for (uint i = 0; i < proposal.targets.length; i++) {
timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);
}
emit ProposalCanceled(proposalId);
}
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 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) {
}
}
| varmor.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold(sub256(block.number,1))||msg.sender==admin,"GovernorAlpha::cancel: proposer above threshold" | 308,340 | varmor.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold(sub256(block.number,1))||msg.sender==admin |
null | pragma solidity ^0.4.19;
/*
Author: Vox / 0xPool.io
Description: This smart contract is designed to store mining pool payouts for
Ethereum Protocol tokens and allow pool miners to withdraw their earned tokens
whenever they please. There are several benefits to using a smart contract to
track mining pool payouts:
- Increased transparency on behalf of pool owners
- Allows users more control over the regularity of their mining payouts
- The pool admin does not need to pay the gas costs of hundreds of
micro-transactions every time a block reward is found by the pool.
This contract is the 0xBTC (0xBitcoin) payout account for: http://0xpool.io
Not heard of 0xBitcoin? Head over to http://0xbitcoin.org
May the Qat be with you.
*/
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract _ERC20Pool {
using SafeMath for uint32;
// 0xB6eD7644C69416d67B522e20bC294A9a9B405B31 is the 0xBitcoin Smart Contract
ERC20Interface public tokenContract = ERC20Interface(0xB6eD7644C69416d67B522e20bC294A9a9B405B31);
address public owner = msg.sender;
uint32 public totalTokenSupply;
mapping (address => uint32) public minerTokens;
mapping (address => uint32) public minerTokenPayouts;
// Modifier for important owner only functions
modifier onlyOwner() {
}
// Require that the caller actually has tokens to withdraw.
modifier hasTokens() {
require(<FILL_ME>)
_;
}
// Pool software updates the contract when it finds a reward
function addMinerTokens(uint32 totalTokensInBatch, address[] minerAddress, uint32[] minerRewardTokens) public onlyOwner {
}
// Allow miners to withdraw their earnings from the contract. Update internal accounting.
function withdraw() public
hasTokens
{
}
// Fallback function, It's kind of you to send Ether, but we prefer to handle the true currency of
// Ethereum here, 0xBitcoin!
function () public payable {
}
// Allow the owner to retrieve accidentally sent Ethereum
function withdrawEther(uint32 amount) public onlyOwner {
}
// Allows the owner to transfer any accidentally sent ERC20 Tokens, excluding 0xBitcoin.
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint32 a, uint32 b) internal pure returns (uint32) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint32 a, uint32 b) internal pure returns (uint32) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint32 a, uint32 b) internal pure returns (uint32) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint32 a, uint32 b) internal pure returns (uint32) {
}
}
| minerTokens[msg.sender]>0 | 308,372 | minerTokens[msg.sender]>0 |
"Not enough tickets able to be claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
uint tier;
uint currentSupply;
uint tier1CurrentSupply = tickets[tier1].currentSupply;
uint tier2CurrentSupply = tickets[tier2].currentSupply;
uint tier3CurrentSupply = tickets[tier3].currentSupply;
if (tier1CurrentSupply + quantity <= tickets[tier1].supply) {
tier = tier1;
currentSupply = tier1CurrentSupply;
} else if (tier2CurrentSupply + quantity <= tickets[tier2].supply) {
tier = tier2;
currentSupply = tier2CurrentSupply;
} else if (tier3CurrentSupply + quantity <= tickets[tier3].supply) {
tier = tier3;
currentSupply = tier3CurrentSupply;
} else {
require(false, "No tickets left from any tier");
}
require(<FILL_ME>)
if (msg.sender != NFT_Access_Address) {
require(tickets[tier].canClaim, "Not currently allowed to be claimed" );
require(quantity <= tickets[tier].claimLimit, "Attempting to claim too many tickets");
require(quantity.mul(tickets[tier].mintPrice) <= msg.value, "Not enough eth sent");
require(tickets[tier].amountClaimed[msg.sender] < tickets[tier].claimLimit , "Claimed max amount");
tickets[tier].amountClaimed[msg.sender] += 1;
}
tickets[tier].currentSupply = tickets[tier].currentSupply + quantity;
_mint(msg.sender, tier, quantity, "");
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| currentSupply+quantity<=tickets[tier].supply,"Not enough tickets able to be claimed" | 308,502 | currentSupply+quantity<=tickets[tier].supply |
"Not currently allowed to be claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
uint tier;
uint currentSupply;
uint tier1CurrentSupply = tickets[tier1].currentSupply;
uint tier2CurrentSupply = tickets[tier2].currentSupply;
uint tier3CurrentSupply = tickets[tier3].currentSupply;
if (tier1CurrentSupply + quantity <= tickets[tier1].supply) {
tier = tier1;
currentSupply = tier1CurrentSupply;
} else if (tier2CurrentSupply + quantity <= tickets[tier2].supply) {
tier = tier2;
currentSupply = tier2CurrentSupply;
} else if (tier3CurrentSupply + quantity <= tickets[tier3].supply) {
tier = tier3;
currentSupply = tier3CurrentSupply;
} else {
require(false, "No tickets left from any tier");
}
require(currentSupply + quantity <= tickets[tier].supply, "Not enough tickets able to be claimed" );
if (msg.sender != NFT_Access_Address) {
require(<FILL_ME>)
require(quantity <= tickets[tier].claimLimit, "Attempting to claim too many tickets");
require(quantity.mul(tickets[tier].mintPrice) <= msg.value, "Not enough eth sent");
require(tickets[tier].amountClaimed[msg.sender] < tickets[tier].claimLimit , "Claimed max amount");
tickets[tier].amountClaimed[msg.sender] += 1;
}
tickets[tier].currentSupply = tickets[tier].currentSupply + quantity;
_mint(msg.sender, tier, quantity, "");
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| tickets[tier].canClaim,"Not currently allowed to be claimed" | 308,502 | tickets[tier].canClaim |
"Not enough eth sent" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
uint tier;
uint currentSupply;
uint tier1CurrentSupply = tickets[tier1].currentSupply;
uint tier2CurrentSupply = tickets[tier2].currentSupply;
uint tier3CurrentSupply = tickets[tier3].currentSupply;
if (tier1CurrentSupply + quantity <= tickets[tier1].supply) {
tier = tier1;
currentSupply = tier1CurrentSupply;
} else if (tier2CurrentSupply + quantity <= tickets[tier2].supply) {
tier = tier2;
currentSupply = tier2CurrentSupply;
} else if (tier3CurrentSupply + quantity <= tickets[tier3].supply) {
tier = tier3;
currentSupply = tier3CurrentSupply;
} else {
require(false, "No tickets left from any tier");
}
require(currentSupply + quantity <= tickets[tier].supply, "Not enough tickets able to be claimed" );
if (msg.sender != NFT_Access_Address) {
require(tickets[tier].canClaim, "Not currently allowed to be claimed" );
require(quantity <= tickets[tier].claimLimit, "Attempting to claim too many tickets");
require(<FILL_ME>)
require(tickets[tier].amountClaimed[msg.sender] < tickets[tier].claimLimit , "Claimed max amount");
tickets[tier].amountClaimed[msg.sender] += 1;
}
tickets[tier].currentSupply = tickets[tier].currentSupply + quantity;
_mint(msg.sender, tier, quantity, "");
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| quantity.mul(tickets[tier].mintPrice)<=msg.value,"Not enough eth sent" | 308,502 | quantity.mul(tickets[tier].mintPrice)<=msg.value |
"Claimed max amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
uint tier;
uint currentSupply;
uint tier1CurrentSupply = tickets[tier1].currentSupply;
uint tier2CurrentSupply = tickets[tier2].currentSupply;
uint tier3CurrentSupply = tickets[tier3].currentSupply;
if (tier1CurrentSupply + quantity <= tickets[tier1].supply) {
tier = tier1;
currentSupply = tier1CurrentSupply;
} else if (tier2CurrentSupply + quantity <= tickets[tier2].supply) {
tier = tier2;
currentSupply = tier2CurrentSupply;
} else if (tier3CurrentSupply + quantity <= tickets[tier3].supply) {
tier = tier3;
currentSupply = tier3CurrentSupply;
} else {
require(false, "No tickets left from any tier");
}
require(currentSupply + quantity <= tickets[tier].supply, "Not enough tickets able to be claimed" );
if (msg.sender != NFT_Access_Address) {
require(tickets[tier].canClaim, "Not currently allowed to be claimed" );
require(quantity <= tickets[tier].claimLimit, "Attempting to claim too many tickets");
require(quantity.mul(tickets[tier].mintPrice) <= msg.value, "Not enough eth sent");
require(<FILL_ME>)
tickets[tier].amountClaimed[msg.sender] += 1;
}
tickets[tier].currentSupply = tickets[tier].currentSupply + quantity;
_mint(msg.sender, tier, quantity, "");
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| tickets[tier].amountClaimed[msg.sender]<tickets[tier].claimLimit,"Claimed max amount" | 308,502 | tickets[tier].amountClaimed[msg.sender]<tickets[tier].claimLimit |
"Not currently allowed to be claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
if (msg.sender != NFT_Access_Address) {
require(canSingleMint, "Must tier mint");
require(<FILL_ME>)
require(quantity <= tickets[_ticket].claimLimit, "Attempting to claim too many tickets");
require(quantity.mul(tickets[_ticket].mintPrice) <= msg.value, "Not enough eth sent");
require(tickets[_ticket].amountClaimed[msg.sender] < tickets[_ticket].claimLimit , "Claimed max amount");
tickets[_ticket].amountClaimed[msg.sender] += 1;
}
uint currentSupply = tickets[_ticket].currentSupply;
require(currentSupply + quantity <= tickets[_ticket].supply, "Not enough tickets able to be claimed" );
tickets[_ticket].supply = tickets[_ticket].supply + quantity;
_mint(msg.sender, _ticket, quantity, "");
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| tickets[_ticket].canClaim,"Not currently allowed to be claimed" | 308,502 | tickets[_ticket].canClaim |
"Not enough eth sent" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
if (msg.sender != NFT_Access_Address) {
require(canSingleMint, "Must tier mint");
require(tickets[_ticket].canClaim, "Not currently allowed to be claimed" );
require(quantity <= tickets[_ticket].claimLimit, "Attempting to claim too many tickets");
require(<FILL_ME>)
require(tickets[_ticket].amountClaimed[msg.sender] < tickets[_ticket].claimLimit , "Claimed max amount");
tickets[_ticket].amountClaimed[msg.sender] += 1;
}
uint currentSupply = tickets[_ticket].currentSupply;
require(currentSupply + quantity <= tickets[_ticket].supply, "Not enough tickets able to be claimed" );
tickets[_ticket].supply = tickets[_ticket].supply + quantity;
_mint(msg.sender, _ticket, quantity, "");
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| quantity.mul(tickets[_ticket].mintPrice)<=msg.value,"Not enough eth sent" | 308,502 | quantity.mul(tickets[_ticket].mintPrice)<=msg.value |
"Claimed max amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
if (msg.sender != NFT_Access_Address) {
require(canSingleMint, "Must tier mint");
require(tickets[_ticket].canClaim, "Not currently allowed to be claimed" );
require(quantity <= tickets[_ticket].claimLimit, "Attempting to claim too many tickets");
require(quantity.mul(tickets[_ticket].mintPrice) <= msg.value, "Not enough eth sent");
require(<FILL_ME>)
tickets[_ticket].amountClaimed[msg.sender] += 1;
}
uint currentSupply = tickets[_ticket].currentSupply;
require(currentSupply + quantity <= tickets[_ticket].supply, "Not enough tickets able to be claimed" );
tickets[_ticket].supply = tickets[_ticket].supply + quantity;
_mint(msg.sender, _ticket, quantity, "");
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| tickets[_ticket].amountClaimed[msg.sender]<tickets[_ticket].claimLimit,"Claimed max amount" | 308,502 | tickets[_ticket].amountClaimed[msg.sender]<tickets[_ticket].claimLimit |
"Not enough tickets able to be claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
if (msg.sender != NFT_Access_Address) {
require(canSingleMint, "Must tier mint");
require(tickets[_ticket].canClaim, "Not currently allowed to be claimed" );
require(quantity <= tickets[_ticket].claimLimit, "Attempting to claim too many tickets");
require(quantity.mul(tickets[_ticket].mintPrice) <= msg.value, "Not enough eth sent");
require(tickets[_ticket].amountClaimed[msg.sender] < tickets[_ticket].claimLimit , "Claimed max amount");
tickets[_ticket].amountClaimed[msg.sender] += 1;
}
uint currentSupply = tickets[_ticket].currentSupply;
require(<FILL_ME>)
tickets[_ticket].supply = tickets[_ticket].supply + quantity;
_mint(msg.sender, _ticket, quantity, "");
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
}
| currentSupply+quantity<=tickets[_ticket].supply,"Not enough tickets able to be claimed" | 308,502 | currentSupply+quantity<=tickets[_ticket].supply |
"URI: nonexistent token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./ERC1155.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./AbstractNFTAccess.sol";
contract NFTAccess is AbstractNFTAccess {
using SafeMath for uint256;
using Counters for Counters.Counter;
uint public tier1 = 0;
uint public tier2 = 1;
uint public tier3 = 2;
bool public canSingleMint = false;
address public NFT_Access_Address = 0x95F71D6424F2B9bfc29378Ea9539372c986F2E9b;
Counters.Counter private ticketCount;
mapping(uint256 => ticketStruct) public tickets;
struct ticketStruct {
uint256 mintPrice;
uint supply;
uint currentSupply;
uint claimLimit;
string hash;
bool canClaim;
mapping(address => uint256) amountClaimed;
}
constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") {
}
/*
* @notice Add item to collection
*
* @param _mintPrice the price per ticket
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function addTicketStruct (uint256 _mintPrice, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice Edit item in collection
*
* @param _mintPrice the price per ticket
* @param _ticket the ticket to edit
* @param _supply the max supply of this item
* @param _claimLimit the max amount of nfts each user can claim for this item
* @param _hash the hash of the image
* @param _canClaim if it can currently be claimed
*/
function editTicketStruct (uint256 _mintPrice, uint _ticket, uint _supply, uint _claimLimit, string memory _hash, bool _canClaim) external onlyOwner {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
*/
function tieredMint (uint256 quantity) external payable {
}
/*
* @notice mint item in collection
*
* @param quantity the quantity to mint
* @param _ticket the ticket to mint
*/
function singleMint (uint256 quantity, uint256 _ticket) external payable {
}
/*
* @notice withdraw any money from the contract
*/
function withdraw() external {
}
/*
* @notice change the tiers for tierTickets
*
* @param _tier1 the quantity to mint
* @param _tier2 the quantity to mint
* @param _tier3 the quantity to mint
*/
function changeTierTickets(uint _tier1, uint _tier2, uint _tier3) external onlyOwner {
}
/*
* @notice get the total quantities of current tiers
*/
function totalTierQuantity() public view returns (uint) {
}
/*
* @notice get the current quantities of current tiers
*/
function currentTierQuantity() public view returns (uint) {
}
function uri(uint256 _id) public view override returns (string memory) {
require(<FILL_ME>)
return string(abi.encodePacked(super.uri(_id), tickets[_id].hash));
}
}
| tickets[_id].supply>0,"URI: nonexistent token" | 308,502 | tickets[_id].supply>0 |
"Not that many fractals left!" | // @author: @0x1337_BEEF
// B E E F J U S T B E E F J U S T S O M E 1 3 3 7 B E E F
// <pls accept this as my attempt for cool & very hip minmalistic pixel art>
pragma solidity ^0.8.4;
abstract contract ContextMixin {
function msgSender() internal view returns (address payable sender) {
}
}
contract Initializable {
bool inited = false;
modifier initializer() {
}
}
contract EIP712Base is Initializable {
struct EIP712Domain {
string name;
string version;
address verifyingContract;
bytes32 salt;
}
string constant public ERC712_VERSION = "1";
bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
bytes(
"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
)
);
bytes32 internal domainSeperator;
// supposed to be called once while initializing.
// one of the contracts that inherits this contract follows proxy pattern
// so it is not possible to do this in a constructor
function _initializeEIP712(
string memory name
)
internal
initializer
{
}
function _setDomainSeperator(string memory name) internal {
}
function getDomainSeperator() public view returns (bytes32) {
}
function getChainId() public view returns (uint256) {
}
/**
* Accept message hash and returns hash message in EIP712 compatible form
* So that it can be used to recover signer from signature signed using EIP712 formatted data
* https://eips.ethereum.org/EIPS/eip-712
* "\\x19" makes the encoding deterministic
* "\\x01" is the version byte to make it compatible to EIP-191
*/
function toTypedMessageHash(bytes32 messageHash)
internal
view
returns (bytes32)
{
}
}
contract NativeMetaTransaction is EIP712Base {
using SafeMath for uint256;
bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address payable relayerAddress,
bytes functionSignature
);
mapping(address => uint256) nonces;
/*
* Meta transaction structure.
* No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
* He should call the desired function directly in that case.
*/
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) public payable returns (bytes memory) {
}
function hashMetaTransaction(MetaTransaction memory metaTx)
internal
pure
returns (bytes32)
{
}
function getNonce(address user) public view returns (uint256 nonce) {
}
function verify(
address signer,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) internal view returns (bool) {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, ERC721URIStorage, Ownable, ERC721Burnable {
using SafeMath for uint;
using Counters for Counters.Counter;
using ECDSA for bytes32;
//Has to be the first variable to recieve address
address proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
Counters.Counter private _tokenIdCounter;
//Trying something new, please no DMCA or crap, reachout first thanks!
string constant ArtLicense = "All rights reserved to token owner";
//Fractonomics 101
uint public constant maxFractals = 4333;
uint public constant fractalPrice = 0.03 ether;
uint public publicSale = 0;
mapping(uint => uint) public minted;
constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {
}
function baseTokenURI() virtual public view returns (string memory);
function tokenURI(uint256 _tokenId) override(ERC721, ERC721URIStorage) public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator) override public view returns (bool) {
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal override view returns (address sender) {
}
function mintX(address to, uint amount) private {
}
function hashTransaction(uint amount, uint nonce) public pure returns (bytes32) {
}
function signTransaction(bytes32 _hash) public pure returns (bytes32) {
}
function matchSignerAdmin(bytes32 messageHash, bytes memory _signature) public pure returns (bool) {
}
function privMint(uint amount, uint nonce, bytes memory _signature) public payable {
uint total = totalSupply();
address dearestFractalOwner = _msgSender();
require(<FILL_ME>)
require(msg.value >= fractalPrice.mul(amount), "Not enuf moulah! NGMI");
bytes32 hash = hashTransaction(amount, nonce);
require(minted[uint(hash)] == 0, "Token already minted");
require(matchSignerAdmin(signTransaction(hash), _signature), "Signature mismatch");
mintX(dearestFractalOwner, amount);
minted[uint(hash)] = 1;
}
function mint(uint amount) public payable {
}
function reserve(address to, uint amount) public onlyOwner {
}
function setPublicState(uint stateValue) public onlyOwner {
}
function getFractalsByOwner(address _owner) public view returns (uint[] memory) {
}
function withdrawAll() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint tokenId) internal override(ERC721, ERC721Enumerable) {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) onlyOwner {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
}
contract Fractal is ERC721Tradable {
constructor() ERC721Tradable("CodeFractal", "CFRACTALS") { }
//API to be migrated after minting => IPFS/ARWEAVE
string public baseTokenURIs = "https://www.codefractals.xyz/api/metadata/";
function setBaseURI(string memory baseURI) public onlyOwner {
}
function baseTokenURI() override public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| total+amount<=maxFractals,"Not that many fractals left!" | 308,509 | total+amount<=maxFractals |
"Token already minted" | // @author: @0x1337_BEEF
// B E E F J U S T B E E F J U S T S O M E 1 3 3 7 B E E F
// <pls accept this as my attempt for cool & very hip minmalistic pixel art>
pragma solidity ^0.8.4;
abstract contract ContextMixin {
function msgSender() internal view returns (address payable sender) {
}
}
contract Initializable {
bool inited = false;
modifier initializer() {
}
}
contract EIP712Base is Initializable {
struct EIP712Domain {
string name;
string version;
address verifyingContract;
bytes32 salt;
}
string constant public ERC712_VERSION = "1";
bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
bytes(
"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
)
);
bytes32 internal domainSeperator;
// supposed to be called once while initializing.
// one of the contracts that inherits this contract follows proxy pattern
// so it is not possible to do this in a constructor
function _initializeEIP712(
string memory name
)
internal
initializer
{
}
function _setDomainSeperator(string memory name) internal {
}
function getDomainSeperator() public view returns (bytes32) {
}
function getChainId() public view returns (uint256) {
}
/**
* Accept message hash and returns hash message in EIP712 compatible form
* So that it can be used to recover signer from signature signed using EIP712 formatted data
* https://eips.ethereum.org/EIPS/eip-712
* "\\x19" makes the encoding deterministic
* "\\x01" is the version byte to make it compatible to EIP-191
*/
function toTypedMessageHash(bytes32 messageHash)
internal
view
returns (bytes32)
{
}
}
contract NativeMetaTransaction is EIP712Base {
using SafeMath for uint256;
bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address payable relayerAddress,
bytes functionSignature
);
mapping(address => uint256) nonces;
/*
* Meta transaction structure.
* No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
* He should call the desired function directly in that case.
*/
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) public payable returns (bytes memory) {
}
function hashMetaTransaction(MetaTransaction memory metaTx)
internal
pure
returns (bytes32)
{
}
function getNonce(address user) public view returns (uint256 nonce) {
}
function verify(
address signer,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) internal view returns (bool) {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, ERC721URIStorage, Ownable, ERC721Burnable {
using SafeMath for uint;
using Counters for Counters.Counter;
using ECDSA for bytes32;
//Has to be the first variable to recieve address
address proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
Counters.Counter private _tokenIdCounter;
//Trying something new, please no DMCA or crap, reachout first thanks!
string constant ArtLicense = "All rights reserved to token owner";
//Fractonomics 101
uint public constant maxFractals = 4333;
uint public constant fractalPrice = 0.03 ether;
uint public publicSale = 0;
mapping(uint => uint) public minted;
constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {
}
function baseTokenURI() virtual public view returns (string memory);
function tokenURI(uint256 _tokenId) override(ERC721, ERC721URIStorage) public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator) override public view returns (bool) {
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal override view returns (address sender) {
}
function mintX(address to, uint amount) private {
}
function hashTransaction(uint amount, uint nonce) public pure returns (bytes32) {
}
function signTransaction(bytes32 _hash) public pure returns (bytes32) {
}
function matchSignerAdmin(bytes32 messageHash, bytes memory _signature) public pure returns (bool) {
}
function privMint(uint amount, uint nonce, bytes memory _signature) public payable {
uint total = totalSupply();
address dearestFractalOwner = _msgSender();
require(total + amount <= maxFractals, "Not that many fractals left!");
require(msg.value >= fractalPrice.mul(amount), "Not enuf moulah! NGMI");
bytes32 hash = hashTransaction(amount, nonce);
require(<FILL_ME>)
require(matchSignerAdmin(signTransaction(hash), _signature), "Signature mismatch");
mintX(dearestFractalOwner, amount);
minted[uint(hash)] = 1;
}
function mint(uint amount) public payable {
}
function reserve(address to, uint amount) public onlyOwner {
}
function setPublicState(uint stateValue) public onlyOwner {
}
function getFractalsByOwner(address _owner) public view returns (uint[] memory) {
}
function withdrawAll() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint tokenId) internal override(ERC721, ERC721Enumerable) {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) onlyOwner {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
}
contract Fractal is ERC721Tradable {
constructor() ERC721Tradable("CodeFractal", "CFRACTALS") { }
//API to be migrated after minting => IPFS/ARWEAVE
string public baseTokenURIs = "https://www.codefractals.xyz/api/metadata/";
function setBaseURI(string memory baseURI) public onlyOwner {
}
function baseTokenURI() override public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| minted[uint(hash)]==0,"Token already minted" | 308,509 | minted[uint(hash)]==0 |
"Signature mismatch" | // @author: @0x1337_BEEF
// B E E F J U S T B E E F J U S T S O M E 1 3 3 7 B E E F
// <pls accept this as my attempt for cool & very hip minmalistic pixel art>
pragma solidity ^0.8.4;
abstract contract ContextMixin {
function msgSender() internal view returns (address payable sender) {
}
}
contract Initializable {
bool inited = false;
modifier initializer() {
}
}
contract EIP712Base is Initializable {
struct EIP712Domain {
string name;
string version;
address verifyingContract;
bytes32 salt;
}
string constant public ERC712_VERSION = "1";
bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
bytes(
"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
)
);
bytes32 internal domainSeperator;
// supposed to be called once while initializing.
// one of the contracts that inherits this contract follows proxy pattern
// so it is not possible to do this in a constructor
function _initializeEIP712(
string memory name
)
internal
initializer
{
}
function _setDomainSeperator(string memory name) internal {
}
function getDomainSeperator() public view returns (bytes32) {
}
function getChainId() public view returns (uint256) {
}
/**
* Accept message hash and returns hash message in EIP712 compatible form
* So that it can be used to recover signer from signature signed using EIP712 formatted data
* https://eips.ethereum.org/EIPS/eip-712
* "\\x19" makes the encoding deterministic
* "\\x01" is the version byte to make it compatible to EIP-191
*/
function toTypedMessageHash(bytes32 messageHash)
internal
view
returns (bytes32)
{
}
}
contract NativeMetaTransaction is EIP712Base {
using SafeMath for uint256;
bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address payable relayerAddress,
bytes functionSignature
);
mapping(address => uint256) nonces;
/*
* Meta transaction structure.
* No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
* He should call the desired function directly in that case.
*/
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) public payable returns (bytes memory) {
}
function hashMetaTransaction(MetaTransaction memory metaTx)
internal
pure
returns (bytes32)
{
}
function getNonce(address user) public view returns (uint256 nonce) {
}
function verify(
address signer,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) internal view returns (bool) {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, ERC721URIStorage, Ownable, ERC721Burnable {
using SafeMath for uint;
using Counters for Counters.Counter;
using ECDSA for bytes32;
//Has to be the first variable to recieve address
address proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
Counters.Counter private _tokenIdCounter;
//Trying something new, please no DMCA or crap, reachout first thanks!
string constant ArtLicense = "All rights reserved to token owner";
//Fractonomics 101
uint public constant maxFractals = 4333;
uint public constant fractalPrice = 0.03 ether;
uint public publicSale = 0;
mapping(uint => uint) public minted;
constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {
}
function baseTokenURI() virtual public view returns (string memory);
function tokenURI(uint256 _tokenId) override(ERC721, ERC721URIStorage) public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator) override public view returns (bool) {
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal override view returns (address sender) {
}
function mintX(address to, uint amount) private {
}
function hashTransaction(uint amount, uint nonce) public pure returns (bytes32) {
}
function signTransaction(bytes32 _hash) public pure returns (bytes32) {
}
function matchSignerAdmin(bytes32 messageHash, bytes memory _signature) public pure returns (bool) {
}
function privMint(uint amount, uint nonce, bytes memory _signature) public payable {
uint total = totalSupply();
address dearestFractalOwner = _msgSender();
require(total + amount <= maxFractals, "Not that many fractals left!");
require(msg.value >= fractalPrice.mul(amount), "Not enuf moulah! NGMI");
bytes32 hash = hashTransaction(amount, nonce);
require(minted[uint(hash)] == 0, "Token already minted");
require(<FILL_ME>)
mintX(dearestFractalOwner, amount);
minted[uint(hash)] = 1;
}
function mint(uint amount) public payable {
}
function reserve(address to, uint amount) public onlyOwner {
}
function setPublicState(uint stateValue) public onlyOwner {
}
function getFractalsByOwner(address _owner) public view returns (uint[] memory) {
}
function withdrawAll() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint tokenId) internal override(ERC721, ERC721Enumerable) {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) onlyOwner {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
}
contract Fractal is ERC721Tradable {
constructor() ERC721Tradable("CodeFractal", "CFRACTALS") { }
//API to be migrated after minting => IPFS/ARWEAVE
string public baseTokenURIs = "https://www.codefractals.xyz/api/metadata/";
function setBaseURI(string memory baseURI) public onlyOwner {
}
function baseTokenURI() override public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| matchSignerAdmin(signTransaction(hash),_signature),"Signature mismatch" | 308,509 | matchSignerAdmin(signTransaction(hash),_signature) |
"Account::_ INVALID_USER" | pragma solidity 0.4.24;
contract Utils {
modifier addressValid(address _address) {
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
// custom : not in original DSMath, putting it here for consistency, copied from SafeMath
function div(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
contract SelfAuthorized {
modifier authorized() {
}
}
contract Proxy {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
address masterCopy;
/// @dev Constructor function sets address of master copy contract.
/// @param _masterCopy Master copy address.
constructor(address _masterCopy)
public
{
}
/// @dev Fallback function forwards all transactions and returns all received return data.
function ()
external
payable
{
}
function implementation()
public
view
returns (address)
{
}
function proxyType()
public
pure
returns (uint256)
{
}
}
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
event Approval(address indexed _owner, address indexed _spender, uint _value);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Deposit(address indexed _owner, uint _value);
event Withdrawal(address indexed _owner, uint _value);
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
function() public payable {
}
function deposit() public payable {
}
function withdraw(uint wad) public {
}
function totalSupply() public view returns (uint) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
}
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
interface ERC20 {
function name() public view returns(string);
function symbol() public view returns(string);
function decimals() public view returns(uint8);
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract DSAuthority {
function canCall(address src, address dst, bytes4 sig) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_)
public
auth
{
}
function setAuthority(DSAuthority authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
}
}
contract ErrorUtils {
event LogError(string methodSig, string errMsg);
event LogErrorWithHintBytes32(bytes32 indexed bytes32Value, string methodSig, string errMsg);
event LogErrorWithHintAddress(address indexed addressValue, string methodSig, string errMsg);
}
contract MasterCopy is SelfAuthorized {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.
// It should also always be ensured that the address is stored alone (uses a full word)
address masterCopy;
/// @dev Allows to upgrade the contract. This can only be done via a Safe transaction.
/// @param _masterCopy New contract address.
function changeMasterCopy(address _masterCopy)
public
authorized
{
}
}
library ECRecovery {
function recover(bytes32 _hash, bytes _sig)
internal
pure
returns (address)
{
}
function toEthSignedMessageHash(bytes32 _hash)
internal
pure
returns (bytes32)
{
}
}
contract Utils2 {
using ECRecovery for bytes32;
function _recoverSigner(bytes32 _hash, bytes _signature)
internal
pure
returns(address _signer)
{
}
}
contract Config is DSNote, DSAuth, Utils {
WETH9 public weth9;
mapping (address => bool) public isAccountHandler;
mapping (address => bool) public isAdmin;
address[] public admins;
bool public disableAdminControl = false;
event LogAdminAdded(address indexed _admin, address _by);
event LogAdminRemoved(address indexed _admin, address _by);
constructor() public {
}
modifier onlyAdmin(){
}
function setWETH9
(
address _weth9
)
public
auth
note
addressValid(_weth9)
{
}
function setAccountHandler
(
address _accountHandler,
bool _isAccountHandler
)
public
auth
note
addressValid(_accountHandler)
{
}
function toggleAdminsControl()
public
auth
note
{
}
function isAdminValid(address _admin)
public
view
returns (bool)
{
}
function getAllAdmins()
public
view
returns(address[])
{
}
function addAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
function removeAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
}
contract DSThing is DSNote, DSAuth, DSMath {
function S(string s) internal pure returns (bytes4) {
}
}
contract DSStop is DSNote, DSAuth {
bool public stopped = false;
modifier whenNotStopped {
}
modifier whenStopped {
}
function stop() public auth note {
}
function start() public auth note {
}
}
contract Account is MasterCopy, DSNote, Utils, Utils2, ErrorUtils {
address[] public users;
mapping (address => bool) public isUser;
mapping (bytes32 => bool) public actionCompleted;
WETH9 public weth9;
Config public config;
bool public isInitialized = false;
event LogTransferBySystem(address indexed token, address indexed to, uint value, address by);
event LogTransferByUser(address indexed token, address indexed to, uint value, address by);
event LogUserAdded(address indexed user, address by);
event LogUserRemoved(address indexed user, address by);
event LogImplChanged(address indexed newImpl, address indexed oldImpl);
modifier initialized() {
}
modifier notInitialized() {
}
modifier userExists(address _user) {
require(<FILL_ME>)
_;
}
modifier userDoesNotExist(address _user) {
}
modifier onlyAdmin() {
}
modifier onlyHandler(){
}
function init(address _user, address _config)
public
notInitialized
{
}
function getAllUsers() public view returns (address[]) {
}
function balanceFor(address _token) public view returns (uint _balance){
}
function transferBySystem
(
address _token,
address _to,
uint _value
)
external
onlyHandler
note
initialized
{
}
function transferByUser
(
address _token,
address _to,
uint _value,
uint _salt,
bytes _signature
)
external
addressValid(_to)
note
initialized
onlyAdmin
{
}
function addUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
addressValid(_user)
userDoesNotExist(_user)
initialized
onlyAdmin
{
}
function removeUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
userExists(_user)
initialized
onlyAdmin
{
}
function _getTransferActionHash
(
address _token,
address _to,
uint _value,
uint _salt
)
internal
view
returns (bytes32)
{
}
function _getUserActionHash
(
address _user,
string _action,
uint _salt
)
internal
view
returns (bytes32)
{
}
// to directly send ether to contract
function() external payable {
}
function changeImpl
(
address _to,
uint _salt,
bytes _signature
)
external
note
addressValid(_to)
initialized
onlyAdmin
{
}
}
contract AccountFactory is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccount;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
constructor
(
Config _config,
address _accountMaster
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function newAccount(address _user)
public
note
onlyAdmin
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) public note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
}
contract AccountFactoryV2 is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccountValid;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
AccountFactory accountFactoryV1;
constructor
(
Config _config,
address _accountMaster,
AccountFactory _accountFactoryV1
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function setAccountFactoryV1(AccountFactory _accountFactoryV1) external note auth addressValid(_accountFactoryV1) {
}
function newAccount(address _user)
public
note
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) external note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
function isAccount(address _account) public view returns (bool) {
}
}
| isUser[_user],"Account::_ INVALID_USER" | 308,548 | isUser[_user] |
"Account::_ USER_DOES_NOT_EXISTS" | pragma solidity 0.4.24;
contract Utils {
modifier addressValid(address _address) {
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
// custom : not in original DSMath, putting it here for consistency, copied from SafeMath
function div(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
contract SelfAuthorized {
modifier authorized() {
}
}
contract Proxy {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
address masterCopy;
/// @dev Constructor function sets address of master copy contract.
/// @param _masterCopy Master copy address.
constructor(address _masterCopy)
public
{
}
/// @dev Fallback function forwards all transactions and returns all received return data.
function ()
external
payable
{
}
function implementation()
public
view
returns (address)
{
}
function proxyType()
public
pure
returns (uint256)
{
}
}
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
event Approval(address indexed _owner, address indexed _spender, uint _value);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Deposit(address indexed _owner, uint _value);
event Withdrawal(address indexed _owner, uint _value);
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
function() public payable {
}
function deposit() public payable {
}
function withdraw(uint wad) public {
}
function totalSupply() public view returns (uint) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
}
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
interface ERC20 {
function name() public view returns(string);
function symbol() public view returns(string);
function decimals() public view returns(uint8);
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract DSAuthority {
function canCall(address src, address dst, bytes4 sig) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_)
public
auth
{
}
function setAuthority(DSAuthority authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
}
}
contract ErrorUtils {
event LogError(string methodSig, string errMsg);
event LogErrorWithHintBytes32(bytes32 indexed bytes32Value, string methodSig, string errMsg);
event LogErrorWithHintAddress(address indexed addressValue, string methodSig, string errMsg);
}
contract MasterCopy is SelfAuthorized {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.
// It should also always be ensured that the address is stored alone (uses a full word)
address masterCopy;
/// @dev Allows to upgrade the contract. This can only be done via a Safe transaction.
/// @param _masterCopy New contract address.
function changeMasterCopy(address _masterCopy)
public
authorized
{
}
}
library ECRecovery {
function recover(bytes32 _hash, bytes _sig)
internal
pure
returns (address)
{
}
function toEthSignedMessageHash(bytes32 _hash)
internal
pure
returns (bytes32)
{
}
}
contract Utils2 {
using ECRecovery for bytes32;
function _recoverSigner(bytes32 _hash, bytes _signature)
internal
pure
returns(address _signer)
{
}
}
contract Config is DSNote, DSAuth, Utils {
WETH9 public weth9;
mapping (address => bool) public isAccountHandler;
mapping (address => bool) public isAdmin;
address[] public admins;
bool public disableAdminControl = false;
event LogAdminAdded(address indexed _admin, address _by);
event LogAdminRemoved(address indexed _admin, address _by);
constructor() public {
}
modifier onlyAdmin(){
}
function setWETH9
(
address _weth9
)
public
auth
note
addressValid(_weth9)
{
}
function setAccountHandler
(
address _accountHandler,
bool _isAccountHandler
)
public
auth
note
addressValid(_accountHandler)
{
}
function toggleAdminsControl()
public
auth
note
{
}
function isAdminValid(address _admin)
public
view
returns (bool)
{
}
function getAllAdmins()
public
view
returns(address[])
{
}
function addAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
function removeAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
}
contract DSThing is DSNote, DSAuth, DSMath {
function S(string s) internal pure returns (bytes4) {
}
}
contract DSStop is DSNote, DSAuth {
bool public stopped = false;
modifier whenNotStopped {
}
modifier whenStopped {
}
function stop() public auth note {
}
function start() public auth note {
}
}
contract Account is MasterCopy, DSNote, Utils, Utils2, ErrorUtils {
address[] public users;
mapping (address => bool) public isUser;
mapping (bytes32 => bool) public actionCompleted;
WETH9 public weth9;
Config public config;
bool public isInitialized = false;
event LogTransferBySystem(address indexed token, address indexed to, uint value, address by);
event LogTransferByUser(address indexed token, address indexed to, uint value, address by);
event LogUserAdded(address indexed user, address by);
event LogUserRemoved(address indexed user, address by);
event LogImplChanged(address indexed newImpl, address indexed oldImpl);
modifier initialized() {
}
modifier notInitialized() {
}
modifier userExists(address _user) {
}
modifier userDoesNotExist(address _user) {
require(<FILL_ME>)
_;
}
modifier onlyAdmin() {
}
modifier onlyHandler(){
}
function init(address _user, address _config)
public
notInitialized
{
}
function getAllUsers() public view returns (address[]) {
}
function balanceFor(address _token) public view returns (uint _balance){
}
function transferBySystem
(
address _token,
address _to,
uint _value
)
external
onlyHandler
note
initialized
{
}
function transferByUser
(
address _token,
address _to,
uint _value,
uint _salt,
bytes _signature
)
external
addressValid(_to)
note
initialized
onlyAdmin
{
}
function addUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
addressValid(_user)
userDoesNotExist(_user)
initialized
onlyAdmin
{
}
function removeUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
userExists(_user)
initialized
onlyAdmin
{
}
function _getTransferActionHash
(
address _token,
address _to,
uint _value,
uint _salt
)
internal
view
returns (bytes32)
{
}
function _getUserActionHash
(
address _user,
string _action,
uint _salt
)
internal
view
returns (bytes32)
{
}
// to directly send ether to contract
function() external payable {
}
function changeImpl
(
address _to,
uint _salt,
bytes _signature
)
external
note
addressValid(_to)
initialized
onlyAdmin
{
}
}
contract AccountFactory is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccount;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
constructor
(
Config _config,
address _accountMaster
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function newAccount(address _user)
public
note
onlyAdmin
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) public note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
}
contract AccountFactoryV2 is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccountValid;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
AccountFactory accountFactoryV1;
constructor
(
Config _config,
address _accountMaster,
AccountFactory _accountFactoryV1
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function setAccountFactoryV1(AccountFactory _accountFactoryV1) external note auth addressValid(_accountFactoryV1) {
}
function newAccount(address _user)
public
note
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) external note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
function isAccount(address _account) public view returns (bool) {
}
}
| !isUser[_user],"Account::_ USER_DOES_NOT_EXISTS" | 308,548 | !isUser[_user] |
"Account::_ INVALID_ADMIN_ACCOUNT" | pragma solidity 0.4.24;
contract Utils {
modifier addressValid(address _address) {
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
// custom : not in original DSMath, putting it here for consistency, copied from SafeMath
function div(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
contract SelfAuthorized {
modifier authorized() {
}
}
contract Proxy {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
address masterCopy;
/// @dev Constructor function sets address of master copy contract.
/// @param _masterCopy Master copy address.
constructor(address _masterCopy)
public
{
}
/// @dev Fallback function forwards all transactions and returns all received return data.
function ()
external
payable
{
}
function implementation()
public
view
returns (address)
{
}
function proxyType()
public
pure
returns (uint256)
{
}
}
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
event Approval(address indexed _owner, address indexed _spender, uint _value);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Deposit(address indexed _owner, uint _value);
event Withdrawal(address indexed _owner, uint _value);
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
function() public payable {
}
function deposit() public payable {
}
function withdraw(uint wad) public {
}
function totalSupply() public view returns (uint) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
}
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
interface ERC20 {
function name() public view returns(string);
function symbol() public view returns(string);
function decimals() public view returns(uint8);
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract DSAuthority {
function canCall(address src, address dst, bytes4 sig) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_)
public
auth
{
}
function setAuthority(DSAuthority authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
}
}
contract ErrorUtils {
event LogError(string methodSig, string errMsg);
event LogErrorWithHintBytes32(bytes32 indexed bytes32Value, string methodSig, string errMsg);
event LogErrorWithHintAddress(address indexed addressValue, string methodSig, string errMsg);
}
contract MasterCopy is SelfAuthorized {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.
// It should also always be ensured that the address is stored alone (uses a full word)
address masterCopy;
/// @dev Allows to upgrade the contract. This can only be done via a Safe transaction.
/// @param _masterCopy New contract address.
function changeMasterCopy(address _masterCopy)
public
authorized
{
}
}
library ECRecovery {
function recover(bytes32 _hash, bytes _sig)
internal
pure
returns (address)
{
}
function toEthSignedMessageHash(bytes32 _hash)
internal
pure
returns (bytes32)
{
}
}
contract Utils2 {
using ECRecovery for bytes32;
function _recoverSigner(bytes32 _hash, bytes _signature)
internal
pure
returns(address _signer)
{
}
}
contract Config is DSNote, DSAuth, Utils {
WETH9 public weth9;
mapping (address => bool) public isAccountHandler;
mapping (address => bool) public isAdmin;
address[] public admins;
bool public disableAdminControl = false;
event LogAdminAdded(address indexed _admin, address _by);
event LogAdminRemoved(address indexed _admin, address _by);
constructor() public {
}
modifier onlyAdmin(){
}
function setWETH9
(
address _weth9
)
public
auth
note
addressValid(_weth9)
{
}
function setAccountHandler
(
address _accountHandler,
bool _isAccountHandler
)
public
auth
note
addressValid(_accountHandler)
{
}
function toggleAdminsControl()
public
auth
note
{
}
function isAdminValid(address _admin)
public
view
returns (bool)
{
}
function getAllAdmins()
public
view
returns(address[])
{
}
function addAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
function removeAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
}
contract DSThing is DSNote, DSAuth, DSMath {
function S(string s) internal pure returns (bytes4) {
}
}
contract DSStop is DSNote, DSAuth {
bool public stopped = false;
modifier whenNotStopped {
}
modifier whenStopped {
}
function stop() public auth note {
}
function start() public auth note {
}
}
contract Account is MasterCopy, DSNote, Utils, Utils2, ErrorUtils {
address[] public users;
mapping (address => bool) public isUser;
mapping (bytes32 => bool) public actionCompleted;
WETH9 public weth9;
Config public config;
bool public isInitialized = false;
event LogTransferBySystem(address indexed token, address indexed to, uint value, address by);
event LogTransferByUser(address indexed token, address indexed to, uint value, address by);
event LogUserAdded(address indexed user, address by);
event LogUserRemoved(address indexed user, address by);
event LogImplChanged(address indexed newImpl, address indexed oldImpl);
modifier initialized() {
}
modifier notInitialized() {
}
modifier userExists(address _user) {
}
modifier userDoesNotExist(address _user) {
}
modifier onlyAdmin() {
require(<FILL_ME>)
_;
}
modifier onlyHandler(){
}
function init(address _user, address _config)
public
notInitialized
{
}
function getAllUsers() public view returns (address[]) {
}
function balanceFor(address _token) public view returns (uint _balance){
}
function transferBySystem
(
address _token,
address _to,
uint _value
)
external
onlyHandler
note
initialized
{
}
function transferByUser
(
address _token,
address _to,
uint _value,
uint _salt,
bytes _signature
)
external
addressValid(_to)
note
initialized
onlyAdmin
{
}
function addUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
addressValid(_user)
userDoesNotExist(_user)
initialized
onlyAdmin
{
}
function removeUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
userExists(_user)
initialized
onlyAdmin
{
}
function _getTransferActionHash
(
address _token,
address _to,
uint _value,
uint _salt
)
internal
view
returns (bytes32)
{
}
function _getUserActionHash
(
address _user,
string _action,
uint _salt
)
internal
view
returns (bytes32)
{
}
// to directly send ether to contract
function() external payable {
}
function changeImpl
(
address _to,
uint _salt,
bytes _signature
)
external
note
addressValid(_to)
initialized
onlyAdmin
{
}
}
contract AccountFactory is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccount;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
constructor
(
Config _config,
address _accountMaster
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function newAccount(address _user)
public
note
onlyAdmin
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) public note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
}
contract AccountFactoryV2 is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccountValid;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
AccountFactory accountFactoryV1;
constructor
(
Config _config,
address _accountMaster,
AccountFactory _accountFactoryV1
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function setAccountFactoryV1(AccountFactory _accountFactoryV1) external note auth addressValid(_accountFactoryV1) {
}
function newAccount(address _user)
public
note
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) external note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
function isAccount(address _account) public view returns (bool) {
}
}
| config.isAdminValid(msg.sender),"Account::_ INVALID_ADMIN_ACCOUNT" | 308,548 | config.isAdminValid(msg.sender) |
"Account::_ INVALID_ACC_HANDLER" | pragma solidity 0.4.24;
contract Utils {
modifier addressValid(address _address) {
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
// custom : not in original DSMath, putting it here for consistency, copied from SafeMath
function div(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
contract SelfAuthorized {
modifier authorized() {
}
}
contract Proxy {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
address masterCopy;
/// @dev Constructor function sets address of master copy contract.
/// @param _masterCopy Master copy address.
constructor(address _masterCopy)
public
{
}
/// @dev Fallback function forwards all transactions and returns all received return data.
function ()
external
payable
{
}
function implementation()
public
view
returns (address)
{
}
function proxyType()
public
pure
returns (uint256)
{
}
}
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
event Approval(address indexed _owner, address indexed _spender, uint _value);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Deposit(address indexed _owner, uint _value);
event Withdrawal(address indexed _owner, uint _value);
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
function() public payable {
}
function deposit() public payable {
}
function withdraw(uint wad) public {
}
function totalSupply() public view returns (uint) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
}
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
interface ERC20 {
function name() public view returns(string);
function symbol() public view returns(string);
function decimals() public view returns(uint8);
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract DSAuthority {
function canCall(address src, address dst, bytes4 sig) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_)
public
auth
{
}
function setAuthority(DSAuthority authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
}
}
contract ErrorUtils {
event LogError(string methodSig, string errMsg);
event LogErrorWithHintBytes32(bytes32 indexed bytes32Value, string methodSig, string errMsg);
event LogErrorWithHintAddress(address indexed addressValue, string methodSig, string errMsg);
}
contract MasterCopy is SelfAuthorized {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.
// It should also always be ensured that the address is stored alone (uses a full word)
address masterCopy;
/// @dev Allows to upgrade the contract. This can only be done via a Safe transaction.
/// @param _masterCopy New contract address.
function changeMasterCopy(address _masterCopy)
public
authorized
{
}
}
library ECRecovery {
function recover(bytes32 _hash, bytes _sig)
internal
pure
returns (address)
{
}
function toEthSignedMessageHash(bytes32 _hash)
internal
pure
returns (bytes32)
{
}
}
contract Utils2 {
using ECRecovery for bytes32;
function _recoverSigner(bytes32 _hash, bytes _signature)
internal
pure
returns(address _signer)
{
}
}
contract Config is DSNote, DSAuth, Utils {
WETH9 public weth9;
mapping (address => bool) public isAccountHandler;
mapping (address => bool) public isAdmin;
address[] public admins;
bool public disableAdminControl = false;
event LogAdminAdded(address indexed _admin, address _by);
event LogAdminRemoved(address indexed _admin, address _by);
constructor() public {
}
modifier onlyAdmin(){
}
function setWETH9
(
address _weth9
)
public
auth
note
addressValid(_weth9)
{
}
function setAccountHandler
(
address _accountHandler,
bool _isAccountHandler
)
public
auth
note
addressValid(_accountHandler)
{
}
function toggleAdminsControl()
public
auth
note
{
}
function isAdminValid(address _admin)
public
view
returns (bool)
{
}
function getAllAdmins()
public
view
returns(address[])
{
}
function addAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
function removeAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
}
contract DSThing is DSNote, DSAuth, DSMath {
function S(string s) internal pure returns (bytes4) {
}
}
contract DSStop is DSNote, DSAuth {
bool public stopped = false;
modifier whenNotStopped {
}
modifier whenStopped {
}
function stop() public auth note {
}
function start() public auth note {
}
}
contract Account is MasterCopy, DSNote, Utils, Utils2, ErrorUtils {
address[] public users;
mapping (address => bool) public isUser;
mapping (bytes32 => bool) public actionCompleted;
WETH9 public weth9;
Config public config;
bool public isInitialized = false;
event LogTransferBySystem(address indexed token, address indexed to, uint value, address by);
event LogTransferByUser(address indexed token, address indexed to, uint value, address by);
event LogUserAdded(address indexed user, address by);
event LogUserRemoved(address indexed user, address by);
event LogImplChanged(address indexed newImpl, address indexed oldImpl);
modifier initialized() {
}
modifier notInitialized() {
}
modifier userExists(address _user) {
}
modifier userDoesNotExist(address _user) {
}
modifier onlyAdmin() {
}
modifier onlyHandler(){
require(<FILL_ME>)
_;
}
function init(address _user, address _config)
public
notInitialized
{
}
function getAllUsers() public view returns (address[]) {
}
function balanceFor(address _token) public view returns (uint _balance){
}
function transferBySystem
(
address _token,
address _to,
uint _value
)
external
onlyHandler
note
initialized
{
}
function transferByUser
(
address _token,
address _to,
uint _value,
uint _salt,
bytes _signature
)
external
addressValid(_to)
note
initialized
onlyAdmin
{
}
function addUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
addressValid(_user)
userDoesNotExist(_user)
initialized
onlyAdmin
{
}
function removeUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
userExists(_user)
initialized
onlyAdmin
{
}
function _getTransferActionHash
(
address _token,
address _to,
uint _value,
uint _salt
)
internal
view
returns (bytes32)
{
}
function _getUserActionHash
(
address _user,
string _action,
uint _salt
)
internal
view
returns (bytes32)
{
}
// to directly send ether to contract
function() external payable {
}
function changeImpl
(
address _to,
uint _salt,
bytes _signature
)
external
note
addressValid(_to)
initialized
onlyAdmin
{
}
}
contract AccountFactory is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccount;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
constructor
(
Config _config,
address _accountMaster
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function newAccount(address _user)
public
note
onlyAdmin
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) public note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
}
contract AccountFactoryV2 is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccountValid;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
AccountFactory accountFactoryV1;
constructor
(
Config _config,
address _accountMaster,
AccountFactory _accountFactoryV1
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function setAccountFactoryV1(AccountFactory _accountFactoryV1) external note auth addressValid(_accountFactoryV1) {
}
function newAccount(address _user)
public
note
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) external note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
function isAccount(address _account) public view returns (bool) {
}
}
| config.isAccountHandler(msg.sender),"Account::_ INVALID_ACC_HANDLER" | 308,548 | config.isAccountHandler(msg.sender) |
"Account::transferBySystem INSUFFICIENT_BALANCE_IN_ACCOUNT" | pragma solidity 0.4.24;
contract Utils {
modifier addressValid(address _address) {
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
// custom : not in original DSMath, putting it here for consistency, copied from SafeMath
function div(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
contract SelfAuthorized {
modifier authorized() {
}
}
contract Proxy {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
address masterCopy;
/// @dev Constructor function sets address of master copy contract.
/// @param _masterCopy Master copy address.
constructor(address _masterCopy)
public
{
}
/// @dev Fallback function forwards all transactions and returns all received return data.
function ()
external
payable
{
}
function implementation()
public
view
returns (address)
{
}
function proxyType()
public
pure
returns (uint256)
{
}
}
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
event Approval(address indexed _owner, address indexed _spender, uint _value);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Deposit(address indexed _owner, uint _value);
event Withdrawal(address indexed _owner, uint _value);
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
function() public payable {
}
function deposit() public payable {
}
function withdraw(uint wad) public {
}
function totalSupply() public view returns (uint) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
}
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
interface ERC20 {
function name() public view returns(string);
function symbol() public view returns(string);
function decimals() public view returns(uint8);
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract DSAuthority {
function canCall(address src, address dst, bytes4 sig) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_)
public
auth
{
}
function setAuthority(DSAuthority authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
}
}
contract ErrorUtils {
event LogError(string methodSig, string errMsg);
event LogErrorWithHintBytes32(bytes32 indexed bytes32Value, string methodSig, string errMsg);
event LogErrorWithHintAddress(address indexed addressValue, string methodSig, string errMsg);
}
contract MasterCopy is SelfAuthorized {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.
// It should also always be ensured that the address is stored alone (uses a full word)
address masterCopy;
/// @dev Allows to upgrade the contract. This can only be done via a Safe transaction.
/// @param _masterCopy New contract address.
function changeMasterCopy(address _masterCopy)
public
authorized
{
}
}
library ECRecovery {
function recover(bytes32 _hash, bytes _sig)
internal
pure
returns (address)
{
}
function toEthSignedMessageHash(bytes32 _hash)
internal
pure
returns (bytes32)
{
}
}
contract Utils2 {
using ECRecovery for bytes32;
function _recoverSigner(bytes32 _hash, bytes _signature)
internal
pure
returns(address _signer)
{
}
}
contract Config is DSNote, DSAuth, Utils {
WETH9 public weth9;
mapping (address => bool) public isAccountHandler;
mapping (address => bool) public isAdmin;
address[] public admins;
bool public disableAdminControl = false;
event LogAdminAdded(address indexed _admin, address _by);
event LogAdminRemoved(address indexed _admin, address _by);
constructor() public {
}
modifier onlyAdmin(){
}
function setWETH9
(
address _weth9
)
public
auth
note
addressValid(_weth9)
{
}
function setAccountHandler
(
address _accountHandler,
bool _isAccountHandler
)
public
auth
note
addressValid(_accountHandler)
{
}
function toggleAdminsControl()
public
auth
note
{
}
function isAdminValid(address _admin)
public
view
returns (bool)
{
}
function getAllAdmins()
public
view
returns(address[])
{
}
function addAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
function removeAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
}
contract DSThing is DSNote, DSAuth, DSMath {
function S(string s) internal pure returns (bytes4) {
}
}
contract DSStop is DSNote, DSAuth {
bool public stopped = false;
modifier whenNotStopped {
}
modifier whenStopped {
}
function stop() public auth note {
}
function start() public auth note {
}
}
contract Account is MasterCopy, DSNote, Utils, Utils2, ErrorUtils {
address[] public users;
mapping (address => bool) public isUser;
mapping (bytes32 => bool) public actionCompleted;
WETH9 public weth9;
Config public config;
bool public isInitialized = false;
event LogTransferBySystem(address indexed token, address indexed to, uint value, address by);
event LogTransferByUser(address indexed token, address indexed to, uint value, address by);
event LogUserAdded(address indexed user, address by);
event LogUserRemoved(address indexed user, address by);
event LogImplChanged(address indexed newImpl, address indexed oldImpl);
modifier initialized() {
}
modifier notInitialized() {
}
modifier userExists(address _user) {
}
modifier userDoesNotExist(address _user) {
}
modifier onlyAdmin() {
}
modifier onlyHandler(){
}
function init(address _user, address _config)
public
notInitialized
{
}
function getAllUsers() public view returns (address[]) {
}
function balanceFor(address _token) public view returns (uint _balance){
}
function transferBySystem
(
address _token,
address _to,
uint _value
)
external
onlyHandler
note
initialized
{
require(<FILL_ME>)
ERC20(_token).transfer(_to, _value);
emit LogTransferBySystem(_token, _to, _value, msg.sender);
}
function transferByUser
(
address _token,
address _to,
uint _value,
uint _salt,
bytes _signature
)
external
addressValid(_to)
note
initialized
onlyAdmin
{
}
function addUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
addressValid(_user)
userDoesNotExist(_user)
initialized
onlyAdmin
{
}
function removeUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
userExists(_user)
initialized
onlyAdmin
{
}
function _getTransferActionHash
(
address _token,
address _to,
uint _value,
uint _salt
)
internal
view
returns (bytes32)
{
}
function _getUserActionHash
(
address _user,
string _action,
uint _salt
)
internal
view
returns (bytes32)
{
}
// to directly send ether to contract
function() external payable {
}
function changeImpl
(
address _to,
uint _salt,
bytes _signature
)
external
note
addressValid(_to)
initialized
onlyAdmin
{
}
}
contract AccountFactory is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccount;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
constructor
(
Config _config,
address _accountMaster
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function newAccount(address _user)
public
note
onlyAdmin
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) public note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
}
contract AccountFactoryV2 is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccountValid;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
AccountFactory accountFactoryV1;
constructor
(
Config _config,
address _accountMaster,
AccountFactory _accountFactoryV1
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function setAccountFactoryV1(AccountFactory _accountFactoryV1) external note auth addressValid(_accountFactoryV1) {
}
function newAccount(address _user)
public
note
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) external note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
function isAccount(address _account) public view returns (bool) {
}
}
| ERC20(_token).balanceOf(this)>=_value,"Account::transferBySystem INSUFFICIENT_BALANCE_IN_ACCOUNT" | 308,548 | ERC20(_token).balanceOf(this)>=_value |
"Account::transferByUser TOKEN_TRANSFER_FAILED" | pragma solidity 0.4.24;
contract Utils {
modifier addressValid(address _address) {
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
// custom : not in original DSMath, putting it here for consistency, copied from SafeMath
function div(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
contract SelfAuthorized {
modifier authorized() {
}
}
contract Proxy {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
address masterCopy;
/// @dev Constructor function sets address of master copy contract.
/// @param _masterCopy Master copy address.
constructor(address _masterCopy)
public
{
}
/// @dev Fallback function forwards all transactions and returns all received return data.
function ()
external
payable
{
}
function implementation()
public
view
returns (address)
{
}
function proxyType()
public
pure
returns (uint256)
{
}
}
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
event Approval(address indexed _owner, address indexed _spender, uint _value);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Deposit(address indexed _owner, uint _value);
event Withdrawal(address indexed _owner, uint _value);
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
function() public payable {
}
function deposit() public payable {
}
function withdraw(uint wad) public {
}
function totalSupply() public view returns (uint) {
}
function approve(address guy, uint wad) public returns (bool) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
}
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
interface ERC20 {
function name() public view returns(string);
function symbol() public view returns(string);
function decimals() public view returns(uint8);
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract DSAuthority {
function canCall(address src, address dst, bytes4 sig) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_)
public
auth
{
}
function setAuthority(DSAuthority authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
}
}
contract ErrorUtils {
event LogError(string methodSig, string errMsg);
event LogErrorWithHintBytes32(bytes32 indexed bytes32Value, string methodSig, string errMsg);
event LogErrorWithHintAddress(address indexed addressValue, string methodSig, string errMsg);
}
contract MasterCopy is SelfAuthorized {
// masterCopy always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.
// It should also always be ensured that the address is stored alone (uses a full word)
address masterCopy;
/// @dev Allows to upgrade the contract. This can only be done via a Safe transaction.
/// @param _masterCopy New contract address.
function changeMasterCopy(address _masterCopy)
public
authorized
{
}
}
library ECRecovery {
function recover(bytes32 _hash, bytes _sig)
internal
pure
returns (address)
{
}
function toEthSignedMessageHash(bytes32 _hash)
internal
pure
returns (bytes32)
{
}
}
contract Utils2 {
using ECRecovery for bytes32;
function _recoverSigner(bytes32 _hash, bytes _signature)
internal
pure
returns(address _signer)
{
}
}
contract Config is DSNote, DSAuth, Utils {
WETH9 public weth9;
mapping (address => bool) public isAccountHandler;
mapping (address => bool) public isAdmin;
address[] public admins;
bool public disableAdminControl = false;
event LogAdminAdded(address indexed _admin, address _by);
event LogAdminRemoved(address indexed _admin, address _by);
constructor() public {
}
modifier onlyAdmin(){
}
function setWETH9
(
address _weth9
)
public
auth
note
addressValid(_weth9)
{
}
function setAccountHandler
(
address _accountHandler,
bool _isAccountHandler
)
public
auth
note
addressValid(_accountHandler)
{
}
function toggleAdminsControl()
public
auth
note
{
}
function isAdminValid(address _admin)
public
view
returns (bool)
{
}
function getAllAdmins()
public
view
returns(address[])
{
}
function addAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
function removeAdmin
(
address _admin
)
external
note
onlyAdmin
addressValid(_admin)
{
}
}
contract DSThing is DSNote, DSAuth, DSMath {
function S(string s) internal pure returns (bytes4) {
}
}
contract DSStop is DSNote, DSAuth {
bool public stopped = false;
modifier whenNotStopped {
}
modifier whenStopped {
}
function stop() public auth note {
}
function start() public auth note {
}
}
contract Account is MasterCopy, DSNote, Utils, Utils2, ErrorUtils {
address[] public users;
mapping (address => bool) public isUser;
mapping (bytes32 => bool) public actionCompleted;
WETH9 public weth9;
Config public config;
bool public isInitialized = false;
event LogTransferBySystem(address indexed token, address indexed to, uint value, address by);
event LogTransferByUser(address indexed token, address indexed to, uint value, address by);
event LogUserAdded(address indexed user, address by);
event LogUserRemoved(address indexed user, address by);
event LogImplChanged(address indexed newImpl, address indexed oldImpl);
modifier initialized() {
}
modifier notInitialized() {
}
modifier userExists(address _user) {
}
modifier userDoesNotExist(address _user) {
}
modifier onlyAdmin() {
}
modifier onlyHandler(){
}
function init(address _user, address _config)
public
notInitialized
{
}
function getAllUsers() public view returns (address[]) {
}
function balanceFor(address _token) public view returns (uint _balance){
}
function transferBySystem
(
address _token,
address _to,
uint _value
)
external
onlyHandler
note
initialized
{
}
function transferByUser
(
address _token,
address _to,
uint _value,
uint _salt,
bytes _signature
)
external
addressValid(_to)
note
initialized
onlyAdmin
{
bytes32 actionHash = _getTransferActionHash(_token, _to, _value, _salt);
if(actionCompleted[actionHash]) {
emit LogError("Account::transferByUser", "ACTION_ALREADY_PERFORMED");
return;
}
if(ERC20(_token).balanceOf(this) < _value){
emit LogError("Account::transferByUser", "INSUFFICIENT_BALANCE_IN_ACCOUNT");
return;
}
address signer = _recoverSigner(actionHash, _signature);
if(!isUser[signer]) {
emit LogError("Account::transferByUser", "SIGNER_NOT_AUTHORIZED_WITH_ACCOUNT");
return;
}
actionCompleted[actionHash] = true;
if (_token == address(weth9)) {
weth9.withdraw(_value);
_to.transfer(_value);
} else {
require(<FILL_ME>)
}
emit LogTransferByUser(_token, _to, _value, signer);
}
function addUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
addressValid(_user)
userDoesNotExist(_user)
initialized
onlyAdmin
{
}
function removeUser
(
address _user,
uint _salt,
bytes _signature
)
external
note
userExists(_user)
initialized
onlyAdmin
{
}
function _getTransferActionHash
(
address _token,
address _to,
uint _value,
uint _salt
)
internal
view
returns (bytes32)
{
}
function _getUserActionHash
(
address _user,
string _action,
uint _salt
)
internal
view
returns (bytes32)
{
}
// to directly send ether to contract
function() external payable {
}
function changeImpl
(
address _to,
uint _salt,
bytes _signature
)
external
note
addressValid(_to)
initialized
onlyAdmin
{
}
}
contract AccountFactory is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccount;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
constructor
(
Config _config,
address _accountMaster
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function newAccount(address _user)
public
note
onlyAdmin
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) public note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
}
contract AccountFactoryV2 is DSStop, Utils {
Config public config;
mapping (address => bool) public isAccountValid;
mapping (address => address[]) public userToAccounts;
address[] public accounts;
address public accountMaster;
AccountFactory accountFactoryV1;
constructor
(
Config _config,
address _accountMaster,
AccountFactory _accountFactoryV1
)
public
{
}
event LogAccountCreated(address indexed user, address indexed account, address by);
modifier onlyAdmin() {
}
function setConfig(Config _config) external note auth addressValid(_config) {
}
function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {
}
function setAccountFactoryV1(AccountFactory _accountFactoryV1) external note auth addressValid(_accountFactoryV1) {
}
function newAccount(address _user)
public
note
addressValid(config)
addressValid(accountMaster)
whenNotStopped
returns
(
Account _account
)
{
}
function batchNewAccount(address[] _users) external note onlyAdmin {
}
function getAllAccounts() public view returns (address[]) {
}
function getAccountsForUser(address _user) public view returns (address[]) {
}
function isAccount(address _account) public view returns (bool) {
}
}
| ERC20(_token).transfer(_to,_value),"Account::transferByUser TOKEN_TRANSFER_FAILED" | 308,548 | ERC20(_token).transfer(_to,_value) |
"Max mints reached" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract Trophy is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIds;
uint256 public constant MAX_SUPPLY = 476;
string public uri;
string public provenance;
event SetBaseURI(string baseUri);
event SetProvenance(string provenance);
event Minted(address indexed user, uint256 entries);
constructor(string memory _nftName, string memory _nftSymbol)
ERC721(_nftName, _nftSymbol)
{}
function setBaseURI(string calldata _uri) public onlyOwner {
}
function setProvenance(string calldata _provenance) public onlyOwner {
}
function mint(uint256 numOfTokens) external nonReentrant onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < numOfTokens; i++) {
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
}
emit Minted(msg.sender, numOfTokens);
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _tokenIds.current()+numOfTokens<=MAX_SUPPLY,"Max mints reached" | 308,675 | _tokenIds.current()+numOfTokens<=MAX_SUPPLY |
"exceeds max supply" | // SPDX-License-Identifier: MIT AND GPL-3.0
pragma solidity ^0.8.0;
import './ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
interface IStateTunnel {
function sendTransferMessage(bytes calldata _data) external;
}
contract FoundingMetaStore is ERC721A, Ownable {
using Strings for uint256;
uint256 public publicSalePrice = 0.188 ether;
uint256 public publicSaleTime;
uint256 public preSalePrice = 0.168 ether;
uint256 public preSaleTime;
uint256 public teamReverseMinted = 0;
uint256 public maxTeamReverseNum = 100;
uint256 public maxTotalSupply = 100;
uint256 public maxMintAmount = 20;
string public baseURI;
string public baseExtension = ".json";
bool public paused = false;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
uint256 public nftPerAddressLimit = 1;
bool private isStateTunnelEnabled = false;
IStateTunnel private stateTunnel;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
function _startTokenId() internal pure override returns (uint256) {
}
function currentIndex() public view returns (uint256) {
}
modifier mintValidate(uint256 _mintAmount) {
require(!paused, "the contract is paused");
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(tx.origin == msg.sender, "contracts not allowed");
require(<FILL_ME>)
_;
}
function teamReserveMint(uint256 _mintAmount) public mintValidate(_mintAmount) onlyOwner {
}
function preSaleMint(uint256 _mintAmount, bytes32[] calldata proof_) public mintValidate(_mintAmount) payable {
}
function publicMint(uint256 _mintAmount) public mintValidate(_mintAmount) payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
// allowlist
bytes32 private merkleRoot;
function checkAllowlist(bytes32[] calldata proof)
public
view
returns (bool)
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
//only owner
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPreSalePrice(uint256 _newPreSalePrice) public onlyOwner {
}
function setPublicSalePrice(uint256 _newPublicSalePrice) public onlyOwner {
}
function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setPause(bool _state) public onlyOwner {
}
function setIsPreSaleActive(bool _state) public onlyOwner {
}
function setIsPublicSaleActive(bool _state) public onlyOwner {
}
function setPublicSaleTime(uint256 _publicSaleTime) external onlyOwner {
}
function setPreSaleTime(uint256 _preSaleTime) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function setStateTunnel(address _stateTunnel) public onlyOwner {
}
function setStateTunnelEnabled(bool _enabled) public onlyOwner {
}
}
| totalSupply()+_mintAmount<=maxTotalSupply,"exceeds max supply" | 308,789 | totalSupply()+_mintAmount<=maxTotalSupply |
'exceeds max team reversed NFTs' | // SPDX-License-Identifier: MIT AND GPL-3.0
pragma solidity ^0.8.0;
import './ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
interface IStateTunnel {
function sendTransferMessage(bytes calldata _data) external;
}
contract FoundingMetaStore is ERC721A, Ownable {
using Strings for uint256;
uint256 public publicSalePrice = 0.188 ether;
uint256 public publicSaleTime;
uint256 public preSalePrice = 0.168 ether;
uint256 public preSaleTime;
uint256 public teamReverseMinted = 0;
uint256 public maxTeamReverseNum = 100;
uint256 public maxTotalSupply = 100;
uint256 public maxMintAmount = 20;
string public baseURI;
string public baseExtension = ".json";
bool public paused = false;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
uint256 public nftPerAddressLimit = 1;
bool private isStateTunnelEnabled = false;
IStateTunnel private stateTunnel;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
function _startTokenId() internal pure override returns (uint256) {
}
function currentIndex() public view returns (uint256) {
}
modifier mintValidate(uint256 _mintAmount) {
}
function teamReserveMint(uint256 _mintAmount) public mintValidate(_mintAmount) onlyOwner {
require(<FILL_ME>)
_safeMint(owner(), _mintAmount);
teamReverseMinted += _mintAmount;
}
function preSaleMint(uint256 _mintAmount, bytes32[] calldata proof_) public mintValidate(_mintAmount) payable {
}
function publicMint(uint256 _mintAmount) public mintValidate(_mintAmount) payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
// allowlist
bytes32 private merkleRoot;
function checkAllowlist(bytes32[] calldata proof)
public
view
returns (bool)
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
//only owner
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPreSalePrice(uint256 _newPreSalePrice) public onlyOwner {
}
function setPublicSalePrice(uint256 _newPublicSalePrice) public onlyOwner {
}
function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setPause(bool _state) public onlyOwner {
}
function setIsPreSaleActive(bool _state) public onlyOwner {
}
function setIsPublicSaleActive(bool _state) public onlyOwner {
}
function setPublicSaleTime(uint256 _publicSaleTime) external onlyOwner {
}
function setPreSaleTime(uint256 _preSaleTime) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function setStateTunnel(address _stateTunnel) public onlyOwner {
}
function setStateTunnelEnabled(bool _enabled) public onlyOwner {
}
}
| teamReverseMinted+_mintAmount<=maxTeamReverseNum,'exceeds max team reversed NFTs' | 308,789 | teamReverseMinted+_mintAmount<=maxTeamReverseNum |
'address is not on the whitelist' | // SPDX-License-Identifier: MIT AND GPL-3.0
pragma solidity ^0.8.0;
import './ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
interface IStateTunnel {
function sendTransferMessage(bytes calldata _data) external;
}
contract FoundingMetaStore is ERC721A, Ownable {
using Strings for uint256;
uint256 public publicSalePrice = 0.188 ether;
uint256 public publicSaleTime;
uint256 public preSalePrice = 0.168 ether;
uint256 public preSaleTime;
uint256 public teamReverseMinted = 0;
uint256 public maxTeamReverseNum = 100;
uint256 public maxTotalSupply = 100;
uint256 public maxMintAmount = 20;
string public baseURI;
string public baseExtension = ".json";
bool public paused = false;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
uint256 public nftPerAddressLimit = 1;
bool private isStateTunnelEnabled = false;
IStateTunnel private stateTunnel;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
function _startTokenId() internal pure override returns (uint256) {
}
function currentIndex() public view returns (uint256) {
}
modifier mintValidate(uint256 _mintAmount) {
}
function teamReserveMint(uint256 _mintAmount) public mintValidate(_mintAmount) onlyOwner {
}
function preSaleMint(uint256 _mintAmount, bytes32[] calldata proof_) public mintValidate(_mintAmount) payable {
require(isPreSaleActive, "minting not enabled");
require(<FILL_ME>)
require(
_numberMinted(msg.sender) + _mintAmount <= nftPerAddressLimit,
'exceeds max available NFTs per address'
);
require(block.timestamp >= preSaleTime, 'It is not pre-sale time');
require(msg.value == preSalePrice * _mintAmount, "wrong payment amount");
_safeMint(msg.sender, _mintAmount);
}
function publicMint(uint256 _mintAmount) public mintValidate(_mintAmount) payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
// allowlist
bytes32 private merkleRoot;
function checkAllowlist(bytes32[] calldata proof)
public
view
returns (bool)
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
//only owner
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPreSalePrice(uint256 _newPreSalePrice) public onlyOwner {
}
function setPublicSalePrice(uint256 _newPublicSalePrice) public onlyOwner {
}
function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setPause(bool _state) public onlyOwner {
}
function setIsPreSaleActive(bool _state) public onlyOwner {
}
function setIsPublicSaleActive(bool _state) public onlyOwner {
}
function setPublicSaleTime(uint256 _publicSaleTime) external onlyOwner {
}
function setPreSaleTime(uint256 _preSaleTime) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function setStateTunnel(address _stateTunnel) public onlyOwner {
}
function setStateTunnelEnabled(bool _enabled) public onlyOwner {
}
}
| checkAllowlist(proof_),'address is not on the whitelist' | 308,789 | checkAllowlist(proof_) |
'exceeds max available NFTs per address' | // SPDX-License-Identifier: MIT AND GPL-3.0
pragma solidity ^0.8.0;
import './ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
interface IStateTunnel {
function sendTransferMessage(bytes calldata _data) external;
}
contract FoundingMetaStore is ERC721A, Ownable {
using Strings for uint256;
uint256 public publicSalePrice = 0.188 ether;
uint256 public publicSaleTime;
uint256 public preSalePrice = 0.168 ether;
uint256 public preSaleTime;
uint256 public teamReverseMinted = 0;
uint256 public maxTeamReverseNum = 100;
uint256 public maxTotalSupply = 100;
uint256 public maxMintAmount = 20;
string public baseURI;
string public baseExtension = ".json";
bool public paused = false;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
uint256 public nftPerAddressLimit = 1;
bool private isStateTunnelEnabled = false;
IStateTunnel private stateTunnel;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
function _startTokenId() internal pure override returns (uint256) {
}
function currentIndex() public view returns (uint256) {
}
modifier mintValidate(uint256 _mintAmount) {
}
function teamReserveMint(uint256 _mintAmount) public mintValidate(_mintAmount) onlyOwner {
}
function preSaleMint(uint256 _mintAmount, bytes32[] calldata proof_) public mintValidate(_mintAmount) payable {
require(isPreSaleActive, "minting not enabled");
require(checkAllowlist(proof_), 'address is not on the whitelist');
require(<FILL_ME>)
require(block.timestamp >= preSaleTime, 'It is not pre-sale time');
require(msg.value == preSalePrice * _mintAmount, "wrong payment amount");
_safeMint(msg.sender, _mintAmount);
}
function publicMint(uint256 _mintAmount) public mintValidate(_mintAmount) payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
// allowlist
bytes32 private merkleRoot;
function checkAllowlist(bytes32[] calldata proof)
public
view
returns (bool)
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
//only owner
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPreSalePrice(uint256 _newPreSalePrice) public onlyOwner {
}
function setPublicSalePrice(uint256 _newPublicSalePrice) public onlyOwner {
}
function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setPause(bool _state) public onlyOwner {
}
function setIsPreSaleActive(bool _state) public onlyOwner {
}
function setIsPublicSaleActive(bool _state) public onlyOwner {
}
function setPublicSaleTime(uint256 _publicSaleTime) external onlyOwner {
}
function setPreSaleTime(uint256 _preSaleTime) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function setStateTunnel(address _stateTunnel) public onlyOwner {
}
function setStateTunnelEnabled(bool _enabled) public onlyOwner {
}
}
| _numberMinted(msg.sender)+_mintAmount<=nftPerAddressLimit,'exceeds max available NFTs per address' | 308,789 | _numberMinted(msg.sender)+_mintAmount<=nftPerAddressLimit |
"NON_UNIQUE_COMMITTEE_MEMBERS" | /*
Copyright 2019,2020 StarkWare Industries Ltd.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.starkware.co/open-source-license/
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions
and limitations under the License.
*/
// Solidity 0.5.4 has this bug: https://github.com/ethereum/solidity/issues/5997
// It's already fixed: https://github.com/ethereum/solidity/pull/6000 and will be released in 0.5.5.
pragma solidity ^0.5.2;
import "FactRegistry.sol";
import "Identity.sol";
contract Committee is FactRegistry, Identity {
uint256 constant SIGNATURE_LENGTH = 32 * 2 + 1; // r(32) + s(32) + v(1).
uint256 public signaturesRequired;
mapping (address => bool) public isMember;
/// @dev Contract constructor sets initial members and required number of signatures.
/// @param committeeMembers List of committee members.
/// @param numSignaturesRequired Number of required signatures.
constructor (address[] memory committeeMembers, uint256 numSignaturesRequired)
public
{
require(numSignaturesRequired <= committeeMembers.length, "TOO_MANY_REQUIRED_SIGNATURES");
for (uint256 idx = 0; idx < committeeMembers.length; idx++) {
require(<FILL_ME>)
isMember[committeeMembers[idx]] = true;
}
signaturesRequired = numSignaturesRequired;
}
function identify()
external pure
returns(string memory)
{
}
/// @dev Verifies the availability proof. Reverts if invalid.
/// An availability proof should have a form of a concatenation of ec-signatures by signatories.
/// Signatures should be sorted by signatory address ascendingly.
/// Signatures should be 65 bytes long. r(32) + s(32) + v(1).
/// There should be at least the number of required signatures as defined in this contract
/// and all signatures provided should be from signatories.
///
/// See :sol:mod:`AvailabilityVerifiers` for more information on when this is used.
///
/// @param claimHash The hash of the claim the committee is signing on.
/// The format is keccak256(abi.encodePacked(
/// newVaultRoot, vaultTreeHeight, newOrderRoot, orderTreeHeight sequenceNumber))
/// @param availabilityProofs Concatenated ec signatures by committee members.
function verifyAvailabilityProof(
bytes32 claimHash,
bytes calldata availabilityProofs
)
external
{
}
function bytesToBytes32(bytes memory array, uint256 offset)
private pure
returns (bytes32 result) {
}
}
| isMember[committeeMembers[idx]]==false,"NON_UNIQUE_COMMITTEE_MEMBERS" | 308,830 | isMember[committeeMembers[idx]]==false |
"AVAILABILITY_PROVER_NOT_IN_COMMITTEE" | /*
Copyright 2019,2020 StarkWare Industries Ltd.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.starkware.co/open-source-license/
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions
and limitations under the License.
*/
// Solidity 0.5.4 has this bug: https://github.com/ethereum/solidity/issues/5997
// It's already fixed: https://github.com/ethereum/solidity/pull/6000 and will be released in 0.5.5.
pragma solidity ^0.5.2;
import "FactRegistry.sol";
import "Identity.sol";
contract Committee is FactRegistry, Identity {
uint256 constant SIGNATURE_LENGTH = 32 * 2 + 1; // r(32) + s(32) + v(1).
uint256 public signaturesRequired;
mapping (address => bool) public isMember;
/// @dev Contract constructor sets initial members and required number of signatures.
/// @param committeeMembers List of committee members.
/// @param numSignaturesRequired Number of required signatures.
constructor (address[] memory committeeMembers, uint256 numSignaturesRequired)
public
{
}
function identify()
external pure
returns(string memory)
{
}
/// @dev Verifies the availability proof. Reverts if invalid.
/// An availability proof should have a form of a concatenation of ec-signatures by signatories.
/// Signatures should be sorted by signatory address ascendingly.
/// Signatures should be 65 bytes long. r(32) + s(32) + v(1).
/// There should be at least the number of required signatures as defined in this contract
/// and all signatures provided should be from signatories.
///
/// See :sol:mod:`AvailabilityVerifiers` for more information on when this is used.
///
/// @param claimHash The hash of the claim the committee is signing on.
/// The format is keccak256(abi.encodePacked(
/// newVaultRoot, vaultTreeHeight, newOrderRoot, orderTreeHeight sequenceNumber))
/// @param availabilityProofs Concatenated ec signatures by committee members.
function verifyAvailabilityProof(
bytes32 claimHash,
bytes calldata availabilityProofs
)
external
{
require(
availabilityProofs.length >= signaturesRequired * SIGNATURE_LENGTH,
"INVALID_AVAILABILITY_PROOF_LENGTH");
uint256 offset = 0;
address prevRecoveredAddress = address(0);
for (uint256 proofIdx = 0; proofIdx < signaturesRequired; proofIdx++) {
bytes32 r = bytesToBytes32(availabilityProofs, offset);
bytes32 s = bytesToBytes32(availabilityProofs, offset + 32);
uint8 v = uint8(availabilityProofs[offset + 64]);
offset += SIGNATURE_LENGTH;
address recovered = ecrecover(
claimHash,
v,
r,
s
);
// Signatures should be sorted off-chain before submitting to enable cheap uniqueness
// check on-chain.
require(<FILL_ME>)
require(recovered > prevRecoveredAddress, "NON_SORTED_SIGNATURES");
prevRecoveredAddress = recovered;
}
registerFact(claimHash);
}
function bytesToBytes32(bytes memory array, uint256 offset)
private pure
returns (bytes32 result) {
}
}
| isMember[recovered],"AVAILABILITY_PROVER_NOT_IN_COMMITTEE" | 308,830 | isMember[recovered] |
null | pragma solidity ^0.5.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol";
import "@openzeppelin/contracts/ownership/Ownable.sol";
contract AdonxToken is ERC20, ERC20Detailed, Ownable {
address public releaseAgent;
/** If false we are are in transfer lock up period.*/
bool public released = false;
/** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */
mapping(address => bool) public transferAgents;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals,
uint256 _supply
) public ERC20Detailed(_name, _symbol, _decimals) {
}
/**
* Limit token transfer until the crowdsale is over.
*
*/
modifier canTransfer(address _sender) {
if (!released) {
require(<FILL_ME>)
}
_;
}
/** The function can be called only before or after the tokens have been releasesd */
modifier inReleaseState(bool releaseState) {
}
/** The function can be called only by a whitelisted release agent. */
modifier onlyReleaseAgent() {
}
/**
* Set the contract that can call release and make the token transferable.
*
* Design choice. Allow reset the release agent to fix fat finger mistakes.
*/
function setReleaseAgent(address addr)
public
onlyOwner
inReleaseState(false)
{
}
/**
* Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.
*/
function setTransferAgent(address addr, bool state)
public
onlyOwner
inReleaseState(false)
{
}
/**
* One way function to release the tokens to the wild.
*
* Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).
*/
function releaseTokenTransfer() public onlyReleaseAgent {
}
function transfer(address _to, uint256 _value)
public
canTransfer(msg.sender)
returns (bool success)
{
}
function transferFrom(
address _from,
address _to,
uint256 _value
) public canTransfer(_from) returns (bool success) {
}
}
| transferAgents[_sender]==true | 308,923 | transferAgents[_sender]==true |
null | pragma solidity ^0.4.25;
contract FalconSwap {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
}
// only people with profits
modifier onlyStronghands() {
}
modifier checkExchangeOpen(uint256 _amountOfEthereum){
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "Falcon Token";
string public symbol = "FAL";
uint8 constant public decimals = 18;
uint8 constant internal buyFee_ = 10;
uint8 constant internal sellFee_ = 10;
uint8 constant internal transferFee_ = 10;
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
uint256 private devPool = 0;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
uint256 public stakingRequirement = 50 ether;
uint256 public playerCount_;
uint256 public totalVolume = 0;
uint256 public totalDividends = 0;
uint256 public checkinCount = 0;
address internal devAddress_;
/*================================
= DATASETS =
================================*/
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => bool) public players_;
mapping(address => uint256) public totalDeposit_;
mapping(address => uint256) public totalWithdraw_;
bool public exchangeClosed = true;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
constructor()
public
{
}
function dailyCheckin()
public
{
}
/**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
/**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyStronghands()
public
{
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyStronghands()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlyBagholders()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlyBagholders()
public
returns(bool)
{
// setup
address _customerAddress = msg.sender;
require(<FILL_ME>)
if(myDividends(true) > 0) withdraw();
uint256 _tokenFee = SafeMath.div(_amountOfTokens, transferFee_);
uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee);
uint256 _dividends = tokensToEthereum_(_tokenFee);
totalDividends = SafeMath.add(totalDividends,_dividends);
// burn the fee tokens
tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee);
// exchange tokens
tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens);
tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens);
// update dividend trackers
payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens);
payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens);
// disperse dividends among holders
profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);
// fire event
emit Transfer(_customerAddress, _toAddress, _taxedTokens);
// ERC20
return true;
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
function disableInitialStage()
public
{
}
function setStakingRequirement(uint256 _amountOfTokens)
public
{
}
function withdrawDevFee()
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function getContractData() public view returns(uint256, uint256, uint256,uint256, uint256, uint256){
}
function getPlayerData() public view returns(uint256, uint256, uint256,uint256, uint256){
}
function checkDevPool ()
public
view
returns(uint)
{
}
function totalEthereumBalance()
public
view
returns(uint)
{
}
function isOwner()
public
view
returns(bool)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
*/
function myDividends(bool _includeReferralBonus)
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(uint256 _incomingEthereum, address _referredBy)
checkExchangeOpen(_incomingEthereum)
internal
returns(uint256)
{
}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
function priceAfterSell(uint256 amount)
public
view
returns(uint256)
{
}
//This is where all your gas goes, sorry
//Not sorry, you probably only paid 1 gwei
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @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) {
}
}
| !exchangeClosed&&_amountOfTokens<=tokenBalanceLedger_[_customerAddress] | 308,979 | !exchangeClosed&&_amountOfTokens<=tokenBalanceLedger_[_customerAddress] |
"Affiliate not allowed" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract ERC20 {
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
}
contract V00_Marketplace is Ownable {
/**
* @notice All events have the same indexed signature offsets for easy filtering
*/
event MarketplaceData (address indexed party, bytes32 ipfsHash);
event AffiliateAdded (address indexed party, bytes32 ipfsHash);
event AffiliateRemoved (address indexed party, bytes32 ipfsHash);
event ListingCreated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingUpdated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingWithdrawn (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingArbitrated(address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingData (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event OfferCreated (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferAccepted (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFinalized (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferWithdrawn (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFundsAdded (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferDisputed (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferRuling (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash, uint ruling);
event OfferData (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
struct Listing {
address seller; // Seller wallet / identity contract / other contract
uint deposit; // Deposit in Origin Token
address depositManager; // Address that decides token distribution
}
struct Offer {
uint value; // Amount in Eth or ERC20 buyer is offering
uint commission; // Amount of commission earned if offer is finalized
uint refund; // Amount to refund buyer upon finalization
ERC20 currency; // Currency of listing
address buyer; // Buyer wallet / identity contract / other contract
address affiliate; // Address to send any commission
address arbitrator; // Address that settles disputes
uint finalizes; // Timestamp offer finalizes
uint8 status; // 0: Undefined, 1: Created, 2: Accepted, 3: Disputed
}
Listing[] public listings;
mapping(uint => Offer[]) public offers; // listingID => Offers
mapping(address => bool) public allowedAffiliates;
ERC20 public tokenAddr; // Origin Token address
constructor(address _tokenAddr) public {
}
// @dev Return the total number of listings
function totalListings() public view returns (uint) {
}
// @dev Return the total number of offers
function totalOffers(uint listingID) public view returns (uint) {
}
// @dev Seller creates listing
function createListing(bytes32 _ipfsHash, uint _deposit, address _depositManager)
public
{
}
// @dev Can only be called by token
function createListingWithSender(
address _seller,
bytes32 _ipfsHash,
uint _deposit,
address _depositManager
)
public returns (bool)
{
}
// Private
function _createListing(
address _seller,
bytes32 _ipfsHash, // IPFS JSON with details, pricing, availability
uint _deposit, // Deposit in Origin Token
address _depositManager // Address of listing depositManager
)
private
{
}
// @dev Seller updates listing
function updateListing(
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
) public {
}
function updateListingWithSender(
address _seller,
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
)
public returns (bool)
{
}
function _updateListing(
address _seller,
uint listingID,
bytes32 _ipfsHash, // Updated IPFS hash
uint _additionalDeposit // Additional deposit to add
) private {
}
// @dev Listing depositManager withdraws listing. IPFS hash contains reason for withdrawl.
function withdrawListing(uint listingID, address _target, bytes32 _ipfsHash) public {
}
// @dev Buyer makes offer.
function makeOffer(
uint listingID,
bytes32 _ipfsHash, // IPFS hash containing offer data
uint _finalizes, // Timestamp an accepted offer will finalize
address _affiliate, // Address to send any required commission to
uint256 _commission, // Amount of commission to send in Origin Token if offer finalizes
uint _value, // Offer amount in ERC20 or Eth
ERC20 _currency, // ERC20 token address or 0x0 for Eth
address _arbitrator // Escrow arbitrator
)
public
payable
{
bool affiliateWhitelistDisabled = allowedAffiliates[address(this)];
require(<FILL_ME>)
if (_affiliate == 0x0) {
// Avoid commission tokens being trapped in marketplace contract.
require(_commission == 0, "commission requires affiliate");
}
offers[listingID].push(Offer({
status: 1,
buyer: msg.sender,
finalizes: _finalizes,
affiliate: _affiliate,
commission: _commission,
currency: _currency,
value: _value,
arbitrator: _arbitrator,
refund: 0
}));
if (address(_currency) == 0x0) { // Listing is in ETH
require(msg.value == _value, "ETH value doesn't match offer");
} else { // Listing is in ERC20
require(msg.value == 0, "ETH would be lost");
require(
_currency.transferFrom(msg.sender, this, _value),
"transferFrom failed"
);
}
emit OfferCreated(msg.sender, listingID, offers[listingID].length-1, _ipfsHash);
}
// @dev Make new offer after withdrawl
function makeOffer(
uint listingID,
bytes32 _ipfsHash,
uint _finalizes,
address _affiliate,
uint256 _commission,
uint _value,
ERC20 _currency,
address _arbitrator,
uint _withdrawOfferID
)
public
payable
{
}
// @dev Seller accepts offer
function acceptOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer withdraws offer. IPFS hash contains reason for withdrawl.
function withdrawOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer adds extra funds to an accepted offer.
function addFunds(uint listingID, uint offerID, bytes32 _ipfsHash, uint _value) public payable {
}
// @dev Buyer must finalize transaction to receive commission
function finalize(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer or seller can dispute transaction during finalization window
function dispute(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Called by arbitrator
function executeRuling(
uint listingID,
uint offerID,
bytes32 _ipfsHash,
uint _ruling, // 0: Seller, 1: Buyer, 2: Com + Seller, 3: Com + Buyer
uint _refund
) public {
}
// @dev Sets the amount that a seller wants to refund to a buyer.
function updateRefund(uint listingID, uint offerID, uint _refund, bytes32 _ipfsHash) public {
}
// @dev Refunds buyer in ETH or ERC20 - used by 1) executeRuling() and 2) to allow a seller to refund a purchase
function refundBuyer(uint listingID, uint offerID) private {
}
// @dev Pay seller in ETH or ERC20
function paySeller(uint listingID, uint offerID) private {
}
// @dev Pay commission to affiliate
function payCommission(uint listingID, uint offerID) private {
}
// @dev Associate ipfs data with the marketplace
function addData(bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with a listing
function addData(uint listingID, bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with an offer
function addData(uint listingID, uint offerID, bytes32 ipfsHash) public {
}
// @dev Allow listing depositManager to send deposit
function sendDeposit(uint listingID, address target, uint value, bytes32 ipfsHash) public {
}
// @dev Set the address of the Origin token contract
function setTokenAddr(address _tokenAddr) public onlyOwner {
}
// @dev Add affiliate to whitelist. Set to address(this) to disable.
function addAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
// @dev Remove affiliate from whitelist.
function removeAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
}
| affiliateWhitelistDisabled||allowedAffiliates[_affiliate],"Affiliate not allowed" | 308,997 | affiliateWhitelistDisabled||allowedAffiliates[_affiliate] |
"transferFrom failed" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract ERC20 {
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
}
contract V00_Marketplace is Ownable {
/**
* @notice All events have the same indexed signature offsets for easy filtering
*/
event MarketplaceData (address indexed party, bytes32 ipfsHash);
event AffiliateAdded (address indexed party, bytes32 ipfsHash);
event AffiliateRemoved (address indexed party, bytes32 ipfsHash);
event ListingCreated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingUpdated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingWithdrawn (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingArbitrated(address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingData (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event OfferCreated (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferAccepted (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFinalized (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferWithdrawn (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFundsAdded (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferDisputed (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferRuling (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash, uint ruling);
event OfferData (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
struct Listing {
address seller; // Seller wallet / identity contract / other contract
uint deposit; // Deposit in Origin Token
address depositManager; // Address that decides token distribution
}
struct Offer {
uint value; // Amount in Eth or ERC20 buyer is offering
uint commission; // Amount of commission earned if offer is finalized
uint refund; // Amount to refund buyer upon finalization
ERC20 currency; // Currency of listing
address buyer; // Buyer wallet / identity contract / other contract
address affiliate; // Address to send any commission
address arbitrator; // Address that settles disputes
uint finalizes; // Timestamp offer finalizes
uint8 status; // 0: Undefined, 1: Created, 2: Accepted, 3: Disputed
}
Listing[] public listings;
mapping(uint => Offer[]) public offers; // listingID => Offers
mapping(address => bool) public allowedAffiliates;
ERC20 public tokenAddr; // Origin Token address
constructor(address _tokenAddr) public {
}
// @dev Return the total number of listings
function totalListings() public view returns (uint) {
}
// @dev Return the total number of offers
function totalOffers(uint listingID) public view returns (uint) {
}
// @dev Seller creates listing
function createListing(bytes32 _ipfsHash, uint _deposit, address _depositManager)
public
{
}
// @dev Can only be called by token
function createListingWithSender(
address _seller,
bytes32 _ipfsHash,
uint _deposit,
address _depositManager
)
public returns (bool)
{
}
// Private
function _createListing(
address _seller,
bytes32 _ipfsHash, // IPFS JSON with details, pricing, availability
uint _deposit, // Deposit in Origin Token
address _depositManager // Address of listing depositManager
)
private
{
}
// @dev Seller updates listing
function updateListing(
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
) public {
}
function updateListingWithSender(
address _seller,
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
)
public returns (bool)
{
}
function _updateListing(
address _seller,
uint listingID,
bytes32 _ipfsHash, // Updated IPFS hash
uint _additionalDeposit // Additional deposit to add
) private {
}
// @dev Listing depositManager withdraws listing. IPFS hash contains reason for withdrawl.
function withdrawListing(uint listingID, address _target, bytes32 _ipfsHash) public {
}
// @dev Buyer makes offer.
function makeOffer(
uint listingID,
bytes32 _ipfsHash, // IPFS hash containing offer data
uint _finalizes, // Timestamp an accepted offer will finalize
address _affiliate, // Address to send any required commission to
uint256 _commission, // Amount of commission to send in Origin Token if offer finalizes
uint _value, // Offer amount in ERC20 or Eth
ERC20 _currency, // ERC20 token address or 0x0 for Eth
address _arbitrator // Escrow arbitrator
)
public
payable
{
bool affiliateWhitelistDisabled = allowedAffiliates[address(this)];
require(
affiliateWhitelistDisabled || allowedAffiliates[_affiliate],
"Affiliate not allowed"
);
if (_affiliate == 0x0) {
// Avoid commission tokens being trapped in marketplace contract.
require(_commission == 0, "commission requires affiliate");
}
offers[listingID].push(Offer({
status: 1,
buyer: msg.sender,
finalizes: _finalizes,
affiliate: _affiliate,
commission: _commission,
currency: _currency,
value: _value,
arbitrator: _arbitrator,
refund: 0
}));
if (address(_currency) == 0x0) { // Listing is in ETH
require(msg.value == _value, "ETH value doesn't match offer");
} else { // Listing is in ERC20
require(msg.value == 0, "ETH would be lost");
require(<FILL_ME>)
}
emit OfferCreated(msg.sender, listingID, offers[listingID].length-1, _ipfsHash);
}
// @dev Make new offer after withdrawl
function makeOffer(
uint listingID,
bytes32 _ipfsHash,
uint _finalizes,
address _affiliate,
uint256 _commission,
uint _value,
ERC20 _currency,
address _arbitrator,
uint _withdrawOfferID
)
public
payable
{
}
// @dev Seller accepts offer
function acceptOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer withdraws offer. IPFS hash contains reason for withdrawl.
function withdrawOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer adds extra funds to an accepted offer.
function addFunds(uint listingID, uint offerID, bytes32 _ipfsHash, uint _value) public payable {
}
// @dev Buyer must finalize transaction to receive commission
function finalize(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer or seller can dispute transaction during finalization window
function dispute(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Called by arbitrator
function executeRuling(
uint listingID,
uint offerID,
bytes32 _ipfsHash,
uint _ruling, // 0: Seller, 1: Buyer, 2: Com + Seller, 3: Com + Buyer
uint _refund
) public {
}
// @dev Sets the amount that a seller wants to refund to a buyer.
function updateRefund(uint listingID, uint offerID, uint _refund, bytes32 _ipfsHash) public {
}
// @dev Refunds buyer in ETH or ERC20 - used by 1) executeRuling() and 2) to allow a seller to refund a purchase
function refundBuyer(uint listingID, uint offerID) private {
}
// @dev Pay seller in ETH or ERC20
function paySeller(uint listingID, uint offerID) private {
}
// @dev Pay commission to affiliate
function payCommission(uint listingID, uint offerID) private {
}
// @dev Associate ipfs data with the marketplace
function addData(bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with a listing
function addData(uint listingID, bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with an offer
function addData(uint listingID, uint offerID, bytes32 ipfsHash) public {
}
// @dev Allow listing depositManager to send deposit
function sendDeposit(uint listingID, address target, uint value, bytes32 ipfsHash) public {
}
// @dev Set the address of the Origin token contract
function setTokenAddr(address _tokenAddr) public onlyOwner {
}
// @dev Add affiliate to whitelist. Set to address(this) to disable.
function addAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
// @dev Remove affiliate from whitelist.
function removeAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
}
| _currency.transferFrom(msg.sender,this,_value),"transferFrom failed" | 308,997 | _currency.transferFrom(msg.sender,this,_value) |
"transferFrom failed" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract ERC20 {
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
}
contract V00_Marketplace is Ownable {
/**
* @notice All events have the same indexed signature offsets for easy filtering
*/
event MarketplaceData (address indexed party, bytes32 ipfsHash);
event AffiliateAdded (address indexed party, bytes32 ipfsHash);
event AffiliateRemoved (address indexed party, bytes32 ipfsHash);
event ListingCreated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingUpdated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingWithdrawn (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingArbitrated(address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingData (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event OfferCreated (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferAccepted (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFinalized (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferWithdrawn (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFundsAdded (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferDisputed (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferRuling (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash, uint ruling);
event OfferData (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
struct Listing {
address seller; // Seller wallet / identity contract / other contract
uint deposit; // Deposit in Origin Token
address depositManager; // Address that decides token distribution
}
struct Offer {
uint value; // Amount in Eth or ERC20 buyer is offering
uint commission; // Amount of commission earned if offer is finalized
uint refund; // Amount to refund buyer upon finalization
ERC20 currency; // Currency of listing
address buyer; // Buyer wallet / identity contract / other contract
address affiliate; // Address to send any commission
address arbitrator; // Address that settles disputes
uint finalizes; // Timestamp offer finalizes
uint8 status; // 0: Undefined, 1: Created, 2: Accepted, 3: Disputed
}
Listing[] public listings;
mapping(uint => Offer[]) public offers; // listingID => Offers
mapping(address => bool) public allowedAffiliates;
ERC20 public tokenAddr; // Origin Token address
constructor(address _tokenAddr) public {
}
// @dev Return the total number of listings
function totalListings() public view returns (uint) {
}
// @dev Return the total number of offers
function totalOffers(uint listingID) public view returns (uint) {
}
// @dev Seller creates listing
function createListing(bytes32 _ipfsHash, uint _deposit, address _depositManager)
public
{
}
// @dev Can only be called by token
function createListingWithSender(
address _seller,
bytes32 _ipfsHash,
uint _deposit,
address _depositManager
)
public returns (bool)
{
}
// Private
function _createListing(
address _seller,
bytes32 _ipfsHash, // IPFS JSON with details, pricing, availability
uint _deposit, // Deposit in Origin Token
address _depositManager // Address of listing depositManager
)
private
{
}
// @dev Seller updates listing
function updateListing(
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
) public {
}
function updateListingWithSender(
address _seller,
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
)
public returns (bool)
{
}
function _updateListing(
address _seller,
uint listingID,
bytes32 _ipfsHash, // Updated IPFS hash
uint _additionalDeposit // Additional deposit to add
) private {
}
// @dev Listing depositManager withdraws listing. IPFS hash contains reason for withdrawl.
function withdrawListing(uint listingID, address _target, bytes32 _ipfsHash) public {
}
// @dev Buyer makes offer.
function makeOffer(
uint listingID,
bytes32 _ipfsHash, // IPFS hash containing offer data
uint _finalizes, // Timestamp an accepted offer will finalize
address _affiliate, // Address to send any required commission to
uint256 _commission, // Amount of commission to send in Origin Token if offer finalizes
uint _value, // Offer amount in ERC20 or Eth
ERC20 _currency, // ERC20 token address or 0x0 for Eth
address _arbitrator // Escrow arbitrator
)
public
payable
{
}
// @dev Make new offer after withdrawl
function makeOffer(
uint listingID,
bytes32 _ipfsHash,
uint _finalizes,
address _affiliate,
uint256 _commission,
uint _value,
ERC20 _currency,
address _arbitrator,
uint _withdrawOfferID
)
public
payable
{
}
// @dev Seller accepts offer
function acceptOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer withdraws offer. IPFS hash contains reason for withdrawl.
function withdrawOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer adds extra funds to an accepted offer.
function addFunds(uint listingID, uint offerID, bytes32 _ipfsHash, uint _value) public payable {
Offer storage offer = offers[listingID][offerID];
require(msg.sender == offer.buyer, "Buyer must call");
require(offer.status == 2, "status != accepted");
if (address(offer.currency) == 0x0) { // Listing is in ETH
require(
msg.value == _value,
"sent != offered value"
);
} else { // Listing is in ERC20
require(msg.value == 0, "ETH must not be sent");
require(<FILL_ME>)
}
offer.value += _value;
emit OfferFundsAdded(msg.sender, listingID, offerID, _ipfsHash);
}
// @dev Buyer must finalize transaction to receive commission
function finalize(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer or seller can dispute transaction during finalization window
function dispute(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Called by arbitrator
function executeRuling(
uint listingID,
uint offerID,
bytes32 _ipfsHash,
uint _ruling, // 0: Seller, 1: Buyer, 2: Com + Seller, 3: Com + Buyer
uint _refund
) public {
}
// @dev Sets the amount that a seller wants to refund to a buyer.
function updateRefund(uint listingID, uint offerID, uint _refund, bytes32 _ipfsHash) public {
}
// @dev Refunds buyer in ETH or ERC20 - used by 1) executeRuling() and 2) to allow a seller to refund a purchase
function refundBuyer(uint listingID, uint offerID) private {
}
// @dev Pay seller in ETH or ERC20
function paySeller(uint listingID, uint offerID) private {
}
// @dev Pay commission to affiliate
function payCommission(uint listingID, uint offerID) private {
}
// @dev Associate ipfs data with the marketplace
function addData(bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with a listing
function addData(uint listingID, bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with an offer
function addData(uint listingID, uint offerID, bytes32 ipfsHash) public {
}
// @dev Allow listing depositManager to send deposit
function sendDeposit(uint listingID, address target, uint value, bytes32 ipfsHash) public {
}
// @dev Set the address of the Origin token contract
function setTokenAddr(address _tokenAddr) public onlyOwner {
}
// @dev Add affiliate to whitelist. Set to address(this) to disable.
function addAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
// @dev Remove affiliate from whitelist.
function removeAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
}
| offer.currency.transferFrom(msg.sender,this,_value),"transferFrom failed" | 308,997 | offer.currency.transferFrom(msg.sender,this,_value) |
"ETH refund failed" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract ERC20 {
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
}
contract V00_Marketplace is Ownable {
/**
* @notice All events have the same indexed signature offsets for easy filtering
*/
event MarketplaceData (address indexed party, bytes32 ipfsHash);
event AffiliateAdded (address indexed party, bytes32 ipfsHash);
event AffiliateRemoved (address indexed party, bytes32 ipfsHash);
event ListingCreated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingUpdated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingWithdrawn (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingArbitrated(address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingData (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event OfferCreated (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferAccepted (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFinalized (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferWithdrawn (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFundsAdded (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferDisputed (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferRuling (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash, uint ruling);
event OfferData (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
struct Listing {
address seller; // Seller wallet / identity contract / other contract
uint deposit; // Deposit in Origin Token
address depositManager; // Address that decides token distribution
}
struct Offer {
uint value; // Amount in Eth or ERC20 buyer is offering
uint commission; // Amount of commission earned if offer is finalized
uint refund; // Amount to refund buyer upon finalization
ERC20 currency; // Currency of listing
address buyer; // Buyer wallet / identity contract / other contract
address affiliate; // Address to send any commission
address arbitrator; // Address that settles disputes
uint finalizes; // Timestamp offer finalizes
uint8 status; // 0: Undefined, 1: Created, 2: Accepted, 3: Disputed
}
Listing[] public listings;
mapping(uint => Offer[]) public offers; // listingID => Offers
mapping(address => bool) public allowedAffiliates;
ERC20 public tokenAddr; // Origin Token address
constructor(address _tokenAddr) public {
}
// @dev Return the total number of listings
function totalListings() public view returns (uint) {
}
// @dev Return the total number of offers
function totalOffers(uint listingID) public view returns (uint) {
}
// @dev Seller creates listing
function createListing(bytes32 _ipfsHash, uint _deposit, address _depositManager)
public
{
}
// @dev Can only be called by token
function createListingWithSender(
address _seller,
bytes32 _ipfsHash,
uint _deposit,
address _depositManager
)
public returns (bool)
{
}
// Private
function _createListing(
address _seller,
bytes32 _ipfsHash, // IPFS JSON with details, pricing, availability
uint _deposit, // Deposit in Origin Token
address _depositManager // Address of listing depositManager
)
private
{
}
// @dev Seller updates listing
function updateListing(
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
) public {
}
function updateListingWithSender(
address _seller,
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
)
public returns (bool)
{
}
function _updateListing(
address _seller,
uint listingID,
bytes32 _ipfsHash, // Updated IPFS hash
uint _additionalDeposit // Additional deposit to add
) private {
}
// @dev Listing depositManager withdraws listing. IPFS hash contains reason for withdrawl.
function withdrawListing(uint listingID, address _target, bytes32 _ipfsHash) public {
}
// @dev Buyer makes offer.
function makeOffer(
uint listingID,
bytes32 _ipfsHash, // IPFS hash containing offer data
uint _finalizes, // Timestamp an accepted offer will finalize
address _affiliate, // Address to send any required commission to
uint256 _commission, // Amount of commission to send in Origin Token if offer finalizes
uint _value, // Offer amount in ERC20 or Eth
ERC20 _currency, // ERC20 token address or 0x0 for Eth
address _arbitrator // Escrow arbitrator
)
public
payable
{
}
// @dev Make new offer after withdrawl
function makeOffer(
uint listingID,
bytes32 _ipfsHash,
uint _finalizes,
address _affiliate,
uint256 _commission,
uint _value,
ERC20 _currency,
address _arbitrator,
uint _withdrawOfferID
)
public
payable
{
}
// @dev Seller accepts offer
function acceptOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer withdraws offer. IPFS hash contains reason for withdrawl.
function withdrawOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer adds extra funds to an accepted offer.
function addFunds(uint listingID, uint offerID, bytes32 _ipfsHash, uint _value) public payable {
}
// @dev Buyer must finalize transaction to receive commission
function finalize(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer or seller can dispute transaction during finalization window
function dispute(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Called by arbitrator
function executeRuling(
uint listingID,
uint offerID,
bytes32 _ipfsHash,
uint _ruling, // 0: Seller, 1: Buyer, 2: Com + Seller, 3: Com + Buyer
uint _refund
) public {
}
// @dev Sets the amount that a seller wants to refund to a buyer.
function updateRefund(uint listingID, uint offerID, uint _refund, bytes32 _ipfsHash) public {
}
// @dev Refunds buyer in ETH or ERC20 - used by 1) executeRuling() and 2) to allow a seller to refund a purchase
function refundBuyer(uint listingID, uint offerID) private {
Offer storage offer = offers[listingID][offerID];
if (address(offer.currency) == 0x0) {
require(<FILL_ME>)
} else {
require(
offer.currency.transfer(offer.buyer, offer.value),
"Refund failed"
);
}
}
// @dev Pay seller in ETH or ERC20
function paySeller(uint listingID, uint offerID) private {
}
// @dev Pay commission to affiliate
function payCommission(uint listingID, uint offerID) private {
}
// @dev Associate ipfs data with the marketplace
function addData(bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with a listing
function addData(uint listingID, bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with an offer
function addData(uint listingID, uint offerID, bytes32 ipfsHash) public {
}
// @dev Allow listing depositManager to send deposit
function sendDeposit(uint listingID, address target, uint value, bytes32 ipfsHash) public {
}
// @dev Set the address of the Origin token contract
function setTokenAddr(address _tokenAddr) public onlyOwner {
}
// @dev Add affiliate to whitelist. Set to address(this) to disable.
function addAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
// @dev Remove affiliate from whitelist.
function removeAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
}
| offer.buyer.send(offer.value),"ETH refund failed" | 308,997 | offer.buyer.send(offer.value) |
"Refund failed" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract ERC20 {
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
}
contract V00_Marketplace is Ownable {
/**
* @notice All events have the same indexed signature offsets for easy filtering
*/
event MarketplaceData (address indexed party, bytes32 ipfsHash);
event AffiliateAdded (address indexed party, bytes32 ipfsHash);
event AffiliateRemoved (address indexed party, bytes32 ipfsHash);
event ListingCreated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingUpdated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingWithdrawn (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingArbitrated(address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingData (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event OfferCreated (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferAccepted (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFinalized (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferWithdrawn (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFundsAdded (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferDisputed (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferRuling (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash, uint ruling);
event OfferData (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
struct Listing {
address seller; // Seller wallet / identity contract / other contract
uint deposit; // Deposit in Origin Token
address depositManager; // Address that decides token distribution
}
struct Offer {
uint value; // Amount in Eth or ERC20 buyer is offering
uint commission; // Amount of commission earned if offer is finalized
uint refund; // Amount to refund buyer upon finalization
ERC20 currency; // Currency of listing
address buyer; // Buyer wallet / identity contract / other contract
address affiliate; // Address to send any commission
address arbitrator; // Address that settles disputes
uint finalizes; // Timestamp offer finalizes
uint8 status; // 0: Undefined, 1: Created, 2: Accepted, 3: Disputed
}
Listing[] public listings;
mapping(uint => Offer[]) public offers; // listingID => Offers
mapping(address => bool) public allowedAffiliates;
ERC20 public tokenAddr; // Origin Token address
constructor(address _tokenAddr) public {
}
// @dev Return the total number of listings
function totalListings() public view returns (uint) {
}
// @dev Return the total number of offers
function totalOffers(uint listingID) public view returns (uint) {
}
// @dev Seller creates listing
function createListing(bytes32 _ipfsHash, uint _deposit, address _depositManager)
public
{
}
// @dev Can only be called by token
function createListingWithSender(
address _seller,
bytes32 _ipfsHash,
uint _deposit,
address _depositManager
)
public returns (bool)
{
}
// Private
function _createListing(
address _seller,
bytes32 _ipfsHash, // IPFS JSON with details, pricing, availability
uint _deposit, // Deposit in Origin Token
address _depositManager // Address of listing depositManager
)
private
{
}
// @dev Seller updates listing
function updateListing(
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
) public {
}
function updateListingWithSender(
address _seller,
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
)
public returns (bool)
{
}
function _updateListing(
address _seller,
uint listingID,
bytes32 _ipfsHash, // Updated IPFS hash
uint _additionalDeposit // Additional deposit to add
) private {
}
// @dev Listing depositManager withdraws listing. IPFS hash contains reason for withdrawl.
function withdrawListing(uint listingID, address _target, bytes32 _ipfsHash) public {
}
// @dev Buyer makes offer.
function makeOffer(
uint listingID,
bytes32 _ipfsHash, // IPFS hash containing offer data
uint _finalizes, // Timestamp an accepted offer will finalize
address _affiliate, // Address to send any required commission to
uint256 _commission, // Amount of commission to send in Origin Token if offer finalizes
uint _value, // Offer amount in ERC20 or Eth
ERC20 _currency, // ERC20 token address or 0x0 for Eth
address _arbitrator // Escrow arbitrator
)
public
payable
{
}
// @dev Make new offer after withdrawl
function makeOffer(
uint listingID,
bytes32 _ipfsHash,
uint _finalizes,
address _affiliate,
uint256 _commission,
uint _value,
ERC20 _currency,
address _arbitrator,
uint _withdrawOfferID
)
public
payable
{
}
// @dev Seller accepts offer
function acceptOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer withdraws offer. IPFS hash contains reason for withdrawl.
function withdrawOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer adds extra funds to an accepted offer.
function addFunds(uint listingID, uint offerID, bytes32 _ipfsHash, uint _value) public payable {
}
// @dev Buyer must finalize transaction to receive commission
function finalize(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer or seller can dispute transaction during finalization window
function dispute(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Called by arbitrator
function executeRuling(
uint listingID,
uint offerID,
bytes32 _ipfsHash,
uint _ruling, // 0: Seller, 1: Buyer, 2: Com + Seller, 3: Com + Buyer
uint _refund
) public {
}
// @dev Sets the amount that a seller wants to refund to a buyer.
function updateRefund(uint listingID, uint offerID, uint _refund, bytes32 _ipfsHash) public {
}
// @dev Refunds buyer in ETH or ERC20 - used by 1) executeRuling() and 2) to allow a seller to refund a purchase
function refundBuyer(uint listingID, uint offerID) private {
Offer storage offer = offers[listingID][offerID];
if (address(offer.currency) == 0x0) {
require(offer.buyer.send(offer.value), "ETH refund failed");
} else {
require(<FILL_ME>)
}
}
// @dev Pay seller in ETH or ERC20
function paySeller(uint listingID, uint offerID) private {
}
// @dev Pay commission to affiliate
function payCommission(uint listingID, uint offerID) private {
}
// @dev Associate ipfs data with the marketplace
function addData(bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with a listing
function addData(uint listingID, bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with an offer
function addData(uint listingID, uint offerID, bytes32 ipfsHash) public {
}
// @dev Allow listing depositManager to send deposit
function sendDeposit(uint listingID, address target, uint value, bytes32 ipfsHash) public {
}
// @dev Set the address of the Origin token contract
function setTokenAddr(address _tokenAddr) public onlyOwner {
}
// @dev Add affiliate to whitelist. Set to address(this) to disable.
function addAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
// @dev Remove affiliate from whitelist.
function removeAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
}
| offer.currency.transfer(offer.buyer,offer.value),"Refund failed" | 308,997 | offer.currency.transfer(offer.buyer,offer.value) |
"ETH refund failed" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract ERC20 {
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
}
contract V00_Marketplace is Ownable {
/**
* @notice All events have the same indexed signature offsets for easy filtering
*/
event MarketplaceData (address indexed party, bytes32 ipfsHash);
event AffiliateAdded (address indexed party, bytes32 ipfsHash);
event AffiliateRemoved (address indexed party, bytes32 ipfsHash);
event ListingCreated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingUpdated (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingWithdrawn (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingArbitrated(address indexed party, uint indexed listingID, bytes32 ipfsHash);
event ListingData (address indexed party, uint indexed listingID, bytes32 ipfsHash);
event OfferCreated (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferAccepted (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFinalized (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferWithdrawn (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferFundsAdded (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferDisputed (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
event OfferRuling (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash, uint ruling);
event OfferData (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash);
struct Listing {
address seller; // Seller wallet / identity contract / other contract
uint deposit; // Deposit in Origin Token
address depositManager; // Address that decides token distribution
}
struct Offer {
uint value; // Amount in Eth or ERC20 buyer is offering
uint commission; // Amount of commission earned if offer is finalized
uint refund; // Amount to refund buyer upon finalization
ERC20 currency; // Currency of listing
address buyer; // Buyer wallet / identity contract / other contract
address affiliate; // Address to send any commission
address arbitrator; // Address that settles disputes
uint finalizes; // Timestamp offer finalizes
uint8 status; // 0: Undefined, 1: Created, 2: Accepted, 3: Disputed
}
Listing[] public listings;
mapping(uint => Offer[]) public offers; // listingID => Offers
mapping(address => bool) public allowedAffiliates;
ERC20 public tokenAddr; // Origin Token address
constructor(address _tokenAddr) public {
}
// @dev Return the total number of listings
function totalListings() public view returns (uint) {
}
// @dev Return the total number of offers
function totalOffers(uint listingID) public view returns (uint) {
}
// @dev Seller creates listing
function createListing(bytes32 _ipfsHash, uint _deposit, address _depositManager)
public
{
}
// @dev Can only be called by token
function createListingWithSender(
address _seller,
bytes32 _ipfsHash,
uint _deposit,
address _depositManager
)
public returns (bool)
{
}
// Private
function _createListing(
address _seller,
bytes32 _ipfsHash, // IPFS JSON with details, pricing, availability
uint _deposit, // Deposit in Origin Token
address _depositManager // Address of listing depositManager
)
private
{
}
// @dev Seller updates listing
function updateListing(
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
) public {
}
function updateListingWithSender(
address _seller,
uint listingID,
bytes32 _ipfsHash,
uint _additionalDeposit
)
public returns (bool)
{
}
function _updateListing(
address _seller,
uint listingID,
bytes32 _ipfsHash, // Updated IPFS hash
uint _additionalDeposit // Additional deposit to add
) private {
}
// @dev Listing depositManager withdraws listing. IPFS hash contains reason for withdrawl.
function withdrawListing(uint listingID, address _target, bytes32 _ipfsHash) public {
}
// @dev Buyer makes offer.
function makeOffer(
uint listingID,
bytes32 _ipfsHash, // IPFS hash containing offer data
uint _finalizes, // Timestamp an accepted offer will finalize
address _affiliate, // Address to send any required commission to
uint256 _commission, // Amount of commission to send in Origin Token if offer finalizes
uint _value, // Offer amount in ERC20 or Eth
ERC20 _currency, // ERC20 token address or 0x0 for Eth
address _arbitrator // Escrow arbitrator
)
public
payable
{
}
// @dev Make new offer after withdrawl
function makeOffer(
uint listingID,
bytes32 _ipfsHash,
uint _finalizes,
address _affiliate,
uint256 _commission,
uint _value,
ERC20 _currency,
address _arbitrator,
uint _withdrawOfferID
)
public
payable
{
}
// @dev Seller accepts offer
function acceptOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer withdraws offer. IPFS hash contains reason for withdrawl.
function withdrawOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer adds extra funds to an accepted offer.
function addFunds(uint listingID, uint offerID, bytes32 _ipfsHash, uint _value) public payable {
}
// @dev Buyer must finalize transaction to receive commission
function finalize(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Buyer or seller can dispute transaction during finalization window
function dispute(uint listingID, uint offerID, bytes32 _ipfsHash) public {
}
// @dev Called by arbitrator
function executeRuling(
uint listingID,
uint offerID,
bytes32 _ipfsHash,
uint _ruling, // 0: Seller, 1: Buyer, 2: Com + Seller, 3: Com + Buyer
uint _refund
) public {
}
// @dev Sets the amount that a seller wants to refund to a buyer.
function updateRefund(uint listingID, uint offerID, uint _refund, bytes32 _ipfsHash) public {
}
// @dev Refunds buyer in ETH or ERC20 - used by 1) executeRuling() and 2) to allow a seller to refund a purchase
function refundBuyer(uint listingID, uint offerID) private {
}
// @dev Pay seller in ETH or ERC20
function paySeller(uint listingID, uint offerID) private {
Listing storage listing = listings[listingID];
Offer storage offer = offers[listingID][offerID];
uint value = offer.value - offer.refund;
if (address(offer.currency) == 0x0) {
require(<FILL_ME>)
require(listing.seller.send(value), "ETH send failed");
} else {
require(
offer.currency.transfer(offer.buyer, offer.refund),
"Refund failed"
);
require(
offer.currency.transfer(listing.seller, value),
"Transfer failed"
);
}
}
// @dev Pay commission to affiliate
function payCommission(uint listingID, uint offerID) private {
}
// @dev Associate ipfs data with the marketplace
function addData(bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with a listing
function addData(uint listingID, bytes32 ipfsHash) public {
}
// @dev Associate ipfs data with an offer
function addData(uint listingID, uint offerID, bytes32 ipfsHash) public {
}
// @dev Allow listing depositManager to send deposit
function sendDeposit(uint listingID, address target, uint value, bytes32 ipfsHash) public {
}
// @dev Set the address of the Origin token contract
function setTokenAddr(address _tokenAddr) public onlyOwner {
}
// @dev Add affiliate to whitelist. Set to address(this) to disable.
function addAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
// @dev Remove affiliate from whitelist.
function removeAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner {
}
}
| offer.buyer.send(offer.refund),"ETH refund failed" | 308,997 | offer.buyer.send(offer.refund) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.