comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
require(loans[loanId].borrower == msg.sender);
require(loans[loanId].status == Status.APPROVED);
require(<FILL_ME>)
require((msg.value > 0 && loans[loanId].currency == address(0) && msg.value == amount) || (loans[loanId].currency != address(0) && msg.value == 0 && amount > 0));
uint256 paidByBorrower = msg.value > 0 ? msg.value : amount;
uint256 amountPaidAsInstallmentToLender = paidByBorrower; // >> amount of installment that goes to lender
uint256 interestPerInstallement = paidByBorrower.mul(interestRate).div(100); // entire interest for installment
uint256 discount = discounts.calculateDiscount(msg.sender);
uint256 interestToStaterPerInstallement = interestPerInstallement.mul(interestRateToStater).div(100);
if ( discount != 1 ){
if ( loans[loanId].currency == address(0) ){
require(msg.sender.send(interestToStaterPerInstallement.div(discount)));
amountPaidAsInstallmentToLender = amountPaidAsInstallmentToLender.sub(interestToStaterPerInstallement.div(discount));
}
interestToStaterPerInstallement = interestToStaterPerInstallement.sub(interestToStaterPerInstallement.div(discount));
}
amountPaidAsInstallmentToLender = amountPaidAsInstallmentToLender.sub(interestToStaterPerInstallement);
loans[loanId].paidAmount = loans[loanId].paidAmount.add(paidByBorrower);
loans[loanId].nrOfPayments = loans[loanId].nrOfPayments.add(paidByBorrower.div(loans[loanId].installmentAmount));
if (loans[loanId].paidAmount >= loans[loanId].amountDue)
loans[loanId].status = Status.LIQUIDATED;
// We transfer the tokens to borrower here
transferTokens(
msg.sender,
loans[loanId].lender,
loans[loanId].currency,
amountPaidAsInstallmentToLender,
interestToStaterPerInstallement
);
emit LoanPayment(
loanId,
paidByBorrower,
amountPaidAsInstallmentToLender,
interestPerInstallement,
interestToStaterPerInstallement,
loans[loanId].status
);
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| loans[loanId].startEnd[1]>=block.timestamp | 345,276 | loans[loanId].startEnd[1]>=block.timestamp |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
require(loans[loanId].borrower == msg.sender);
require(loans[loanId].status == Status.APPROVED);
require(loans[loanId].startEnd[1] >= block.timestamp);
require(<FILL_ME>)
uint256 paidByBorrower = msg.value > 0 ? msg.value : amount;
uint256 amountPaidAsInstallmentToLender = paidByBorrower; // >> amount of installment that goes to lender
uint256 interestPerInstallement = paidByBorrower.mul(interestRate).div(100); // entire interest for installment
uint256 discount = discounts.calculateDiscount(msg.sender);
uint256 interestToStaterPerInstallement = interestPerInstallement.mul(interestRateToStater).div(100);
if ( discount != 1 ){
if ( loans[loanId].currency == address(0) ){
require(msg.sender.send(interestToStaterPerInstallement.div(discount)));
amountPaidAsInstallmentToLender = amountPaidAsInstallmentToLender.sub(interestToStaterPerInstallement.div(discount));
}
interestToStaterPerInstallement = interestToStaterPerInstallement.sub(interestToStaterPerInstallement.div(discount));
}
amountPaidAsInstallmentToLender = amountPaidAsInstallmentToLender.sub(interestToStaterPerInstallement);
loans[loanId].paidAmount = loans[loanId].paidAmount.add(paidByBorrower);
loans[loanId].nrOfPayments = loans[loanId].nrOfPayments.add(paidByBorrower.div(loans[loanId].installmentAmount));
if (loans[loanId].paidAmount >= loans[loanId].amountDue)
loans[loanId].status = Status.LIQUIDATED;
// We transfer the tokens to borrower here
transferTokens(
msg.sender,
loans[loanId].lender,
loans[loanId].currency,
amountPaidAsInstallmentToLender,
interestToStaterPerInstallement
);
emit LoanPayment(
loanId,
paidByBorrower,
amountPaidAsInstallmentToLender,
interestPerInstallement,
interestToStaterPerInstallement,
loans[loanId].status
);
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| (msg.value>0&&loans[loanId].currency==address(0)&&msg.value==amount)||(loans[loanId].currency!=address(0)&&msg.value==0&&amount>0) | 345,276 | (msg.value>0&&loans[loanId].currency==address(0)&&msg.value==amount)||(loans[loanId].currency!=address(0)&&msg.value==0&&amount>0) |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
require(loans[loanId].borrower == msg.sender);
require(loans[loanId].status == Status.APPROVED);
require(loans[loanId].startEnd[1] >= block.timestamp);
require((msg.value > 0 && loans[loanId].currency == address(0) && msg.value == amount) || (loans[loanId].currency != address(0) && msg.value == 0 && amount > 0));
uint256 paidByBorrower = msg.value > 0 ? msg.value : amount;
uint256 amountPaidAsInstallmentToLender = paidByBorrower; // >> amount of installment that goes to lender
uint256 interestPerInstallement = paidByBorrower.mul(interestRate).div(100); // entire interest for installment
uint256 discount = discounts.calculateDiscount(msg.sender);
uint256 interestToStaterPerInstallement = interestPerInstallement.mul(interestRateToStater).div(100);
if ( discount != 1 ){
if ( loans[loanId].currency == address(0) ){
require(<FILL_ME>)
amountPaidAsInstallmentToLender = amountPaidAsInstallmentToLender.sub(interestToStaterPerInstallement.div(discount));
}
interestToStaterPerInstallement = interestToStaterPerInstallement.sub(interestToStaterPerInstallement.div(discount));
}
amountPaidAsInstallmentToLender = amountPaidAsInstallmentToLender.sub(interestToStaterPerInstallement);
loans[loanId].paidAmount = loans[loanId].paidAmount.add(paidByBorrower);
loans[loanId].nrOfPayments = loans[loanId].nrOfPayments.add(paidByBorrower.div(loans[loanId].installmentAmount));
if (loans[loanId].paidAmount >= loans[loanId].amountDue)
loans[loanId].status = Status.LIQUIDATED;
// We transfer the tokens to borrower here
transferTokens(
msg.sender,
loans[loanId].lender,
loans[loanId].currency,
amountPaidAsInstallmentToLender,
interestToStaterPerInstallement
);
emit LoanPayment(
loanId,
paidByBorrower,
amountPaidAsInstallmentToLender,
interestPerInstallement,
interestToStaterPerInstallement,
loans[loanId].status
);
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| msg.sender.send(interestToStaterPerInstallement.div(discount)) | 345,276 | msg.sender.send(interestToStaterPerInstallement.div(discount)) |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
require(msg.sender == loans[loanId].borrower || msg.sender == loans[loanId].lender);
require(<FILL_ME>)
require((block.timestamp >= loans[loanId].startEnd[1] || loans[loanId].paidAmount >= loans[loanId].amountDue) || canBeTerminated(loanId));
require(loans[loanId].status == Status.LIQUIDATED || loans[loanId].status == Status.APPROVED);
if ( canBeTerminated(loanId) ) {
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to lender
transferItems(
address(this),
loans[loanId].lender,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
} else {
if ( block.timestamp >= loans[loanId].startEnd[1] && loans[loanId].paidAmount < loans[loanId].amountDue ) {
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to lender
transferItems(
address(this),
loans[loanId].lender,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
} else if ( loans[loanId].paidAmount >= loans[loanId].amountDue ){
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to borrower
transferItems(
address(this),
loans[loanId].borrower,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
}
}
emit ItemsWithdrawn(
msg.sender,
loanId,
loans[loanId].status
);
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| loans[loanId].status!=Status.WITHDRAWN | 345,276 | loans[loanId].status!=Status.WITHDRAWN |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
require(msg.sender == loans[loanId].borrower || msg.sender == loans[loanId].lender);
require(loans[loanId].status != Status.WITHDRAWN);
require(<FILL_ME>)
require(loans[loanId].status == Status.LIQUIDATED || loans[loanId].status == Status.APPROVED);
if ( canBeTerminated(loanId) ) {
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to lender
transferItems(
address(this),
loans[loanId].lender,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
} else {
if ( block.timestamp >= loans[loanId].startEnd[1] && loans[loanId].paidAmount < loans[loanId].amountDue ) {
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to lender
transferItems(
address(this),
loans[loanId].lender,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
} else if ( loans[loanId].paidAmount >= loans[loanId].amountDue ){
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to borrower
transferItems(
address(this),
loans[loanId].borrower,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
}
}
emit ItemsWithdrawn(
msg.sender,
loanId,
loans[loanId].status
);
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| (block.timestamp>=loans[loanId].startEnd[1]||loans[loanId].paidAmount>=loans[loanId].amountDue)||canBeTerminated(loanId) | 345,276 | (block.timestamp>=loans[loanId].startEnd[1]||loans[loanId].paidAmount>=loans[loanId].amountDue)||canBeTerminated(loanId) |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
require(msg.sender == loans[loanId].borrower || msg.sender == loans[loanId].lender);
require(loans[loanId].status != Status.WITHDRAWN);
require((block.timestamp >= loans[loanId].startEnd[1] || loans[loanId].paidAmount >= loans[loanId].amountDue) || canBeTerminated(loanId));
require(<FILL_ME>)
if ( canBeTerminated(loanId) ) {
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to lender
transferItems(
address(this),
loans[loanId].lender,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
} else {
if ( block.timestamp >= loans[loanId].startEnd[1] && loans[loanId].paidAmount < loans[loanId].amountDue ) {
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to lender
transferItems(
address(this),
loans[loanId].lender,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
} else if ( loans[loanId].paidAmount >= loans[loanId].amountDue ){
loans[loanId].status = Status.WITHDRAWN;
// We send the items back to borrower
transferItems(
address(this),
loans[loanId].borrower,
loans[loanId].nftAddressArray,
loans[loanId].nftTokenIdArray,
loans[loanId].nftTokenTypeArray
);
}
}
emit ItemsWithdrawn(
msg.sender,
loanId,
loans[loanId].status
);
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| loans[loanId].status==Status.LIQUIDATED||loans[loanId].status==Status.APPROVED | 345,276 | loans[loanId].status==Status.LIQUIDATED||loans[loanId].status==Status.APPROVED |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
for (uint256 i = 0; i < loanIds.length; ++i) {
require(<FILL_ME>)
require(loans[loanIds[i]].status == Status.APPROVED);
require(promissoryPermissions[loanIds[i]] == from);
loans[loanIds[i]].lender = to;
promissoryPermissions[loanIds[i]] = to;
}
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| loans[loanIds[i]].lender==from | 345,276 | loans[loanIds[i]].lender==from |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
for (uint256 i = 0; i < loanIds.length; ++i) {
require(loans[loanIds[i]].lender == from);
require(<FILL_ME>)
require(promissoryPermissions[loanIds[i]] == from);
loans[loanIds[i]].lender = to;
promissoryPermissions[loanIds[i]] = to;
}
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| loans[loanIds[i]].status==Status.APPROVED | 345,276 | loans[loanIds[i]].status==Status.APPROVED |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
for (uint256 i = 0; i < loanIds.length; ++i) {
require(loans[loanIds[i]].lender == from);
require(loans[loanIds[i]].status == Status.APPROVED);
require(<FILL_ME>)
loans[loanIds[i]].lender = to;
promissoryPermissions[loanIds[i]] = to;
}
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
}
}
| promissoryPermissions[loanIds[i]]==from | 345,276 | promissoryPermissions[loanIds[i]]==from |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./LendingCore.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
contract LendingMethods is Ownable, LendingCore {
using SafeMath for uint256;
using SafeMath for uint16;
// Borrower creates a loan
function createLoan(
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
address[] calldata nftAddressArray,
uint256[] calldata nftTokenIdArray,
uint8[] calldata nftTokenTypeArray
) external {
}
/*
* @ Edit loan
* @ Accessible for borrower until a lender is found
*/
function editLoan(
uint256 loanId,
uint256 loanAmount,
uint16 nrOfInstallments,
address currency,
uint256 assetsValue,
uint256 installmentTime
) external {
}
// Lender approves a loan
function approveLoan(uint256 loanId) external payable {
}
// Borrower cancels a loan
function cancelLoan(uint256 loanId) external {
}
// Borrower pays installment for loan
// Multiple installments : OK
function payLoan(uint256 loanId,uint256 amount) external payable {
}
// Borrower can withdraw loan items if loan is LIQUIDATED
// Lender can withdraw loan item is loan is DEFAULTED
function terminateLoan(uint256 loanId) external {
}
/**
* @notice Used by the Promissory Note contract to change the ownership of the loan when the Promissory Note NFT is sold
* @param from The address of the current owner
* @param to The address of the new owner
* @param loanIds The ids of the loans that will be transferred to the new owner
*/
function promissoryExchange(address from, address payable to, uint256[] calldata loanIds) external isPromissoryNote {
}
/**
* @notice Used by the Promissory Note contract to approve a list of loans to be used as a Promissory Note NFT
* @param loanIds The ids of the loans that will be approved
*/
function setPromissoryPermissions(uint256[] calldata loanIds, address allowed) external {
require(allowed != address(0));
for (uint256 i = 0; i < loanIds.length; ++i) {
require(<FILL_ME>)
require(loans[loanIds[i]].status == Status.APPROVED);
promissoryPermissions[loanIds[i]] = allowed;
}
}
}
| loans[loanIds[i]].lender==msg.sender | 345,276 | loans[loanIds[i]].lender==msg.sender |
"Mint exceeds reserve supply limit" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
interface ERC721BaseLayer {
function mintTo(address recipient, uint256 tokenId, string memory uri) external;
function ownerOf(uint256 tokenId) external returns (address owner);
}
contract ERC721MinterWithPresale is Ownable {
using Strings for *;
address public erc721BaseContract;
mapping(uint256 => uint256) public claimedTokens;
uint256 public maxSupply;
uint256 public reservedSupply;
uint256 public price;
uint256 public minted;
uint256 public reserveMinted;
uint256 public startId;
uint256 public saleStartTime;
uint256 public presaleStartTime;
uint256 public buyLimit;
uint256 public presaleBuyLimitPerQualifyingId;
string public subCollectionURI;
constructor(
address erc721BaseContract_,
uint256 maxSupply_,
uint256 reservedSupply_,
uint256 price_,
uint256 minted_,
uint256 startId_,
uint256 saleStartTime_,
uint256 presaleStartTime_,
uint256 buyLimit_,
uint256 presaleBuyLimitPerQualifyingId_,
string memory subCollectionURI_
) {
}
function mintReserve(uint256 amount) public onlyOwner {
require(minted + amount <= maxSupply, "Mint exceeds max supply limit");
require(<FILL_ME>)
ERC721BaseLayer erc721 = ERC721BaseLayer(erc721BaseContract);
uint256 tokenId = startId + minted;
minted += amount;
reserveMinted += amount;
for(uint256 i; i < amount; i++) {
erc721.mintTo(msg.sender, tokenId, string(abi.encodePacked(subCollectionURI, tokenId.toString(), '.json')));
tokenId++;
}
}
function mintPresale(uint256 amount, uint256 id) public payable {
}
function mint(uint256 amount) public payable {
}
function withdraw() public onlyOwner {
}
}
| reserveMinted+amount<=reservedSupply,"Mint exceeds reserve supply limit" | 345,360 | reserveMinted+amount<=reservedSupply |
"Purchase exceeds supply limit" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
interface ERC721BaseLayer {
function mintTo(address recipient, uint256 tokenId, string memory uri) external;
function ownerOf(uint256 tokenId) external returns (address owner);
}
contract ERC721MinterWithPresale is Ownable {
using Strings for *;
address public erc721BaseContract;
mapping(uint256 => uint256) public claimedTokens;
uint256 public maxSupply;
uint256 public reservedSupply;
uint256 public price;
uint256 public minted;
uint256 public reserveMinted;
uint256 public startId;
uint256 public saleStartTime;
uint256 public presaleStartTime;
uint256 public buyLimit;
uint256 public presaleBuyLimitPerQualifyingId;
string public subCollectionURI;
constructor(
address erc721BaseContract_,
uint256 maxSupply_,
uint256 reservedSupply_,
uint256 price_,
uint256 minted_,
uint256 startId_,
uint256 saleStartTime_,
uint256 presaleStartTime_,
uint256 buyLimit_,
uint256 presaleBuyLimitPerQualifyingId_,
string memory subCollectionURI_
) {
}
function mintReserve(uint256 amount) public onlyOwner {
}
function mintPresale(uint256 amount, uint256 id) public payable {
require(msg.value == amount * price, "Invalid payment amount");
require(amount <= presaleBuyLimitPerQualifyingId, "Too many requested");
require(<FILL_ME>)
require(block.timestamp >= presaleStartTime, "Presale has not started");
require(id >= 1 && id <= 100, "Submitted tokenId does not qualify for presale");
ERC721BaseLayer erc721 = ERC721BaseLayer(erc721BaseContract);
address tokenOwner = erc721.ownerOf(id);
require(msg.sender == tokenOwner, "Sender does not own the qualifying token");
claimedTokens[id] += amount;
require(claimedTokens[id] <= presaleBuyLimitPerQualifyingId, "Too many requested");
uint256 tokenId = startId + minted;
minted += amount;
for(uint256 i; i < amount; i++) {
erc721.mintTo(msg.sender, tokenId, string(abi.encodePacked(subCollectionURI, tokenId.toString(), '.json')));
tokenId++;
}
}
function mint(uint256 amount) public payable {
}
function withdraw() public onlyOwner {
}
}
| minted+amount<=maxSupply-(reservedSupply-reserveMinted),"Purchase exceeds supply limit" | 345,360 | minted+amount<=maxSupply-(reservedSupply-reserveMinted) |
"Too many requested" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
interface ERC721BaseLayer {
function mintTo(address recipient, uint256 tokenId, string memory uri) external;
function ownerOf(uint256 tokenId) external returns (address owner);
}
contract ERC721MinterWithPresale is Ownable {
using Strings for *;
address public erc721BaseContract;
mapping(uint256 => uint256) public claimedTokens;
uint256 public maxSupply;
uint256 public reservedSupply;
uint256 public price;
uint256 public minted;
uint256 public reserveMinted;
uint256 public startId;
uint256 public saleStartTime;
uint256 public presaleStartTime;
uint256 public buyLimit;
uint256 public presaleBuyLimitPerQualifyingId;
string public subCollectionURI;
constructor(
address erc721BaseContract_,
uint256 maxSupply_,
uint256 reservedSupply_,
uint256 price_,
uint256 minted_,
uint256 startId_,
uint256 saleStartTime_,
uint256 presaleStartTime_,
uint256 buyLimit_,
uint256 presaleBuyLimitPerQualifyingId_,
string memory subCollectionURI_
) {
}
function mintReserve(uint256 amount) public onlyOwner {
}
function mintPresale(uint256 amount, uint256 id) public payable {
require(msg.value == amount * price, "Invalid payment amount");
require(amount <= presaleBuyLimitPerQualifyingId, "Too many requested");
require(minted + amount <= maxSupply - (reservedSupply - reserveMinted), "Purchase exceeds supply limit");
require(block.timestamp >= presaleStartTime, "Presale has not started");
require(id >= 1 && id <= 100, "Submitted tokenId does not qualify for presale");
ERC721BaseLayer erc721 = ERC721BaseLayer(erc721BaseContract);
address tokenOwner = erc721.ownerOf(id);
require(msg.sender == tokenOwner, "Sender does not own the qualifying token");
claimedTokens[id] += amount;
require(<FILL_ME>)
uint256 tokenId = startId + minted;
minted += amount;
for(uint256 i; i < amount; i++) {
erc721.mintTo(msg.sender, tokenId, string(abi.encodePacked(subCollectionURI, tokenId.toString(), '.json')));
tokenId++;
}
}
function mint(uint256 amount) public payable {
}
function withdraw() public onlyOwner {
}
}
| claimedTokens[id]<=presaleBuyLimitPerQualifyingId,"Too many requested" | 345,360 | claimedTokens[id]<=presaleBuyLimitPerQualifyingId |
null | contract TrustaBitCrowdsale is MilestoneCrowdsale, Ownable {
using SafeMath for uint256;
/* Minimum contribution */
uint public constant MINIMUM_CONTRIBUTION = 15e16;
/* Soft cap */
uint public constant softCapUSD = 3e6; //$3 Million USD
uint public softCap; //$3 Million USD in ETH
/* Hard Cap */
uint public constant hardCapUSD = 49e6; //$49 Million USD
uint public hardCap; //$49 Million USD in ETH
/* Advisory Bounty Team */
address public addressAdvisoryBountyTeam;
uint256 public constant tokenAdvisoryBountyTeam = 250e6;
address[] public investors;
TrustaBitToken public token;
address public wallet;
uint256 public weiRaised;
RefundVault public vault;
bool public isFinalized = false;
event Finalized();
/**
* event for token purchase logging
* @param investor who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed investor, uint256 value, uint256 amount);
modifier hasMinimumContribution() {
}
function TrustaBitCrowdsale(address _wallet, address _token, uint _rate, uint _preSaleStartDate, uint _preSaleEndDate, uint _mainSaleStartDate, uint _mainSaleEndDate, address _AdvisoryBountyTeam) public {
}
function investorsCount() public view returns (uint) {
}
// fallback function can be used to buy tokens
function() external payable {
}
// low level token purchase function
function buyTokens(address investor) public hasMinimumContribution payable {
require(investor != address(0));
require(<FILL_ME>)
uint256 weiAmount = msg.value;
require(getCurrentPrice() > 0);
uint256 tokensAmount = calculateTokens(weiAmount);
require(tokensAmount > 0);
mintTokens(investor, weiAmount, tokensAmount);
increaseRaised(weiAmount, tokensAmount);
if (vault.deposited(investor) == 0) {
investors.push(investor);
}
// send ether to the fund collection wallet
vault.deposit.value(weiAmount)(investor);
}
function calculateTokens(uint256 weiAmount) internal view returns (uint256) {
}
function isEarlyInvestorsTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isPreSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isMainSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isTokenAvailable(uint256 tokensAmount) public view returns (bool) {
}
function increaseRaised(uint256 weiAmount, uint256 tokensAmount) internal {
}
function mintTokens(address investor, uint256 weiAmount, uint256 tokens) internal {
}
function finalize() onlyOwner public {
}
function mintAdvisoryBountyTeam() internal {
}
// if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() public {
}
function refund() onlyOwner public {
}
function softCapReached() public view returns (bool) {
}
function hardCapReached() public view returns (bool) {
}
function destroy() onlyOwner public {
}
}
| !isEnded() | 345,458 | !isEnded() |
null | contract TrustaBitCrowdsale is MilestoneCrowdsale, Ownable {
using SafeMath for uint256;
/* Minimum contribution */
uint public constant MINIMUM_CONTRIBUTION = 15e16;
/* Soft cap */
uint public constant softCapUSD = 3e6; //$3 Million USD
uint public softCap; //$3 Million USD in ETH
/* Hard Cap */
uint public constant hardCapUSD = 49e6; //$49 Million USD
uint public hardCap; //$49 Million USD in ETH
/* Advisory Bounty Team */
address public addressAdvisoryBountyTeam;
uint256 public constant tokenAdvisoryBountyTeam = 250e6;
address[] public investors;
TrustaBitToken public token;
address public wallet;
uint256 public weiRaised;
RefundVault public vault;
bool public isFinalized = false;
event Finalized();
/**
* event for token purchase logging
* @param investor who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed investor, uint256 value, uint256 amount);
modifier hasMinimumContribution() {
}
function TrustaBitCrowdsale(address _wallet, address _token, uint _rate, uint _preSaleStartDate, uint _preSaleEndDate, uint _mainSaleStartDate, uint _mainSaleEndDate, address _AdvisoryBountyTeam) public {
}
function investorsCount() public view returns (uint) {
}
// fallback function can be used to buy tokens
function() external payable {
}
// low level token purchase function
function buyTokens(address investor) public hasMinimumContribution payable {
require(investor != address(0));
require(!isEnded());
uint256 weiAmount = msg.value;
require(<FILL_ME>)
uint256 tokensAmount = calculateTokens(weiAmount);
require(tokensAmount > 0);
mintTokens(investor, weiAmount, tokensAmount);
increaseRaised(weiAmount, tokensAmount);
if (vault.deposited(investor) == 0) {
investors.push(investor);
}
// send ether to the fund collection wallet
vault.deposit.value(weiAmount)(investor);
}
function calculateTokens(uint256 weiAmount) internal view returns (uint256) {
}
function isEarlyInvestorsTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isPreSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isMainSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isTokenAvailable(uint256 tokensAmount) public view returns (bool) {
}
function increaseRaised(uint256 weiAmount, uint256 tokensAmount) internal {
}
function mintTokens(address investor, uint256 weiAmount, uint256 tokens) internal {
}
function finalize() onlyOwner public {
}
function mintAdvisoryBountyTeam() internal {
}
// if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() public {
}
function refund() onlyOwner public {
}
function softCapReached() public view returns (bool) {
}
function hardCapReached() public view returns (bool) {
}
function destroy() onlyOwner public {
}
}
| getCurrentPrice()>0 | 345,458 | getCurrentPrice()>0 |
null | contract TrustaBitCrowdsale is MilestoneCrowdsale, Ownable {
using SafeMath for uint256;
/* Minimum contribution */
uint public constant MINIMUM_CONTRIBUTION = 15e16;
/* Soft cap */
uint public constant softCapUSD = 3e6; //$3 Million USD
uint public softCap; //$3 Million USD in ETH
/* Hard Cap */
uint public constant hardCapUSD = 49e6; //$49 Million USD
uint public hardCap; //$49 Million USD in ETH
/* Advisory Bounty Team */
address public addressAdvisoryBountyTeam;
uint256 public constant tokenAdvisoryBountyTeam = 250e6;
address[] public investors;
TrustaBitToken public token;
address public wallet;
uint256 public weiRaised;
RefundVault public vault;
bool public isFinalized = false;
event Finalized();
/**
* event for token purchase logging
* @param investor who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed investor, uint256 value, uint256 amount);
modifier hasMinimumContribution() {
}
function TrustaBitCrowdsale(address _wallet, address _token, uint _rate, uint _preSaleStartDate, uint _preSaleEndDate, uint _mainSaleStartDate, uint _mainSaleEndDate, address _AdvisoryBountyTeam) public {
}
function investorsCount() public view returns (uint) {
}
// fallback function can be used to buy tokens
function() external payable {
}
// low level token purchase function
function buyTokens(address investor) public hasMinimumContribution payable {
}
function calculateTokens(uint256 weiAmount) internal view returns (uint256) {
}
function isEarlyInvestorsTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isPreSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isMainSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isTokenAvailable(uint256 tokensAmount) public view returns (bool) {
}
function increaseRaised(uint256 weiAmount, uint256 tokensAmount) internal {
}
function mintTokens(address investor, uint256 weiAmount, uint256 tokens) internal {
}
function finalize() onlyOwner public {
require(!isFinalized);
require(<FILL_ME>)
if (softCapReached()) {
vault.close();
mintAdvisoryBountyTeam();
token.finishMinting();
}
else {
vault.enableRefunds();
token.finishMinting();
}
token.transferOwnership(owner);
isFinalized = true;
Finalized();
}
function mintAdvisoryBountyTeam() internal {
}
// if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() public {
}
function refund() onlyOwner public {
}
function softCapReached() public view returns (bool) {
}
function hardCapReached() public view returns (bool) {
}
function destroy() onlyOwner public {
}
}
| isEnded() | 345,458 | isEnded() |
null | contract TrustaBitCrowdsale is MilestoneCrowdsale, Ownable {
using SafeMath for uint256;
/* Minimum contribution */
uint public constant MINIMUM_CONTRIBUTION = 15e16;
/* Soft cap */
uint public constant softCapUSD = 3e6; //$3 Million USD
uint public softCap; //$3 Million USD in ETH
/* Hard Cap */
uint public constant hardCapUSD = 49e6; //$49 Million USD
uint public hardCap; //$49 Million USD in ETH
/* Advisory Bounty Team */
address public addressAdvisoryBountyTeam;
uint256 public constant tokenAdvisoryBountyTeam = 250e6;
address[] public investors;
TrustaBitToken public token;
address public wallet;
uint256 public weiRaised;
RefundVault public vault;
bool public isFinalized = false;
event Finalized();
/**
* event for token purchase logging
* @param investor who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed investor, uint256 value, uint256 amount);
modifier hasMinimumContribution() {
}
function TrustaBitCrowdsale(address _wallet, address _token, uint _rate, uint _preSaleStartDate, uint _preSaleEndDate, uint _mainSaleStartDate, uint _mainSaleEndDate, address _AdvisoryBountyTeam) public {
}
function investorsCount() public view returns (uint) {
}
// fallback function can be used to buy tokens
function() external payable {
}
// low level token purchase function
function buyTokens(address investor) public hasMinimumContribution payable {
}
function calculateTokens(uint256 weiAmount) internal view returns (uint256) {
}
function isEarlyInvestorsTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isPreSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isMainSaleTokenRaised(uint256 tokensAmount) public view returns (bool) {
}
function isTokenAvailable(uint256 tokensAmount) public view returns (bool) {
}
function increaseRaised(uint256 weiAmount, uint256 tokensAmount) internal {
}
function mintTokens(address investor, uint256 weiAmount, uint256 tokens) internal {
}
function finalize() onlyOwner public {
}
function mintAdvisoryBountyTeam() internal {
}
// if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() public {
require(isFinalized);
require(<FILL_ME>)
vault.refund(msg.sender);
}
function refund() onlyOwner public {
}
function softCapReached() public view returns (bool) {
}
function hardCapReached() public view returns (bool) {
}
function destroy() onlyOwner public {
}
}
| !softCapReached() | 345,458 | !softCapReached() |
null | /*
* @title Crypto Tulips Token Interface
* @dev This contract provides interface to ERC721 support.
*/
contract TulipsTokenInterface is TulipsStorage, ERC721 {
//// TOKEN SPECS & META DATA
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant name = "CryptoTulips";
string public constant symbol = "CT";
/*
* @dev This external contract will return Tulip metadata. We are making this changable in case
* we need to update our current uri scheme later on.
*/
ERC721Metadata public erc721Metadata;
/// @dev Set the address of the external contract that generates the metadata.
function setMetadataAddress(address _contractAddress) public onlyOperations {
}
//// EVENTS
/*
* @dev Transfer event as defined in ERC721.
*/
event Transfer(address from, address to, uint256 tokenId);
/*
* @dev Approval event as defined in ERC721.
*/
event Approval(address owner, address approved, uint256 tokenId);
//// TRANSFER DATA
/*
* @dev Maps tulipId to approved transfer address
*/
mapping (uint256 => address) public tulipIdToApproved;
//// PUBLIC FACING FUNCTIONS
/*
* @notice Returns total number of Tulips created so far.
*/
function totalSupply() public view returns (uint) {
}
/*
* @notice Returns the number of Tulips owned by given address.
* @param _owner The Tulip owner.
*/
function balanceOf(address _owner) public view returns (uint256 count) {
}
/*
* @notice Returns the owner of the given Tulip
*/
function ownerOf(uint256 _tulipId)
external
view
returns (address owner)
{
}
/*
* @notice Unlocks the tulip for transfer. The reciever can calltransferFrom() to
* get ownership of the tulip. This is a safer method since you can revoke the transfer
* if you mistakenly send it to an invalid address.
* @param _to The reciever address. Set to address(0) to revoke the approval.
* @param _tulipId The tulip to be transfered
*/
function approve(
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
// Only an owner can grant transfer approval.
require(<FILL_ME>)
// Register the approval
_approve(_tulipId, _to);
// Emit approval event.
Approval(msg.sender, _to, _tulipId);
}
/*
* @notice Transfers a tulip to another address without confirmation.
* If the reciever's address is invalid tulip may be lost! Use approve() and transferFrom() instead.
* @param _to The reciever address.
* @param _tulipId The tulip to be transfered
*/
function transfer(
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
}
/*
* @notice This method allows the caller to recieve a tulip if the caller is the approved address
* caller can also give another address to recieve the tulip.
* @param _from Current owner of the tulip.
* @param _to New owner of the tulip
* @param _tulipId The tulip to be transfered
*/
function transferFrom(
address _from,
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
}
/// @notice Returns metadata for the tulip.
/// @param _tulipId The tulip to recieve information on
function tokenMetadata(uint256 _tulipId, string _preferredTransport) external view returns (string infoUrl) {
}
//// INTERNAL FUNCTIONS THAT ACTUALLY DO STUFF
// These are called by public facing functions after sanity checks
function _transfer(address _from, address _to, uint256 _tulipId) internal {
}
function _approve(uint256 _tulipId, address _approved) internal{
}
//// UTILITY FUNCTIONS
/// @dev Adapted from toString(slice) by @arachnid (Nick Johnson <[email protected]>)
/// This method is licenced under the Apache License.
/// Ref: https://github.com/Arachnid/solidity-stringutils/blob/2f6ca9accb48ae14c66f1437ec50ed19a0616f78/strings.sol
function _toString(bytes32[4] _rawBytes, uint256 _stringLength)private view returns (string) {
}
function _memcpy(uint dest, uint src, uint len) private view {
}
}
| tulipIdToOwner[_tulipId]==msg.sender | 345,471 | tulipIdToOwner[_tulipId]==msg.sender |
null | /*
* @title Crypto Tulips Token Interface
* @dev This contract provides interface to ERC721 support.
*/
contract TulipsTokenInterface is TulipsStorage, ERC721 {
//// TOKEN SPECS & META DATA
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant name = "CryptoTulips";
string public constant symbol = "CT";
/*
* @dev This external contract will return Tulip metadata. We are making this changable in case
* we need to update our current uri scheme later on.
*/
ERC721Metadata public erc721Metadata;
/// @dev Set the address of the external contract that generates the metadata.
function setMetadataAddress(address _contractAddress) public onlyOperations {
}
//// EVENTS
/*
* @dev Transfer event as defined in ERC721.
*/
event Transfer(address from, address to, uint256 tokenId);
/*
* @dev Approval event as defined in ERC721.
*/
event Approval(address owner, address approved, uint256 tokenId);
//// TRANSFER DATA
/*
* @dev Maps tulipId to approved transfer address
*/
mapping (uint256 => address) public tulipIdToApproved;
//// PUBLIC FACING FUNCTIONS
/*
* @notice Returns total number of Tulips created so far.
*/
function totalSupply() public view returns (uint) {
}
/*
* @notice Returns the number of Tulips owned by given address.
* @param _owner The Tulip owner.
*/
function balanceOf(address _owner) public view returns (uint256 count) {
}
/*
* @notice Returns the owner of the given Tulip
*/
function ownerOf(uint256 _tulipId)
external
view
returns (address owner)
{
}
/*
* @notice Unlocks the tulip for transfer. The reciever can calltransferFrom() to
* get ownership of the tulip. This is a safer method since you can revoke the transfer
* if you mistakenly send it to an invalid address.
* @param _to The reciever address. Set to address(0) to revoke the approval.
* @param _tulipId The tulip to be transfered
*/
function approve(
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
}
/*
* @notice Transfers a tulip to another address without confirmation.
* If the reciever's address is invalid tulip may be lost! Use approve() and transferFrom() instead.
* @param _to The reciever address.
* @param _tulipId The tulip to be transfered
*/
function transfer(
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
}
/*
* @notice This method allows the caller to recieve a tulip if the caller is the approved address
* caller can also give another address to recieve the tulip.
* @param _from Current owner of the tulip.
* @param _to New owner of the tulip
* @param _tulipId The tulip to be transfered
*/
function transferFrom(
address _from,
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
// Safety checks for common mistakes.
require(_to != address(0));
require(_to != address(this));
// Check for approval and valid ownership
require(<FILL_ME>)
require(tulipIdToOwner[_tulipId] == _from);
// Do the transfer
_transfer(_from, _to, _tulipId);
}
/// @notice Returns metadata for the tulip.
/// @param _tulipId The tulip to recieve information on
function tokenMetadata(uint256 _tulipId, string _preferredTransport) external view returns (string infoUrl) {
}
//// INTERNAL FUNCTIONS THAT ACTUALLY DO STUFF
// These are called by public facing functions after sanity checks
function _transfer(address _from, address _to, uint256 _tulipId) internal {
}
function _approve(uint256 _tulipId, address _approved) internal{
}
//// UTILITY FUNCTIONS
/// @dev Adapted from toString(slice) by @arachnid (Nick Johnson <[email protected]>)
/// This method is licenced under the Apache License.
/// Ref: https://github.com/Arachnid/solidity-stringutils/blob/2f6ca9accb48ae14c66f1437ec50ed19a0616f78/strings.sol
function _toString(bytes32[4] _rawBytes, uint256 _stringLength)private view returns (string) {
}
function _memcpy(uint dest, uint src, uint len) private view {
}
}
| tulipIdToApproved[_tulipId]==msg.sender | 345,471 | tulipIdToApproved[_tulipId]==msg.sender |
null | /*
* @title Crypto Tulips Token Interface
* @dev This contract provides interface to ERC721 support.
*/
contract TulipsTokenInterface is TulipsStorage, ERC721 {
//// TOKEN SPECS & META DATA
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant name = "CryptoTulips";
string public constant symbol = "CT";
/*
* @dev This external contract will return Tulip metadata. We are making this changable in case
* we need to update our current uri scheme later on.
*/
ERC721Metadata public erc721Metadata;
/// @dev Set the address of the external contract that generates the metadata.
function setMetadataAddress(address _contractAddress) public onlyOperations {
}
//// EVENTS
/*
* @dev Transfer event as defined in ERC721.
*/
event Transfer(address from, address to, uint256 tokenId);
/*
* @dev Approval event as defined in ERC721.
*/
event Approval(address owner, address approved, uint256 tokenId);
//// TRANSFER DATA
/*
* @dev Maps tulipId to approved transfer address
*/
mapping (uint256 => address) public tulipIdToApproved;
//// PUBLIC FACING FUNCTIONS
/*
* @notice Returns total number of Tulips created so far.
*/
function totalSupply() public view returns (uint) {
}
/*
* @notice Returns the number of Tulips owned by given address.
* @param _owner The Tulip owner.
*/
function balanceOf(address _owner) public view returns (uint256 count) {
}
/*
* @notice Returns the owner of the given Tulip
*/
function ownerOf(uint256 _tulipId)
external
view
returns (address owner)
{
}
/*
* @notice Unlocks the tulip for transfer. The reciever can calltransferFrom() to
* get ownership of the tulip. This is a safer method since you can revoke the transfer
* if you mistakenly send it to an invalid address.
* @param _to The reciever address. Set to address(0) to revoke the approval.
* @param _tulipId The tulip to be transfered
*/
function approve(
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
}
/*
* @notice Transfers a tulip to another address without confirmation.
* If the reciever's address is invalid tulip may be lost! Use approve() and transferFrom() instead.
* @param _to The reciever address.
* @param _tulipId The tulip to be transfered
*/
function transfer(
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
}
/*
* @notice This method allows the caller to recieve a tulip if the caller is the approved address
* caller can also give another address to recieve the tulip.
* @param _from Current owner of the tulip.
* @param _to New owner of the tulip
* @param _tulipId The tulip to be transfered
*/
function transferFrom(
address _from,
address _to,
uint256 _tulipId
)
external
whenNotPaused
{
// Safety checks for common mistakes.
require(_to != address(0));
require(_to != address(this));
// Check for approval and valid ownership
require(tulipIdToApproved[_tulipId] == msg.sender);
require(<FILL_ME>)
// Do the transfer
_transfer(_from, _to, _tulipId);
}
/// @notice Returns metadata for the tulip.
/// @param _tulipId The tulip to recieve information on
function tokenMetadata(uint256 _tulipId, string _preferredTransport) external view returns (string infoUrl) {
}
//// INTERNAL FUNCTIONS THAT ACTUALLY DO STUFF
// These are called by public facing functions after sanity checks
function _transfer(address _from, address _to, uint256 _tulipId) internal {
}
function _approve(uint256 _tulipId, address _approved) internal{
}
//// UTILITY FUNCTIONS
/// @dev Adapted from toString(slice) by @arachnid (Nick Johnson <[email protected]>)
/// This method is licenced under the Apache License.
/// Ref: https://github.com/Arachnid/solidity-stringutils/blob/2f6ca9accb48ae14c66f1437ec50ed19a0616f78/strings.sol
function _toString(bytes32[4] _rawBytes, uint256 _stringLength)private view returns (string) {
}
function _memcpy(uint dest, uint src, uint len) private view {
}
}
| tulipIdToOwner[_tulipId]==_from | 345,471 | tulipIdToOwner[_tulipId]==_from |
null | pragma solidity ^0.4.26;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
// how many token units a buyer gets per wei
uint256 public rate;
// amount of raised money in wei
uint256 public weiRaised;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) {
}
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
}
// fallback function can be used to buy tokens
function () payable {
}
// low level token purchase function
function buyTokens(address beneficiary) payable {
}
// send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms
function forwardFunds() internal {
}
// @return true if the transaction can buy tokens
function validPurchase() internal constant returns (bool) {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
}
contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 public cap;
function CappedCrowdsale(uint256 _cap) {
}
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function validPurchase() internal constant returns (bool) {
}
// overriding Crowdsale#hasEnded to add cap logic
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
}
contract WithdrawVault is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public deposited;
address public wallet;
function WithdrawVault(address _wallet) {
}
function deposit(address investor) onlyOwner payable {
}
function close() onlyOwner {
}
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value) returns (bool);
function approve(address spender, uint256 value) returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint256 balance) {
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue)
returns (bool success) {
}
}
contract BurnableToken is StandardToken {
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint _value)
public
{
}
event Burn(address indexed burner, uint indexed value);
}
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner returns (bool) {
}
}
contract FinalizableCrowdsale is Crowdsale, Ownable {
using SafeMath for uint256;
bool public isFinalized = false;
event Finalized();
/**
* @dev Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/
function finalize() onlyOwner {
}
/**
* @dev Can be overriden to add finalization logic. The overriding function
* should call super.finalization() to ensure the chain of finalization is
* executed entirely.
*/
function finalization() internal {
}
}
contract RefundVault is Ownable {
using SafeMath for uint256;
enum State { Active, Refunding, Closed }
mapping (address => uint256) public deposited;
address public wallet;
State public state;
event Closed();
event RefundsEnabled();
event Refunded(address indexed beneficiary, uint256 weiAmount);
function RefundVault(address _wallet) {
}
function deposit(address investor) onlyOwner payable {
}
function close() onlyOwner {
}
function enableRefunds() onlyOwner {
}
function refund(address investor) {
}
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
contract TokenRecipient {
function tokenFallback(address sender, uint256 _value, bytes _extraData) returns (bool) {}
}
contract bidopa is MintableToken, BurnableToken, PausableToken {
string public constant name = "bidopa";
string public constant symbol = "OPA";
uint8 public constant decimals =4;
function bidopa() {
}
// --------------------------------------------------------
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
mapping (address => bool) stopReceive;
function setStopReceive(bool stop) {
}
function getStopReceive() constant public returns (bool) {
}
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
require(<FILL_ME>)
bool result = super.transfer(_to, _value);
return result;
}
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
function burn(uint256 _value) public {
}
function pause() onlyOwner whenNotPaused public {
}
function unpause() onlyOwner whenPaused public {
}
function transferAndCall(address _recipient, uint256 _amount, bytes _data) {
}
}
| !stopReceive[_to] | 345,495 | !stopReceive[_to] |
null | pragma solidity ^0.4.26;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
// how many token units a buyer gets per wei
uint256 public rate;
// amount of raised money in wei
uint256 public weiRaised;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) {
}
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
}
// fallback function can be used to buy tokens
function () payable {
}
// low level token purchase function
function buyTokens(address beneficiary) payable {
}
// send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms
function forwardFunds() internal {
}
// @return true if the transaction can buy tokens
function validPurchase() internal constant returns (bool) {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
}
contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 public cap;
function CappedCrowdsale(uint256 _cap) {
}
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function validPurchase() internal constant returns (bool) {
}
// overriding Crowdsale#hasEnded to add cap logic
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
}
contract WithdrawVault is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public deposited;
address public wallet;
function WithdrawVault(address _wallet) {
}
function deposit(address investor) onlyOwner payable {
}
function close() onlyOwner {
}
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value) returns (bool);
function approve(address spender, uint256 value) returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint256 balance) {
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue)
returns (bool success) {
}
}
contract BurnableToken is StandardToken {
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint _value)
public
{
}
event Burn(address indexed burner, uint indexed value);
}
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner returns (bool) {
}
}
contract FinalizableCrowdsale is Crowdsale, Ownable {
using SafeMath for uint256;
bool public isFinalized = false;
event Finalized();
/**
* @dev Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/
function finalize() onlyOwner {
}
/**
* @dev Can be overriden to add finalization logic. The overriding function
* should call super.finalization() to ensure the chain of finalization is
* executed entirely.
*/
function finalization() internal {
}
}
contract RefundVault is Ownable {
using SafeMath for uint256;
enum State { Active, Refunding, Closed }
mapping (address => uint256) public deposited;
address public wallet;
State public state;
event Closed();
event RefundsEnabled();
event Refunded(address indexed beneficiary, uint256 weiAmount);
function RefundVault(address _wallet) {
}
function deposit(address investor) onlyOwner payable {
}
function close() onlyOwner {
}
function enableRefunds() onlyOwner {
}
function refund(address investor) {
}
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
contract TokenRecipient {
function tokenFallback(address sender, uint256 _value, bytes _extraData) returns (bool) {}
}
contract bidopa is MintableToken, BurnableToken, PausableToken {
string public constant name = "bidopa";
string public constant symbol = "OPA";
uint8 public constant decimals =4;
function bidopa() {
}
// --------------------------------------------------------
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
mapping (address => bool) stopReceive;
function setStopReceive(bool stop) {
}
function getStopReceive() constant public returns (bool) {
}
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
function burn(uint256 _value) public {
}
function pause() onlyOwner whenNotPaused public {
}
function unpause() onlyOwner whenPaused public {
}
function transferAndCall(address _recipient, uint256 _amount, bytes _data) {
require(_recipient != address(0));
require(_amount <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_amount);
balances[_recipient] = balances[_recipient].add(_amount);
require(<FILL_ME>)
Transfer(msg.sender, _recipient, _amount);
}
}
| TokenRecipient(_recipient).tokenFallback(msg.sender,_amount,_data) | 345,495 | TokenRecipient(_recipient).tokenFallback(msg.sender,_amount,_data) |
ERROR_BALANCE_NOT_ENOUGH | pragma solidity ^0.5.8;
import "./SafeMath.sol";
import "./BaseToken.sol";
contract EggToken is BaseToken
{
using SafeMath for uint256;
// MARK: strings for error message.
string constant public ERROR_NOT_MANDATED = 'Reason: Not mandated.';
// MARK: for token information.
string constant public name = 'Egg';
string constant public symbol = 'EGG';
string constant public version = '1.0.0';
mapping (address => bool) public mandates;
// MARK: events
event TransferByMandate(address indexed from, address indexed to, uint256 value);
event ReferralDrop(address indexed from, address indexed to1, uint256 value1, address indexed to2, uint256 value2);
event UpdatedMandate(address indexed from, bool mandate);
constructor() public
{
}
// MARK: functions for view data
function transferByMandate(address _from, address _to, uint256 _value, address _sale, uint256 _fee) external onlyWhenNotStopped onlyOwner returns (bool)
{
require(_from != address(0), ERROR_ADDRESS_NOT_VALID);
require(_sale != address(0), ERROR_ADDRESS_NOT_VALID);
require(_value > 0, ERROR_VALUE_NOT_VALID);
require(<FILL_ME>)
require(mandates[_from], ERROR_NOT_MANDATED);
require(!isLocked(_from, _value), ERROR_LOCKED);
balances[_from] = balances[_from].sub(_value + _fee);
balances[_to] = balances[_to].add(_value);
if(_fee > 0)
{
balances[_sale] = balances[_sale].add(_fee);
}
emit TransferByMandate(_from, _to, _value);
return true;
}
function referralDrop(address _to1, uint256 _value1, address _to2, uint256 _value2, address _sale, uint256 _fee) external onlyWhenNotStopped returns (bool)
{
}
// MARK: utils for transfer authentication
function updateMandate(bool _value) external onlyWhenNotStopped returns (bool)
{
}
}
| balances[_from]>=_value+_fee,ERROR_BALANCE_NOT_ENOUGH | 345,560 | balances[_from]>=_value+_fee |
ERROR_NOT_MANDATED | pragma solidity ^0.5.8;
import "./SafeMath.sol";
import "./BaseToken.sol";
contract EggToken is BaseToken
{
using SafeMath for uint256;
// MARK: strings for error message.
string constant public ERROR_NOT_MANDATED = 'Reason: Not mandated.';
// MARK: for token information.
string constant public name = 'Egg';
string constant public symbol = 'EGG';
string constant public version = '1.0.0';
mapping (address => bool) public mandates;
// MARK: events
event TransferByMandate(address indexed from, address indexed to, uint256 value);
event ReferralDrop(address indexed from, address indexed to1, uint256 value1, address indexed to2, uint256 value2);
event UpdatedMandate(address indexed from, bool mandate);
constructor() public
{
}
// MARK: functions for view data
function transferByMandate(address _from, address _to, uint256 _value, address _sale, uint256 _fee) external onlyWhenNotStopped onlyOwner returns (bool)
{
require(_from != address(0), ERROR_ADDRESS_NOT_VALID);
require(_sale != address(0), ERROR_ADDRESS_NOT_VALID);
require(_value > 0, ERROR_VALUE_NOT_VALID);
require(balances[_from] >= _value + _fee, ERROR_BALANCE_NOT_ENOUGH);
require(<FILL_ME>)
require(!isLocked(_from, _value), ERROR_LOCKED);
balances[_from] = balances[_from].sub(_value + _fee);
balances[_to] = balances[_to].add(_value);
if(_fee > 0)
{
balances[_sale] = balances[_sale].add(_fee);
}
emit TransferByMandate(_from, _to, _value);
return true;
}
function referralDrop(address _to1, uint256 _value1, address _to2, uint256 _value2, address _sale, uint256 _fee) external onlyWhenNotStopped returns (bool)
{
}
// MARK: utils for transfer authentication
function updateMandate(bool _value) external onlyWhenNotStopped returns (bool)
{
}
}
| mandates[_from],ERROR_NOT_MANDATED | 345,560 | mandates[_from] |
ERROR_LOCKED | pragma solidity ^0.5.8;
import "./SafeMath.sol";
import "./BaseToken.sol";
contract EggToken is BaseToken
{
using SafeMath for uint256;
// MARK: strings for error message.
string constant public ERROR_NOT_MANDATED = 'Reason: Not mandated.';
// MARK: for token information.
string constant public name = 'Egg';
string constant public symbol = 'EGG';
string constant public version = '1.0.0';
mapping (address => bool) public mandates;
// MARK: events
event TransferByMandate(address indexed from, address indexed to, uint256 value);
event ReferralDrop(address indexed from, address indexed to1, uint256 value1, address indexed to2, uint256 value2);
event UpdatedMandate(address indexed from, bool mandate);
constructor() public
{
}
// MARK: functions for view data
function transferByMandate(address _from, address _to, uint256 _value, address _sale, uint256 _fee) external onlyWhenNotStopped onlyOwner returns (bool)
{
require(_from != address(0), ERROR_ADDRESS_NOT_VALID);
require(_sale != address(0), ERROR_ADDRESS_NOT_VALID);
require(_value > 0, ERROR_VALUE_NOT_VALID);
require(balances[_from] >= _value + _fee, ERROR_BALANCE_NOT_ENOUGH);
require(mandates[_from], ERROR_NOT_MANDATED);
require(<FILL_ME>)
balances[_from] = balances[_from].sub(_value + _fee);
balances[_to] = balances[_to].add(_value);
if(_fee > 0)
{
balances[_sale] = balances[_sale].add(_fee);
}
emit TransferByMandate(_from, _to, _value);
return true;
}
function referralDrop(address _to1, uint256 _value1, address _to2, uint256 _value2, address _sale, uint256 _fee) external onlyWhenNotStopped returns (bool)
{
}
// MARK: utils for transfer authentication
function updateMandate(bool _value) external onlyWhenNotStopped returns (bool)
{
}
}
| !isLocked(_from,_value),ERROR_LOCKED | 345,560 | !isLocked(_from,_value) |
null | pragma solidity ^0.5.8;
import "./SafeMath.sol";
import "./BaseToken.sol";
contract EggToken is BaseToken
{
using SafeMath for uint256;
// MARK: strings for error message.
string constant public ERROR_NOT_MANDATED = 'Reason: Not mandated.';
// MARK: for token information.
string constant public name = 'Egg';
string constant public symbol = 'EGG';
string constant public version = '1.0.0';
mapping (address => bool) public mandates;
// MARK: events
event TransferByMandate(address indexed from, address indexed to, uint256 value);
event ReferralDrop(address indexed from, address indexed to1, uint256 value1, address indexed to2, uint256 value2);
event UpdatedMandate(address indexed from, bool mandate);
constructor() public
{
}
// MARK: functions for view data
function transferByMandate(address _from, address _to, uint256 _value, address _sale, uint256 _fee) external onlyWhenNotStopped onlyOwner returns (bool)
{
}
function referralDrop(address _to1, uint256 _value1, address _to2, uint256 _value2, address _sale, uint256 _fee) external onlyWhenNotStopped returns (bool)
{
require(_to1 != address(0), ERROR_ADDRESS_NOT_VALID);
require(_to2 != address(0), ERROR_ADDRESS_NOT_VALID);
require(_sale != address(0), ERROR_ADDRESS_NOT_VALID);
require(<FILL_ME>)
require(!isLocked(msg.sender, _value1 + _value2 + _fee), ERROR_LOCKED);
balances[msg.sender] = balances[msg.sender].sub(_value1 + _value2 + _fee);
if(_value1 > 0)
{
balances[_to1] = balances[_to1].add(_value1);
}
if(_value2 > 0)
{
balances[_to2] = balances[_to2].add(_value2);
}
if(_fee > 0)
{
balances[_sale] = balances[_sale].add(_fee);
}
emit ReferralDrop(msg.sender, _to1, _value1, _to2, _value2);
return true;
}
// MARK: utils for transfer authentication
function updateMandate(bool _value) external onlyWhenNotStopped returns (bool)
{
}
}
| balances[msg.sender]>=_value1+_value2+_fee | 345,560 | balances[msg.sender]>=_value1+_value2+_fee |
ERROR_LOCKED | pragma solidity ^0.5.8;
import "./SafeMath.sol";
import "./BaseToken.sol";
contract EggToken is BaseToken
{
using SafeMath for uint256;
// MARK: strings for error message.
string constant public ERROR_NOT_MANDATED = 'Reason: Not mandated.';
// MARK: for token information.
string constant public name = 'Egg';
string constant public symbol = 'EGG';
string constant public version = '1.0.0';
mapping (address => bool) public mandates;
// MARK: events
event TransferByMandate(address indexed from, address indexed to, uint256 value);
event ReferralDrop(address indexed from, address indexed to1, uint256 value1, address indexed to2, uint256 value2);
event UpdatedMandate(address indexed from, bool mandate);
constructor() public
{
}
// MARK: functions for view data
function transferByMandate(address _from, address _to, uint256 _value, address _sale, uint256 _fee) external onlyWhenNotStopped onlyOwner returns (bool)
{
}
function referralDrop(address _to1, uint256 _value1, address _to2, uint256 _value2, address _sale, uint256 _fee) external onlyWhenNotStopped returns (bool)
{
require(_to1 != address(0), ERROR_ADDRESS_NOT_VALID);
require(_to2 != address(0), ERROR_ADDRESS_NOT_VALID);
require(_sale != address(0), ERROR_ADDRESS_NOT_VALID);
require(balances[msg.sender] >= _value1 + _value2 + _fee);
require(<FILL_ME>)
balances[msg.sender] = balances[msg.sender].sub(_value1 + _value2 + _fee);
if(_value1 > 0)
{
balances[_to1] = balances[_to1].add(_value1);
}
if(_value2 > 0)
{
balances[_to2] = balances[_to2].add(_value2);
}
if(_fee > 0)
{
balances[_sale] = balances[_sale].add(_fee);
}
emit ReferralDrop(msg.sender, _to1, _value1, _to2, _value2);
return true;
}
// MARK: utils for transfer authentication
function updateMandate(bool _value) external onlyWhenNotStopped returns (bool)
{
}
}
| !isLocked(msg.sender,_value1+_value2+_fee),ERROR_LOCKED | 345,560 | !isLocked(msg.sender,_value1+_value2+_fee) |
null | pragma solidity ^0.4.11;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns(uint256) {
}
function div(uint256 a, uint256 b) internal constant returns(uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns(uint256) {
}
function add(uint256 a, uint256 b) internal constant returns(uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() { }
function Ownable() {
}
function transferOwnership(address newOwner) onlyOwner {
}
}
contract Pausable is Ownable {
bool public paused = false;
event Pause();
event Unpause();
modifier whenNotPaused() { }
modifier whenPaused() { }
function pause() onlyOwner whenNotPaused {
}
function unpause() onlyOwner whenPaused {
}
}
contract ERC20 {
uint256 public totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
function transferFrom(address from, address to, uint256 value) returns (bool);
function allowance(address owner, address spender) constant returns (uint256);
function approve(address spender, uint256 value) returns (bool);
}
contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
function balanceOf(address _owner) constant returns(uint256 balance) {
}
function transfer(address _to, uint256 _value) returns(bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) returns(bool success) {
}
function allowance(address _owner, address _spender) constant returns(uint256 remaining) {
}
function approve(address _spender, uint256 _value) returns(bool success) {
}
function increaseApproval(address _spender, uint _addedValue) returns(bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) returns(bool success) {
}
}
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
function burn(uint256 _value) public {
}
}
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
uint public MAX_SUPPLY;
modifier canMint() { }
function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool success) {
require(<FILL_ME>)
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(address(0), _to, _amount);
return true;
}
function finishMinting() onlyOwner public returns(bool success) {
}
}
/*
ICO S Token
- Эмиссия токенов ограничена (всего 85 600 000 токенов, токены выпускаются во время ICO и PreICO)
- Цена токена фиксированная: 1 ETH = 1250 токенов
- Бонусы на PreICO: +40% первые 3 дня, +30% с 4 по 6 день, +20% с 7 по 9 день
- Минимальная и максимальная сумма покупки: 0.001 ETH и 10000 ETH
- Токенов на продажу 42 800 000 (50%)
- 42 800 000 (50%) токенов передается команде во время создания токена
- Средства от покупки токенов передаются бенефициару
- Crowdsale ограничен по времени
- Закрытие Crowdsale происходит с помощью функции `withdraw()`: управление токеном передаётся бенефициару
- После завершения ICO и PreICO владелец должен вызвать `finishMinting()` у токена чтобы закрыть выпуск токенов
*/
contract Token is BurnableToken, MintableToken {
string public name = "S Token";
string public symbol = "SKK";
uint256 public decimals = 18;
function Token() {
}
}
contract Crowdsale is Pausable {
using SafeMath for uint;
Token public token;
address public beneficiary = 0x17D0b1A81f186bfA186b5841F21FC3207Be2Af7C; // Beneficiary
uint public collectedWei;
uint public tokensSold;
uint public tokensForSale = 42800000 * 1 ether; // Amount tokens for sale
uint public priceTokenWei = 1 ether / 1250;
uint public startTime = 1513252800; // Date start 14.12.2017 12:00 +0
uint public endTime = 1514030400; // Date end 23.12.2017 12:00 +0
bool public crowdsaleFinished = false;
event NewContribution(address indexed holder, uint256 tokenAmount, uint256 etherAmount);
event Withdraw();
function Crowdsale() {
}
function() payable {
}
function purchase() whenNotPaused payable {
}
function withdraw() onlyOwner {
}
}
| totalSupply.add(_amount)<=MAX_SUPPLY | 345,627 | totalSupply.add(_amount)<=MAX_SUPPLY |
null | pragma solidity ^0.4.11;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns(uint256) {
}
function div(uint256 a, uint256 b) internal constant returns(uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns(uint256) {
}
function add(uint256 a, uint256 b) internal constant returns(uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() { }
function Ownable() {
}
function transferOwnership(address newOwner) onlyOwner {
}
}
contract Pausable is Ownable {
bool public paused = false;
event Pause();
event Unpause();
modifier whenNotPaused() { }
modifier whenPaused() { }
function pause() onlyOwner whenNotPaused {
}
function unpause() onlyOwner whenPaused {
}
}
contract ERC20 {
uint256 public totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
function transferFrom(address from, address to, uint256 value) returns (bool);
function allowance(address owner, address spender) constant returns (uint256);
function approve(address spender, uint256 value) returns (bool);
}
contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
function balanceOf(address _owner) constant returns(uint256 balance) {
}
function transfer(address _to, uint256 _value) returns(bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) returns(bool success) {
}
function allowance(address _owner, address _spender) constant returns(uint256 remaining) {
}
function approve(address _spender, uint256 _value) returns(bool success) {
}
function increaseApproval(address _spender, uint _addedValue) returns(bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) returns(bool success) {
}
}
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
function burn(uint256 _value) public {
}
}
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
uint public MAX_SUPPLY;
modifier canMint() { }
function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool success) {
}
function finishMinting() onlyOwner public returns(bool success) {
}
}
/*
ICO S Token
- Эмиссия токенов ограничена (всего 85 600 000 токенов, токены выпускаются во время ICO и PreICO)
- Цена токена фиксированная: 1 ETH = 1250 токенов
- Бонусы на PreICO: +40% первые 3 дня, +30% с 4 по 6 день, +20% с 7 по 9 день
- Минимальная и максимальная сумма покупки: 0.001 ETH и 10000 ETH
- Токенов на продажу 42 800 000 (50%)
- 42 800 000 (50%) токенов передается команде во время создания токена
- Средства от покупки токенов передаются бенефициару
- Crowdsale ограничен по времени
- Закрытие Crowdsale происходит с помощью функции `withdraw()`: управление токеном передаётся бенефициару
- После завершения ICO и PreICO владелец должен вызвать `finishMinting()` у токена чтобы закрыть выпуск токенов
*/
contract Token is BurnableToken, MintableToken {
string public name = "S Token";
string public symbol = "SKK";
uint256 public decimals = 18;
function Token() {
}
}
contract Crowdsale is Pausable {
using SafeMath for uint;
Token public token;
address public beneficiary = 0x17D0b1A81f186bfA186b5841F21FC3207Be2Af7C; // Beneficiary
uint public collectedWei;
uint public tokensSold;
uint public tokensForSale = 42800000 * 1 ether; // Amount tokens for sale
uint public priceTokenWei = 1 ether / 1250;
uint public startTime = 1513252800; // Date start 14.12.2017 12:00 +0
uint public endTime = 1514030400; // Date end 23.12.2017 12:00 +0
bool public crowdsaleFinished = false;
event NewContribution(address indexed holder, uint256 tokenAmount, uint256 etherAmount);
event Withdraw();
function Crowdsale() {
}
function() payable {
}
function purchase() whenNotPaused payable {
require(<FILL_ME>)
require(now >= startTime && now < endTime);
require(tokensSold < tokensForSale);
require(msg.value >= 0.08 * 1 ether && msg.value <= 100 * 1 ether);
uint sum = msg.value;
uint price = priceTokenWei.mul(100).div(
now < startTime + 3 days ? 140
: (now < startTime + 6 days ? 130
: (now < startTime + 9 days ? 120 : 100))
);
uint amount = sum.div(price).mul(1 ether);
uint retSum = 0;
if(tokensSold.add(amount) > tokensForSale) {
uint retAmount = tokensSold.add(amount).sub(tokensForSale);
retSum = retAmount.mul(price).div(1 ether);
amount = amount.sub(retAmount);
sum = sum.sub(retSum);
}
tokensSold = tokensSold.add(amount);
collectedWei = collectedWei.add(sum);
beneficiary.transfer(sum);
token.mint(msg.sender, amount);
if(retSum > 0) {
msg.sender.transfer(retSum);
}
NewContribution(msg.sender, amount, sum);
}
function withdraw() onlyOwner {
}
}
| !crowdsaleFinished | 345,627 | !crowdsaleFinished |
null | // Import interfaces for many popular DeFi projects, or add your own!
//import "../interfaces/<protocol>/<Interface>.sol";
contract Strategy is BaseStrategy {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
bool public checkLiqGauge = true;
ICurveFi public constant StableSwapSTETH = ICurveFi(0xDC24316b9AE028F1497c275EB9192a3Ea0f67022);
IWETH public constant weth = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
ISteth public constant stETH = ISteth(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);
address private referal = 0x16388463d60FFE0661Cf7F1f31a7D658aC790ff7; //stratms. for recycling and redepositing
uint256 public maxSingleTrade;
uint256 public constant DENOMINATOR = 10_000;
uint256 public slippageProtectionOut;// = 50; //out of 10000. 50 = 0.5%
int128 private constant WETHID = 0;
int128 private constant STETHID = 1;
constructor(address _vault) public BaseStrategy(_vault) {
}
//we get eth
receive() external payable {}
function updateReferal(address _referal) public onlyEmergencyAuthorized {
}
function updateMaxSingleTrade(uint256 _maxSingleTrade) public onlyVaultManagers {
}
function updateSlippageProtectionOut(uint256 _slippageProtectionOut) public onlyVaultManagers {
}
function invest(uint256 _amount) external onlyEmergencyAuthorized{
require(<FILL_ME>)
uint256 realInvest = Math.min(maxSingleTrade, _amount);
_invest(realInvest);
}
//should never have stuck eth but just incase
function rescueStuckEth() external onlyEmergencyAuthorized{
}
function name() external override view returns (string memory) {
}
// We are purposely treating stETH and ETH as being equivalent.
// This is for a few reasons. The main one is that we do not have a good way to value stETH at any current time without creating exploit routes.
// Currently you can mint eth for steth but can't burn steth for eth so need to sell. Once eth 2.0 is merged you will be able to burn 1-1 as well.
// The main downside here is that we will noramlly overvalue our position as we expect stETH to trade slightly below peg.
// That means we will earn profit on deposits and take losses on withdrawals.
// This may sound scary but it is the equivalent of using virtualprice in a curve lp. As we have seen from many exploits, virtual pricing is safer than touch pricing.
function estimatedTotalAssets() public override view returns (uint256) {
}
function wantBalance() public view returns (uint256){
}
function stethBalance() public view returns (uint256){
}
function prepareReturn(uint256 _debtOutstanding)
internal
override
returns (
uint256 _profit,
uint256 _loss,
uint256 _debtPayment
)
{
}
function ethToWant(uint256 _amtInWei) public view override returns (uint256){
}
function liquidateAllPositions() internal override returns (uint256 _amountFreed){
}
function adjustPosition(uint256 _debtOutstanding) internal override {
}
function _invest(uint256 _amount) internal returns (uint256){
}
function _divest(uint256 _amount) internal returns (uint256){
}
// we attempt to withdraw the full amount and let the user decide if they take the loss or not
function liquidatePosition(uint256 _amountNeeded)
internal
override
returns (uint256 _liquidatedAmount, uint256 _loss)
{
}
// NOTE: Can override `tendTrigger` and `harvestTrigger` if necessary
function prepareMigration(address _newStrategy) internal override {
}
// Override this to add all tokens/tokenized positions this contract manages
// on a *persistent* basis (e.g. not just for swapping back to want ephemerally)
// NOTE: Do *not* include `want`, already included in `sweep` below
//
// Example:
//
// function protectedTokens() internal override view returns (address[] memory) {
// address[] memory protected = new address[](3);
// protected[0] = tokenA;
// protected[1] = tokenB;
// protected[2] = tokenC;
// return protected;
// }
function protectedTokens()
internal
override
view
returns (address[] memory)
{
}
}
| wantBalance()>=_amount | 345,665 | wantBalance()>=_amount |
"registered" | pragma solidity ^0.6.0;
/// @notice The stakingRewardsAdapter registry database for Furucombo
contract StakingRewardsAdapterRegistry is Ownable {
mapping(address => bytes32) public adapters;
bytes32 constant DEPRECATED = bytes10(0x64657072656361746564);
/**
* @notice Transfer ownership to tx.origin since we are
* using a create2 factory to deploy contract, and the
* owner will be the factory if we do not transfer.
* Ref: https://eips.ethereum.org/EIPS/eip-2470
*/
constructor() public {
}
/**
* @notice Register an adapter with a bytes32 information.
* @param registration Adapter address.
* @param info Info string.
*/
function register(address registration, bytes32 info) external onlyOwner {
require(registration != address(0), "zero address");
require(<FILL_ME>)
adapters[registration] = info;
}
/**
* @notice Unregister an adapter. The adapter will be deprecated.
* @param registration The adapter to be unregistered.
*/
function unregister(address registration) external onlyOwner {
}
/**
* @notice Update the info of a valid adapter.
* @param adapter The adapter to be updating info.
* @param info New info to be updated.
*/
function updateInfo(address adapter, bytes32 info) external onlyOwner {
}
/**
* @notice Check if the adapter is valid.
* @param adapter The adapter to be verified.
*/
function isValid(address adapter) external view returns (bool result) {
}
/**
* @notice Get the information of a registration.
* @param adapter The adapter address to be queried.
*/
function getInfo(address adapter) external view returns (bytes32 info) {
}
}
| adapters[registration]==bytes32(0),"registered" | 345,750 | adapters[registration]==bytes32(0) |
"no registration" | pragma solidity ^0.6.0;
/// @notice The stakingRewardsAdapter registry database for Furucombo
contract StakingRewardsAdapterRegistry is Ownable {
mapping(address => bytes32) public adapters;
bytes32 constant DEPRECATED = bytes10(0x64657072656361746564);
/**
* @notice Transfer ownership to tx.origin since we are
* using a create2 factory to deploy contract, and the
* owner will be the factory if we do not transfer.
* Ref: https://eips.ethereum.org/EIPS/eip-2470
*/
constructor() public {
}
/**
* @notice Register an adapter with a bytes32 information.
* @param registration Adapter address.
* @param info Info string.
*/
function register(address registration, bytes32 info) external onlyOwner {
}
/**
* @notice Unregister an adapter. The adapter will be deprecated.
* @param registration The adapter to be unregistered.
*/
function unregister(address registration) external onlyOwner {
require(registration != address(0), "zero address");
require(<FILL_ME>)
require(adapters[registration] != DEPRECATED, "unregistered");
adapters[registration] = DEPRECATED;
}
/**
* @notice Update the info of a valid adapter.
* @param adapter The adapter to be updating info.
* @param info New info to be updated.
*/
function updateInfo(address adapter, bytes32 info) external onlyOwner {
}
/**
* @notice Check if the adapter is valid.
* @param adapter The adapter to be verified.
*/
function isValid(address adapter) external view returns (bool result) {
}
/**
* @notice Get the information of a registration.
* @param adapter The adapter address to be queried.
*/
function getInfo(address adapter) external view returns (bytes32 info) {
}
}
| adapters[registration]!=bytes32(0),"no registration" | 345,750 | adapters[registration]!=bytes32(0) |
"unregistered" | pragma solidity ^0.6.0;
/// @notice The stakingRewardsAdapter registry database for Furucombo
contract StakingRewardsAdapterRegistry is Ownable {
mapping(address => bytes32) public adapters;
bytes32 constant DEPRECATED = bytes10(0x64657072656361746564);
/**
* @notice Transfer ownership to tx.origin since we are
* using a create2 factory to deploy contract, and the
* owner will be the factory if we do not transfer.
* Ref: https://eips.ethereum.org/EIPS/eip-2470
*/
constructor() public {
}
/**
* @notice Register an adapter with a bytes32 information.
* @param registration Adapter address.
* @param info Info string.
*/
function register(address registration, bytes32 info) external onlyOwner {
}
/**
* @notice Unregister an adapter. The adapter will be deprecated.
* @param registration The adapter to be unregistered.
*/
function unregister(address registration) external onlyOwner {
require(registration != address(0), "zero address");
require(adapters[registration] != bytes32(0), "no registration");
require(<FILL_ME>)
adapters[registration] = DEPRECATED;
}
/**
* @notice Update the info of a valid adapter.
* @param adapter The adapter to be updating info.
* @param info New info to be updated.
*/
function updateInfo(address adapter, bytes32 info) external onlyOwner {
}
/**
* @notice Check if the adapter is valid.
* @param adapter The adapter to be verified.
*/
function isValid(address adapter) external view returns (bool result) {
}
/**
* @notice Get the information of a registration.
* @param adapter The adapter address to be queried.
*/
function getInfo(address adapter) external view returns (bytes32 info) {
}
}
| adapters[registration]!=DEPRECATED,"unregistered" | 345,750 | adapters[registration]!=DEPRECATED |
"no registration" | pragma solidity ^0.6.0;
/// @notice The stakingRewardsAdapter registry database for Furucombo
contract StakingRewardsAdapterRegistry is Ownable {
mapping(address => bytes32) public adapters;
bytes32 constant DEPRECATED = bytes10(0x64657072656361746564);
/**
* @notice Transfer ownership to tx.origin since we are
* using a create2 factory to deploy contract, and the
* owner will be the factory if we do not transfer.
* Ref: https://eips.ethereum.org/EIPS/eip-2470
*/
constructor() public {
}
/**
* @notice Register an adapter with a bytes32 information.
* @param registration Adapter address.
* @param info Info string.
*/
function register(address registration, bytes32 info) external onlyOwner {
}
/**
* @notice Unregister an adapter. The adapter will be deprecated.
* @param registration The adapter to be unregistered.
*/
function unregister(address registration) external onlyOwner {
}
/**
* @notice Update the info of a valid adapter.
* @param adapter The adapter to be updating info.
* @param info New info to be updated.
*/
function updateInfo(address adapter, bytes32 info) external onlyOwner {
require(adapter != address(0), "zero address");
require(info != bytes32(0), "update info to 0 is prohibited");
require(<FILL_ME>)
require(adapters[adapter] != DEPRECATED, "unregistered");
adapters[adapter] = info;
}
/**
* @notice Check if the adapter is valid.
* @param adapter The adapter to be verified.
*/
function isValid(address adapter) external view returns (bool result) {
}
/**
* @notice Get the information of a registration.
* @param adapter The adapter address to be queried.
*/
function getInfo(address adapter) external view returns (bytes32 info) {
}
}
| adapters[adapter]!=bytes32(0),"no registration" | 345,750 | adapters[adapter]!=bytes32(0) |
"unregistered" | pragma solidity ^0.6.0;
/// @notice The stakingRewardsAdapter registry database for Furucombo
contract StakingRewardsAdapterRegistry is Ownable {
mapping(address => bytes32) public adapters;
bytes32 constant DEPRECATED = bytes10(0x64657072656361746564);
/**
* @notice Transfer ownership to tx.origin since we are
* using a create2 factory to deploy contract, and the
* owner will be the factory if we do not transfer.
* Ref: https://eips.ethereum.org/EIPS/eip-2470
*/
constructor() public {
}
/**
* @notice Register an adapter with a bytes32 information.
* @param registration Adapter address.
* @param info Info string.
*/
function register(address registration, bytes32 info) external onlyOwner {
}
/**
* @notice Unregister an adapter. The adapter will be deprecated.
* @param registration The adapter to be unregistered.
*/
function unregister(address registration) external onlyOwner {
}
/**
* @notice Update the info of a valid adapter.
* @param adapter The adapter to be updating info.
* @param info New info to be updated.
*/
function updateInfo(address adapter, bytes32 info) external onlyOwner {
require(adapter != address(0), "zero address");
require(info != bytes32(0), "update info to 0 is prohibited");
require(adapters[adapter] != bytes32(0), "no registration");
require(<FILL_ME>)
adapters[adapter] = info;
}
/**
* @notice Check if the adapter is valid.
* @param adapter The adapter to be verified.
*/
function isValid(address adapter) external view returns (bool result) {
}
/**
* @notice Get the information of a registration.
* @param adapter The adapter address to be queried.
*/
function getInfo(address adapter) external view returns (bytes32 info) {
}
}
| adapters[adapter]!=DEPRECATED,"unregistered" | 345,750 | adapters[adapter]!=DEPRECATED |
"Unable" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface PreSale {
function userShare(address _useraddress) external view returns (uint256);
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract SIVA is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) claimedPreSaleTokens;
mapping (address => uint256) public analyticsID;
mapping (address => uint256) public SIVAadsID;
mapping (address => uint256) public SIVABusinessID;
mapping (uint256 => mapping (string => address)) public SIVAMarketingMatrix;
mapping (uint256 => mapping (string => address)) public SIVAIndexA;
mapping (uint256 => mapping (string => string)) public SIVAIndexB;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
string private _url;
address public _deployer;
address public presaleContract;
uint256 public process;
uint256 public SIVAINDEX;
constructor () public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function url() public view returns (string memory) {
}
function totalSupply() public view override returns (uint256) {
}
function setUrl(string calldata uri) public virtual returns (bool) {
}
function setPresaleContract(address _contract) public virtual returns (bool) {
}
function setName(string calldata cname) public virtual returns (bool) {
}
function generateCard() public virtual returns (bool) {
}
function generateMarketingMatrix(string calldata _metadata, string calldata _description) public virtual returns (bool) {
}
function claimPresaleTokens() public virtual returns (bool) {
require(_msgSender() != address(0), "No request from the zero address");
require(<FILL_ME>)
_transfer(address(this), _msgSender(), PreSale(presaleContract).userShare(_msgSender()));
claimedPreSaleTokens[_msgSender()] = true;
return true;
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
}
| claimedPreSaleTokens[_msgSender()]==false,"Unable" | 345,754 | claimedPreSaleTokens[_msgSender()]==false |
null | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @title iCrowdCoin
*/
contract iCrowdCoin is StandardToken, Ownable, Haltable {
//define iCrowdCoin
string public constant name = "iCrowdCoin";
string public constant symbol = "ICC";
uint8 public constant decimals = 18;
/** List of agents that are allowed to distribute tokens */
mapping (address => bool) public distributors;
event Distribute(address indexed to, uint256 amount);
event DistributeOpened();
event DistributeFinished();
event DistributorChanged(address addr, bool state);
event BurnToken(address addr,uint256 amount);
//owner can request a refund for an incorrectly sent ERC20.
event WithdrowErc20Token (address indexed erc20, address indexed wallet, uint value);
bool public distributionFinished = false;
modifier canDistribute() {
}
/**
* Only crowdsale contracts are allowed to distribute tokens
*/
modifier onlyDistributor() {
require(<FILL_ME>)
_;
}
constructor (uint256 _amount) public {
}
/**
* Owner can allow a crowdsale contract to distribute tokens.
*/
function setDistributor(address addr, bool state) public onlyOwner canDistribute {
}
/**
* @dev Function to distribute tokens
* @param _to The address that will receive the distributed tokens.
* @param _amount The amount of tokens to distribute.
*/
function distribute(address _to, uint256 _amount) public onlyDistributor canDistribute {
}
/**
* @dev Burns a specific amount of tokens, only can holder's own token
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
/**
* @dev Function to burn down tokens
* @param _addr The address that will burn the tokens.
* @param _amount The amount of tokens to burn.
*/
function _burn(address _addr,uint256 _amount) internal {
}
/**
* @dev Function to resume Distributing new tokens.
*/
function openDistribution() public onlyOwner {
}
/**
* @dev Function to stop Distributing new tokens.
*/
function distributionFinishing() public onlyOwner {
}
function withdrowErc20(address _tokenAddr, address _to, uint _value) public onlyOwner {
}
//overide ERC20 for Haltable
function transfer(address _to, uint256 _value) public stopInEmergency returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public stopInEmergency returns (bool) {
}
function approve(address _spender, uint256 _value) public stopInEmergency returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public stopInEmergency returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public stopInEmergency returns (bool success) {
}
}
| distributors[msg.sender] | 345,767 | distributors[msg.sender] |
null | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @title iCrowdCoin
*/
contract iCrowdCoin is StandardToken, Ownable, Haltable {
//define iCrowdCoin
string public constant name = "iCrowdCoin";
string public constant symbol = "ICC";
uint8 public constant decimals = 18;
/** List of agents that are allowed to distribute tokens */
mapping (address => bool) public distributors;
event Distribute(address indexed to, uint256 amount);
event DistributeOpened();
event DistributeFinished();
event DistributorChanged(address addr, bool state);
event BurnToken(address addr,uint256 amount);
//owner can request a refund for an incorrectly sent ERC20.
event WithdrowErc20Token (address indexed erc20, address indexed wallet, uint value);
bool public distributionFinished = false;
modifier canDistribute() {
}
/**
* Only crowdsale contracts are allowed to distribute tokens
*/
modifier onlyDistributor() {
}
constructor (uint256 _amount) public {
}
/**
* Owner can allow a crowdsale contract to distribute tokens.
*/
function setDistributor(address addr, bool state) public onlyOwner canDistribute {
}
/**
* @dev Function to distribute tokens
* @param _to The address that will receive the distributed tokens.
* @param _amount The amount of tokens to distribute.
*/
function distribute(address _to, uint256 _amount) public onlyDistributor canDistribute {
require(<FILL_ME>)
balances[address(this)] = balances[address(this)].sub(_amount);
balances[_to] = balances[_to].add(_amount);
emit Distribute(_to, _amount);
emit Transfer(address(0), _to, _amount);
}
/**
* @dev Burns a specific amount of tokens, only can holder's own token
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
/**
* @dev Function to burn down tokens
* @param _addr The address that will burn the tokens.
* @param _amount The amount of tokens to burn.
*/
function _burn(address _addr,uint256 _amount) internal {
}
/**
* @dev Function to resume Distributing new tokens.
*/
function openDistribution() public onlyOwner {
}
/**
* @dev Function to stop Distributing new tokens.
*/
function distributionFinishing() public onlyOwner {
}
function withdrowErc20(address _tokenAddr, address _to, uint _value) public onlyOwner {
}
//overide ERC20 for Haltable
function transfer(address _to, uint256 _value) public stopInEmergency returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public stopInEmergency returns (bool) {
}
function approve(address _spender, uint256 _value) public stopInEmergency returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public stopInEmergency returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public stopInEmergency returns (bool success) {
}
}
| balances[address(this)]>=_amount | 345,767 | balances[address(this)]>=_amount |
null | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @title iCrowdCoin
*/
contract iCrowdCoin is StandardToken, Ownable, Haltable {
//define iCrowdCoin
string public constant name = "iCrowdCoin";
string public constant symbol = "ICC";
uint8 public constant decimals = 18;
/** List of agents that are allowed to distribute tokens */
mapping (address => bool) public distributors;
event Distribute(address indexed to, uint256 amount);
event DistributeOpened();
event DistributeFinished();
event DistributorChanged(address addr, bool state);
event BurnToken(address addr,uint256 amount);
//owner can request a refund for an incorrectly sent ERC20.
event WithdrowErc20Token (address indexed erc20, address indexed wallet, uint value);
bool public distributionFinished = false;
modifier canDistribute() {
}
/**
* Only crowdsale contracts are allowed to distribute tokens
*/
modifier onlyDistributor() {
}
constructor (uint256 _amount) public {
}
/**
* Owner can allow a crowdsale contract to distribute tokens.
*/
function setDistributor(address addr, bool state) public onlyOwner canDistribute {
}
/**
* @dev Function to distribute tokens
* @param _to The address that will receive the distributed tokens.
* @param _amount The amount of tokens to distribute.
*/
function distribute(address _to, uint256 _amount) public onlyDistributor canDistribute {
}
/**
* @dev Burns a specific amount of tokens, only can holder's own token
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
/**
* @dev Function to burn down tokens
* @param _addr The address that will burn the tokens.
* @param _amount The amount of tokens to burn.
*/
function _burn(address _addr,uint256 _amount) internal {
require(<FILL_ME>)
balances[_addr] = balances[_addr].sub(_amount);
totalSupply_ = totalSupply_.sub(_amount);
emit BurnToken(_addr,_amount);
emit Transfer(_addr, address(0), _amount);
}
/**
* @dev Function to resume Distributing new tokens.
*/
function openDistribution() public onlyOwner {
}
/**
* @dev Function to stop Distributing new tokens.
*/
function distributionFinishing() public onlyOwner {
}
function withdrowErc20(address _tokenAddr, address _to, uint _value) public onlyOwner {
}
//overide ERC20 for Haltable
function transfer(address _to, uint256 _value) public stopInEmergency returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public stopInEmergency returns (bool) {
}
function approve(address _spender, uint256 _value) public stopInEmergency returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public stopInEmergency returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public stopInEmergency returns (bool success) {
}
}
| balances[_addr]>=_amount | 345,767 | balances[_addr]>=_amount |
"Not enough free mints" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
}
}
pragma solidity ^0.8.0;
contract EtherPanther is ERC721Enumerable, Ownable {
uint256 public EtherPantherPrice = 10000000000000000;
uint public constant maxEtherPantherPurchase = 10;
uint public EtherPantherSupply = 4444;
bool public drop_is_active = false;
string public baseURI = "https://ipfs.io/ipfs/QmXc8LkUzYhrZkfAc8XdMPj8eG65Xkwuhs4HwebCxfp32e/";
uint256 public tokensMinted = 0;
uint256 public freeMints = 444;
mapping(address => uint) addressesThatMinted;
constructor() ERC721("EtherPanther", "EtherPanther"){
}
function withdraw() public onlyOwner {
}
function flipDropState() public onlyOwner {
}
function freeMintEtherPanther(uint numberOfTokens) public {
require(drop_is_active, "Drop is not live");
require(numberOfTokens > 0 && numberOfTokens <= maxEtherPantherPurchase, "Mint qty invalid");
require(<FILL_ME>)
require(addressesThatMinted[msg.sender] + numberOfTokens <= 10, "You have already minted 10!");
uint256 tokenIndex = tokensMinted;
tokensMinted += numberOfTokens;
addressesThatMinted[msg.sender] += numberOfTokens;
for (uint i = 0; i < numberOfTokens; i++){
_safeMint(msg.sender, tokenIndex);
tokenIndex++;
}
}
function mintEtherPanther(uint numberOfTokens) public payable {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setEtherPantherPrice(uint256 newEtherPantherPrice)public onlyOwner{
}
function setBaseURI(string memory newBaseURI)public onlyOwner{
}
function setSupply(uint256 newSupply)public onlyOwner{
}
function setFreeMints(uint256 newfreeMints)public onlyOwner{
}
}
| tokensMinted+numberOfTokens<=freeMints,"Not enough free mints" | 345,861 | tokensMinted+numberOfTokens<=freeMints |
"You have already minted 10!" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
}
}
pragma solidity ^0.8.0;
contract EtherPanther is ERC721Enumerable, Ownable {
uint256 public EtherPantherPrice = 10000000000000000;
uint public constant maxEtherPantherPurchase = 10;
uint public EtherPantherSupply = 4444;
bool public drop_is_active = false;
string public baseURI = "https://ipfs.io/ipfs/QmXc8LkUzYhrZkfAc8XdMPj8eG65Xkwuhs4HwebCxfp32e/";
uint256 public tokensMinted = 0;
uint256 public freeMints = 444;
mapping(address => uint) addressesThatMinted;
constructor() ERC721("EtherPanther", "EtherPanther"){
}
function withdraw() public onlyOwner {
}
function flipDropState() public onlyOwner {
}
function freeMintEtherPanther(uint numberOfTokens) public {
require(drop_is_active, "Drop is not live");
require(numberOfTokens > 0 && numberOfTokens <= maxEtherPantherPurchase, "Mint qty invalid");
require(tokensMinted + numberOfTokens <= freeMints, "Not enough free mints");
require(<FILL_ME>)
uint256 tokenIndex = tokensMinted;
tokensMinted += numberOfTokens;
addressesThatMinted[msg.sender] += numberOfTokens;
for (uint i = 0; i < numberOfTokens; i++){
_safeMint(msg.sender, tokenIndex);
tokenIndex++;
}
}
function mintEtherPanther(uint numberOfTokens) public payable {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setEtherPantherPrice(uint256 newEtherPantherPrice)public onlyOwner{
}
function setBaseURI(string memory newBaseURI)public onlyOwner{
}
function setSupply(uint256 newSupply)public onlyOwner{
}
function setFreeMints(uint256 newfreeMints)public onlyOwner{
}
}
| addressesThatMinted[msg.sender]+numberOfTokens<=10,"You have already minted 10!" | 345,861 | addressesThatMinted[msg.sender]+numberOfTokens<=10 |
"Not enough supply" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
}
}
pragma solidity ^0.8.0;
contract EtherPanther is ERC721Enumerable, Ownable {
uint256 public EtherPantherPrice = 10000000000000000;
uint public constant maxEtherPantherPurchase = 10;
uint public EtherPantherSupply = 4444;
bool public drop_is_active = false;
string public baseURI = "https://ipfs.io/ipfs/QmXc8LkUzYhrZkfAc8XdMPj8eG65Xkwuhs4HwebCxfp32e/";
uint256 public tokensMinted = 0;
uint256 public freeMints = 444;
mapping(address => uint) addressesThatMinted;
constructor() ERC721("EtherPanther", "EtherPanther"){
}
function withdraw() public onlyOwner {
}
function flipDropState() public onlyOwner {
}
function freeMintEtherPanther(uint numberOfTokens) public {
}
function mintEtherPanther(uint numberOfTokens) public payable {
require(drop_is_active, "Drop is not live");
require(numberOfTokens > 0 && numberOfTokens <= maxEtherPantherPurchase, "Mint qty invalid");
require(<FILL_ME>)
require(msg.value >= EtherPantherPrice * numberOfTokens, "Not enough ETH!");
require(addressesThatMinted[msg.sender] + numberOfTokens <= 50, "You have already minted 50!");
uint256 tokenIndex = tokensMinted;
tokensMinted += numberOfTokens;
addressesThatMinted[msg.sender] += numberOfTokens;
for (uint i = 0; i < numberOfTokens; i++){
_safeMint(msg.sender, tokenIndex);
tokenIndex++;
}
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setEtherPantherPrice(uint256 newEtherPantherPrice)public onlyOwner{
}
function setBaseURI(string memory newBaseURI)public onlyOwner{
}
function setSupply(uint256 newSupply)public onlyOwner{
}
function setFreeMints(uint256 newfreeMints)public onlyOwner{
}
}
| tokensMinted+numberOfTokens<=EtherPantherSupply,"Not enough supply" | 345,861 | tokensMinted+numberOfTokens<=EtherPantherSupply |
"You have already minted 50!" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
}
}
pragma solidity ^0.8.0;
contract EtherPanther is ERC721Enumerable, Ownable {
uint256 public EtherPantherPrice = 10000000000000000;
uint public constant maxEtherPantherPurchase = 10;
uint public EtherPantherSupply = 4444;
bool public drop_is_active = false;
string public baseURI = "https://ipfs.io/ipfs/QmXc8LkUzYhrZkfAc8XdMPj8eG65Xkwuhs4HwebCxfp32e/";
uint256 public tokensMinted = 0;
uint256 public freeMints = 444;
mapping(address => uint) addressesThatMinted;
constructor() ERC721("EtherPanther", "EtherPanther"){
}
function withdraw() public onlyOwner {
}
function flipDropState() public onlyOwner {
}
function freeMintEtherPanther(uint numberOfTokens) public {
}
function mintEtherPanther(uint numberOfTokens) public payable {
require(drop_is_active, "Drop is not live");
require(numberOfTokens > 0 && numberOfTokens <= maxEtherPantherPurchase, "Mint qty invalid");
require(tokensMinted + numberOfTokens <= EtherPantherSupply, "Not enough supply");
require(msg.value >= EtherPantherPrice * numberOfTokens, "Not enough ETH!");
require(<FILL_ME>)
uint256 tokenIndex = tokensMinted;
tokensMinted += numberOfTokens;
addressesThatMinted[msg.sender] += numberOfTokens;
for (uint i = 0; i < numberOfTokens; i++){
_safeMint(msg.sender, tokenIndex);
tokenIndex++;
}
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setEtherPantherPrice(uint256 newEtherPantherPrice)public onlyOwner{
}
function setBaseURI(string memory newBaseURI)public onlyOwner{
}
function setSupply(uint256 newSupply)public onlyOwner{
}
function setFreeMints(uint256 newfreeMints)public onlyOwner{
}
}
| addressesThatMinted[msg.sender]+numberOfTokens<=50,"You have already minted 50!" | 345,861 | addressesThatMinted[msg.sender]+numberOfTokens<=50 |
"You are not Whitelisted" | pragma solidity ^0.8.0;
contract Nobleape is ERC721Enumerable, Ownable, Pausable {
uint16 public constant MAX_TOKENS = 50000;
uint16 public constant EXPANSION_TOKENS = 10000;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public constant PRESALE_MINT_PRICE = .069 ether;
uint256 public constant PUBLICSALE_MINT_PRICE = .08 ether;
uint256 public constant PESTAS_MINT_COST = 40000 ether;
uint256 public presaleTime = 0;
uint256 public presaleClose = 0;
uint256 public mainsaleTime = 1640282400;// 1640282400;
uint16 public phase_presale_max_tokens = 0;
uint16 public phase_max_tokens = 3888;
mapping(address => bool) whitelist;
string private baseURI;
bool public revealed = false;
PESETAS private pesetas;
constructor(address _pesetas, string memory _initNotRevealedUri) ERC721("Noble ape game", "NAG") {
}
modifier isMainsaleOpen
{
}
modifier isPresaleOpen
{
}
function mintPre(uint8 amount) external payable whenNotPaused isPresaleOpen {
uint256 minted = totalSupply();
require(<FILL_ME>)
require(amount > 0 && amount <= 3, "Invalid mint amount");
require(minted + amount <= phase_presale_max_tokens, "max presale tokens minted");
require(minted + amount <= EXPANSION_TOKENS, "max expansion tokens minted");
require(amount * PRESALE_MINT_PRICE == msg.value, "Invalid ether amount");
for (uint8 i = 0; i < amount; i++) {
minted++;
_safeMint(_msgSender(), minted);
}
}
function mintMain(uint8 amount) external payable whenNotPaused isMainsaleOpen {
}
function setPaused(bool _paused) external onlyOwner {
}
function amIWhiteListed() public view returns (bool) {
}
function addToWhiteList(address[] memory _whitelist) public onlyOwner {
}
function reveal(bool _revealed) external onlyOwner {
}
function setMainsaletime(uint256 time) external onlyOwner {
}
function setPresaletime(uint256 time) external onlyOwner {
}
function setPresaleclosetime(uint256 time) external onlyOwner {
}
function updatePsts(address psts) external onlyOwner {
}
function setPhaseMaxTokens(uint16 max) external onlyOwner {
}
function setPhasePresaleMaxTokens(uint16 max) external onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory uri)
{
}
}
| amIWhiteListed(),"You are not Whitelisted" | 345,901 | amIWhiteListed() |
"max presale tokens minted" | pragma solidity ^0.8.0;
contract Nobleape is ERC721Enumerable, Ownable, Pausable {
uint16 public constant MAX_TOKENS = 50000;
uint16 public constant EXPANSION_TOKENS = 10000;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public constant PRESALE_MINT_PRICE = .069 ether;
uint256 public constant PUBLICSALE_MINT_PRICE = .08 ether;
uint256 public constant PESTAS_MINT_COST = 40000 ether;
uint256 public presaleTime = 0;
uint256 public presaleClose = 0;
uint256 public mainsaleTime = 1640282400;// 1640282400;
uint16 public phase_presale_max_tokens = 0;
uint16 public phase_max_tokens = 3888;
mapping(address => bool) whitelist;
string private baseURI;
bool public revealed = false;
PESETAS private pesetas;
constructor(address _pesetas, string memory _initNotRevealedUri) ERC721("Noble ape game", "NAG") {
}
modifier isMainsaleOpen
{
}
modifier isPresaleOpen
{
}
function mintPre(uint8 amount) external payable whenNotPaused isPresaleOpen {
uint256 minted = totalSupply();
require(amIWhiteListed(), "You are not Whitelisted");
require(amount > 0 && amount <= 3, "Invalid mint amount");
require(<FILL_ME>)
require(minted + amount <= EXPANSION_TOKENS, "max expansion tokens minted");
require(amount * PRESALE_MINT_PRICE == msg.value, "Invalid ether amount");
for (uint8 i = 0; i < amount; i++) {
minted++;
_safeMint(_msgSender(), minted);
}
}
function mintMain(uint8 amount) external payable whenNotPaused isMainsaleOpen {
}
function setPaused(bool _paused) external onlyOwner {
}
function amIWhiteListed() public view returns (bool) {
}
function addToWhiteList(address[] memory _whitelist) public onlyOwner {
}
function reveal(bool _revealed) external onlyOwner {
}
function setMainsaletime(uint256 time) external onlyOwner {
}
function setPresaletime(uint256 time) external onlyOwner {
}
function setPresaleclosetime(uint256 time) external onlyOwner {
}
function updatePsts(address psts) external onlyOwner {
}
function setPhaseMaxTokens(uint16 max) external onlyOwner {
}
function setPhasePresaleMaxTokens(uint16 max) external onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory uri)
{
}
}
| minted+amount<=phase_presale_max_tokens,"max presale tokens minted" | 345,901 | minted+amount<=phase_presale_max_tokens |
"max expansion tokens minted" | pragma solidity ^0.8.0;
contract Nobleape is ERC721Enumerable, Ownable, Pausable {
uint16 public constant MAX_TOKENS = 50000;
uint16 public constant EXPANSION_TOKENS = 10000;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public constant PRESALE_MINT_PRICE = .069 ether;
uint256 public constant PUBLICSALE_MINT_PRICE = .08 ether;
uint256 public constant PESTAS_MINT_COST = 40000 ether;
uint256 public presaleTime = 0;
uint256 public presaleClose = 0;
uint256 public mainsaleTime = 1640282400;// 1640282400;
uint16 public phase_presale_max_tokens = 0;
uint16 public phase_max_tokens = 3888;
mapping(address => bool) whitelist;
string private baseURI;
bool public revealed = false;
PESETAS private pesetas;
constructor(address _pesetas, string memory _initNotRevealedUri) ERC721("Noble ape game", "NAG") {
}
modifier isMainsaleOpen
{
}
modifier isPresaleOpen
{
}
function mintPre(uint8 amount) external payable whenNotPaused isPresaleOpen {
uint256 minted = totalSupply();
require(amIWhiteListed(), "You are not Whitelisted");
require(amount > 0 && amount <= 3, "Invalid mint amount");
require(minted + amount <= phase_presale_max_tokens, "max presale tokens minted");
require(<FILL_ME>)
require(amount * PRESALE_MINT_PRICE == msg.value, "Invalid ether amount");
for (uint8 i = 0; i < amount; i++) {
minted++;
_safeMint(_msgSender(), minted);
}
}
function mintMain(uint8 amount) external payable whenNotPaused isMainsaleOpen {
}
function setPaused(bool _paused) external onlyOwner {
}
function amIWhiteListed() public view returns (bool) {
}
function addToWhiteList(address[] memory _whitelist) public onlyOwner {
}
function reveal(bool _revealed) external onlyOwner {
}
function setMainsaletime(uint256 time) external onlyOwner {
}
function setPresaletime(uint256 time) external onlyOwner {
}
function setPresaleclosetime(uint256 time) external onlyOwner {
}
function updatePsts(address psts) external onlyOwner {
}
function setPhaseMaxTokens(uint16 max) external onlyOwner {
}
function setPhasePresaleMaxTokens(uint16 max) external onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory uri)
{
}
}
| minted+amount<=EXPANSION_TOKENS,"max expansion tokens minted" | 345,901 | minted+amount<=EXPANSION_TOKENS |
"Invalid ether amount" | pragma solidity ^0.8.0;
contract Nobleape is ERC721Enumerable, Ownable, Pausable {
uint16 public constant MAX_TOKENS = 50000;
uint16 public constant EXPANSION_TOKENS = 10000;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public constant PRESALE_MINT_PRICE = .069 ether;
uint256 public constant PUBLICSALE_MINT_PRICE = .08 ether;
uint256 public constant PESTAS_MINT_COST = 40000 ether;
uint256 public presaleTime = 0;
uint256 public presaleClose = 0;
uint256 public mainsaleTime = 1640282400;// 1640282400;
uint16 public phase_presale_max_tokens = 0;
uint16 public phase_max_tokens = 3888;
mapping(address => bool) whitelist;
string private baseURI;
bool public revealed = false;
PESETAS private pesetas;
constructor(address _pesetas, string memory _initNotRevealedUri) ERC721("Noble ape game", "NAG") {
}
modifier isMainsaleOpen
{
}
modifier isPresaleOpen
{
}
function mintPre(uint8 amount) external payable whenNotPaused isPresaleOpen {
uint256 minted = totalSupply();
require(amIWhiteListed(), "You are not Whitelisted");
require(amount > 0 && amount <= 3, "Invalid mint amount");
require(minted + amount <= phase_presale_max_tokens, "max presale tokens minted");
require(minted + amount <= EXPANSION_TOKENS, "max expansion tokens minted");
require(<FILL_ME>)
for (uint8 i = 0; i < amount; i++) {
minted++;
_safeMint(_msgSender(), minted);
}
}
function mintMain(uint8 amount) external payable whenNotPaused isMainsaleOpen {
}
function setPaused(bool _paused) external onlyOwner {
}
function amIWhiteListed() public view returns (bool) {
}
function addToWhiteList(address[] memory _whitelist) public onlyOwner {
}
function reveal(bool _revealed) external onlyOwner {
}
function setMainsaletime(uint256 time) external onlyOwner {
}
function setPresaletime(uint256 time) external onlyOwner {
}
function setPresaleclosetime(uint256 time) external onlyOwner {
}
function updatePsts(address psts) external onlyOwner {
}
function setPhaseMaxTokens(uint16 max) external onlyOwner {
}
function setPhasePresaleMaxTokens(uint16 max) external onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory uri)
{
}
}
| amount*PRESALE_MINT_PRICE==msg.value,"Invalid ether amount" | 345,901 | amount*PRESALE_MINT_PRICE==msg.value |
"max tokens minted" | pragma solidity ^0.8.0;
contract Nobleape is ERC721Enumerable, Ownable, Pausable {
uint16 public constant MAX_TOKENS = 50000;
uint16 public constant EXPANSION_TOKENS = 10000;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public constant PRESALE_MINT_PRICE = .069 ether;
uint256 public constant PUBLICSALE_MINT_PRICE = .08 ether;
uint256 public constant PESTAS_MINT_COST = 40000 ether;
uint256 public presaleTime = 0;
uint256 public presaleClose = 0;
uint256 public mainsaleTime = 1640282400;// 1640282400;
uint16 public phase_presale_max_tokens = 0;
uint16 public phase_max_tokens = 3888;
mapping(address => bool) whitelist;
string private baseURI;
bool public revealed = false;
PESETAS private pesetas;
constructor(address _pesetas, string memory _initNotRevealedUri) ERC721("Noble ape game", "NAG") {
}
modifier isMainsaleOpen
{
}
modifier isPresaleOpen
{
}
function mintPre(uint8 amount) external payable whenNotPaused isPresaleOpen {
}
function mintMain(uint8 amount) external payable whenNotPaused isMainsaleOpen {
uint256 minted = totalSupply();
require(tx.origin == _msgSender(), "Only EOA");
require(<FILL_ME>)
require(amount > 0 && amount <= 10, "Invalid mint amount");
if (minted < EXPANSION_TOKENS) {
require(
minted + amount <= EXPANSION_TOKENS,
"All expansion tokens already minted"
);
require(
amount * PUBLICSALE_MINT_PRICE == msg.value,
"Invalid ether amount"
);
} else {
require(msg.value == 0, "no ether required");
uint256 cost = minted + amount < 20000 ? PESTAS_MINT_COST : PESTAS_MINT_COST * 2;
pesetas.burn(_msgSender(), cost * amount);
}
for (uint256 i = 0; i < amount; i++) {
minted++;
_safeMint(_msgSender(), minted);
}
}
function setPaused(bool _paused) external onlyOwner {
}
function amIWhiteListed() public view returns (bool) {
}
function addToWhiteList(address[] memory _whitelist) public onlyOwner {
}
function reveal(bool _revealed) external onlyOwner {
}
function setMainsaletime(uint256 time) external onlyOwner {
}
function setPresaletime(uint256 time) external onlyOwner {
}
function setPresaleclosetime(uint256 time) external onlyOwner {
}
function updatePsts(address psts) external onlyOwner {
}
function setPhaseMaxTokens(uint16 max) external onlyOwner {
}
function setPhasePresaleMaxTokens(uint16 max) external onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory uri)
{
}
}
| minted+amount<=phase_max_tokens,"max tokens minted" | 345,901 | minted+amount<=phase_max_tokens |
"Invalid ether amount" | pragma solidity ^0.8.0;
contract Nobleape is ERC721Enumerable, Ownable, Pausable {
uint16 public constant MAX_TOKENS = 50000;
uint16 public constant EXPANSION_TOKENS = 10000;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public constant PRESALE_MINT_PRICE = .069 ether;
uint256 public constant PUBLICSALE_MINT_PRICE = .08 ether;
uint256 public constant PESTAS_MINT_COST = 40000 ether;
uint256 public presaleTime = 0;
uint256 public presaleClose = 0;
uint256 public mainsaleTime = 1640282400;// 1640282400;
uint16 public phase_presale_max_tokens = 0;
uint16 public phase_max_tokens = 3888;
mapping(address => bool) whitelist;
string private baseURI;
bool public revealed = false;
PESETAS private pesetas;
constructor(address _pesetas, string memory _initNotRevealedUri) ERC721("Noble ape game", "NAG") {
}
modifier isMainsaleOpen
{
}
modifier isPresaleOpen
{
}
function mintPre(uint8 amount) external payable whenNotPaused isPresaleOpen {
}
function mintMain(uint8 amount) external payable whenNotPaused isMainsaleOpen {
uint256 minted = totalSupply();
require(tx.origin == _msgSender(), "Only EOA");
require(minted + amount <= phase_max_tokens, "max tokens minted");
require(amount > 0 && amount <= 10, "Invalid mint amount");
if (minted < EXPANSION_TOKENS) {
require(
minted + amount <= EXPANSION_TOKENS,
"All expansion tokens already minted"
);
require(<FILL_ME>)
} else {
require(msg.value == 0, "no ether required");
uint256 cost = minted + amount < 20000 ? PESTAS_MINT_COST : PESTAS_MINT_COST * 2;
pesetas.burn(_msgSender(), cost * amount);
}
for (uint256 i = 0; i < amount; i++) {
minted++;
_safeMint(_msgSender(), minted);
}
}
function setPaused(bool _paused) external onlyOwner {
}
function amIWhiteListed() public view returns (bool) {
}
function addToWhiteList(address[] memory _whitelist) public onlyOwner {
}
function reveal(bool _revealed) external onlyOwner {
}
function setMainsaletime(uint256 time) external onlyOwner {
}
function setPresaletime(uint256 time) external onlyOwner {
}
function setPresaleclosetime(uint256 time) external onlyOwner {
}
function updatePsts(address psts) external onlyOwner {
}
function setPhaseMaxTokens(uint16 max) external onlyOwner {
}
function setPhasePresaleMaxTokens(uint16 max) external onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory uri)
{
}
}
| amount*PUBLICSALE_MINT_PRICE==msg.value,"Invalid ether amount" | 345,901 | amount*PUBLICSALE_MINT_PRICE==msg.value |
"Exceed max supply!" | //SPDX-License-Identifier: MIT
/*
__________________________ ,.,,uod8B8bou,,.,
\________|:|______________\ .:i!T?TFRRBBBBBBBBBBBBBBBB8bou,..
_|:|_________ ||||||||||||||||?TFRRBBBBBBBBBBBBBB8m:.
__|:::| \ \__ |||| '""^^!!||||||||TFRRBBBVT!:---!
_/ |:::| \ \_ |||| '""^^!!|||||||?!:---!
_/ |:::| \ \_ |||| |^_^| ||||------!
/ |:::| \__________\ S |||| ||||------!
|_______|:::|______\__________\ S |||| [1] ||||------!
| /:::::::\ __ __ | s |||| [ ] [3] ||||------!
| |:::::::::| |__||__| | s |||| [1] [1] [*] ||||------!
| | ::::::::| | s |||| [2] [ ] ||||------!
| | ::::::::| __|______ |||| [ ] ||||------!
\ \_______/ ________|_________O |||||||-._ ||||------!
\_ _/ ':!||||||||||||-._. ||||------!
\_ _/ .dBBBBBBBBB86ior!|||||||||||-..:|||!------'
\__ __/ .= =!?TFBBBBBBBBB86ijaad|||||||||||!!BBBBBY-',!
\\\ \____________/ _ .= = = = = = !?TFBBBBBBBBB86ijiaadBBBBBBBBY-',!
\\\ \ \_ _____________|*|______ .= = = = = = = = = = !?TFBBBBBBBBBBBBBBBY- -',!
\\\ \ \___/ = .od86ioi.= = = = = = = = = = = = !?TFBBBY- - -','
\\\ \_ \_____________________ .d888888888888aioi.= = = = = = = = = = = - - -','
\\\ \__ \___ .d88888888888888888888aioi.= = = = = = = = - -','
\\\ \__ \____ .d888888888888888888888888888888aioi.= = = = -','
\\\ \ \ !|Ti998888888888888888888888888888888899aioi',','
_ __
_ __ ___ [_] _ __ ___ / _| ___ _ __ ___ _|#|_
| '_ ` _ \ | | | '_ \ / _ \ | |_ / _ \ | '__| / __| _/#####\_
| | | | | | | | | | | | | __/ | _| | __/ | | \__ \ |#|#####|#|
|_| |_| |_| |_| |_| |_| \___| |_| \___| |_| |___/ -\#####/-
-|#|-
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract Minefers is ERC721A, Ownable {
string public constant PROVENANCE = "0x61f26565ff0c361a38e4d45af36f1257";
uint256 public constant MAX_TOKEN_SUPPLY = 10005;
uint256 public maxWhitelistNum = 2000;
uint256 public claimedWhitelistNum = 0;
bytes32 public whitelistMerkleRoot = 0x0;
mapping(address => uint256) public addrWhitelistNum;
mapping(address => uint256) public addrPublicNum;
string private baseURI;
constructor(uint256 _maxWhitelistNum) ERC721A("Minefers", "Minefers") {
}
modifier verifySupply(uint256 mintNum) {
require(mintNum > 0, "At least mint 1 token!");
require(<FILL_ME>)
_;
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _uri) external onlyOwner {
}
function reserveMint(address to, uint256 quantity)
external
onlyOwner
verifySupply(quantity)
{
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function whitelistMint(bytes32[] calldata _merkleProof)
public
verifySupply(1)
{
}
function publicMint(uint256 quantity)
public
payable
verifySupply(quantity)
{
}
function withdraw() external payable onlyOwner {
}
}
| totalSupply()+mintNum<=MAX_TOKEN_SUPPLY,"Exceed max supply!" | 345,902 | totalSupply()+mintNum<=MAX_TOKEN_SUPPLY |
"Only allow mint 1" | //SPDX-License-Identifier: MIT
/*
__________________________ ,.,,uod8B8bou,,.,
\________|:|______________\ .:i!T?TFRRBBBBBBBBBBBBBBBB8bou,..
_|:|_________ ||||||||||||||||?TFRRBBBBBBBBBBBBBB8m:.
__|:::| \ \__ |||| '""^^!!||||||||TFRRBBBVT!:---!
_/ |:::| \ \_ |||| '""^^!!|||||||?!:---!
_/ |:::| \ \_ |||| |^_^| ||||------!
/ |:::| \__________\ S |||| ||||------!
|_______|:::|______\__________\ S |||| [1] ||||------!
| /:::::::\ __ __ | s |||| [ ] [3] ||||------!
| |:::::::::| |__||__| | s |||| [1] [1] [*] ||||------!
| | ::::::::| | s |||| [2] [ ] ||||------!
| | ::::::::| __|______ |||| [ ] ||||------!
\ \_______/ ________|_________O |||||||-._ ||||------!
\_ _/ ':!||||||||||||-._. ||||------!
\_ _/ .dBBBBBBBBB86ior!|||||||||||-..:|||!------'
\__ __/ .= =!?TFBBBBBBBBB86ijaad|||||||||||!!BBBBBY-',!
\\\ \____________/ _ .= = = = = = !?TFBBBBBBBBB86ijiaadBBBBBBBBY-',!
\\\ \ \_ _____________|*|______ .= = = = = = = = = = !?TFBBBBBBBBBBBBBBBY- -',!
\\\ \ \___/ = .od86ioi.= = = = = = = = = = = = !?TFBBBY- - -','
\\\ \_ \_____________________ .d888888888888aioi.= = = = = = = = = = = - - -','
\\\ \__ \___ .d88888888888888888888aioi.= = = = = = = = - -','
\\\ \__ \____ .d888888888888888888888888888888aioi.= = = = -','
\\\ \ \ !|Ti998888888888888888888888888888888899aioi',','
_ __
_ __ ___ [_] _ __ ___ / _| ___ _ __ ___ _|#|_
| '_ ` _ \ | | | '_ \ / _ \ | |_ / _ \ | '__| / __| _/#####\_
| | | | | | | | | | | | | __/ | _| | __/ | | \__ \ |#|#####|#|
|_| |_| |_| |_| |_| |_| \___| |_| \___| |_| |___/ -\#####/-
-|#|-
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract Minefers is ERC721A, Ownable {
string public constant PROVENANCE = "0x61f26565ff0c361a38e4d45af36f1257";
uint256 public constant MAX_TOKEN_SUPPLY = 10005;
uint256 public maxWhitelistNum = 2000;
uint256 public claimedWhitelistNum = 0;
bytes32 public whitelistMerkleRoot = 0x0;
mapping(address => uint256) public addrWhitelistNum;
mapping(address => uint256) public addrPublicNum;
string private baseURI;
constructor(uint256 _maxWhitelistNum) ERC721A("Minefers", "Minefers") {
}
modifier verifySupply(uint256 mintNum) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _uri) external onlyOwner {
}
function reserveMint(address to, uint256 quantity)
external
onlyOwner
verifySupply(quantity)
{
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function whitelistMint(bytes32[] calldata _merkleProof)
public
verifySupply(1)
{
require(<FILL_ME>)
require(
claimedWhitelistNum + 1 <= maxWhitelistNum,
"Reach max whitelist limit!"
);
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, whitelistMerkleRoot, leaf),
"Invalid Merkle proof."
);
claimedWhitelistNum += 1;
addrWhitelistNum[msg.sender] += 1;
_safeMint(msg.sender, 1);
}
function publicMint(uint256 quantity)
public
payable
verifySupply(quantity)
{
}
function withdraw() external payable onlyOwner {
}
}
| addrWhitelistNum[msg.sender]==0,"Only allow mint 1" | 345,902 | addrWhitelistNum[msg.sender]==0 |
"Reach max whitelist limit!" | //SPDX-License-Identifier: MIT
/*
__________________________ ,.,,uod8B8bou,,.,
\________|:|______________\ .:i!T?TFRRBBBBBBBBBBBBBBBB8bou,..
_|:|_________ ||||||||||||||||?TFRRBBBBBBBBBBBBBB8m:.
__|:::| \ \__ |||| '""^^!!||||||||TFRRBBBVT!:---!
_/ |:::| \ \_ |||| '""^^!!|||||||?!:---!
_/ |:::| \ \_ |||| |^_^| ||||------!
/ |:::| \__________\ S |||| ||||------!
|_______|:::|______\__________\ S |||| [1] ||||------!
| /:::::::\ __ __ | s |||| [ ] [3] ||||------!
| |:::::::::| |__||__| | s |||| [1] [1] [*] ||||------!
| | ::::::::| | s |||| [2] [ ] ||||------!
| | ::::::::| __|______ |||| [ ] ||||------!
\ \_______/ ________|_________O |||||||-._ ||||------!
\_ _/ ':!||||||||||||-._. ||||------!
\_ _/ .dBBBBBBBBB86ior!|||||||||||-..:|||!------'
\__ __/ .= =!?TFBBBBBBBBB86ijaad|||||||||||!!BBBBBY-',!
\\\ \____________/ _ .= = = = = = !?TFBBBBBBBBB86ijiaadBBBBBBBBY-',!
\\\ \ \_ _____________|*|______ .= = = = = = = = = = !?TFBBBBBBBBBBBBBBBY- -',!
\\\ \ \___/ = .od86ioi.= = = = = = = = = = = = !?TFBBBY- - -','
\\\ \_ \_____________________ .d888888888888aioi.= = = = = = = = = = = - - -','
\\\ \__ \___ .d88888888888888888888aioi.= = = = = = = = - -','
\\\ \__ \____ .d888888888888888888888888888888aioi.= = = = -','
\\\ \ \ !|Ti998888888888888888888888888888888899aioi',','
_ __
_ __ ___ [_] _ __ ___ / _| ___ _ __ ___ _|#|_
| '_ ` _ \ | | | '_ \ / _ \ | |_ / _ \ | '__| / __| _/#####\_
| | | | | | | | | | | | | __/ | _| | __/ | | \__ \ |#|#####|#|
|_| |_| |_| |_| |_| |_| \___| |_| \___| |_| |___/ -\#####/-
-|#|-
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract Minefers is ERC721A, Ownable {
string public constant PROVENANCE = "0x61f26565ff0c361a38e4d45af36f1257";
uint256 public constant MAX_TOKEN_SUPPLY = 10005;
uint256 public maxWhitelistNum = 2000;
uint256 public claimedWhitelistNum = 0;
bytes32 public whitelistMerkleRoot = 0x0;
mapping(address => uint256) public addrWhitelistNum;
mapping(address => uint256) public addrPublicNum;
string private baseURI;
constructor(uint256 _maxWhitelistNum) ERC721A("Minefers", "Minefers") {
}
modifier verifySupply(uint256 mintNum) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _uri) external onlyOwner {
}
function reserveMint(address to, uint256 quantity)
external
onlyOwner
verifySupply(quantity)
{
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function whitelistMint(bytes32[] calldata _merkleProof)
public
verifySupply(1)
{
require(addrWhitelistNum[msg.sender] == 0, "Only allow mint 1");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, whitelistMerkleRoot, leaf),
"Invalid Merkle proof."
);
claimedWhitelistNum += 1;
addrWhitelistNum[msg.sender] += 1;
_safeMint(msg.sender, 1);
}
function publicMint(uint256 quantity)
public
payable
verifySupply(quantity)
{
}
function withdraw() external payable onlyOwner {
}
}
| claimedWhitelistNum+1<=maxWhitelistNum,"Reach max whitelist limit!" | 345,902 | claimedWhitelistNum+1<=maxWhitelistNum |
"Not enough balance" | pragma solidity 0.4.23;
/**
* @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) {
}
}
contract SuterToken {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
}
contract SuterLock {
using SafeMath for uint256;
SuterToken public token;
address public admin_address = 0x0713591DBdA93C1E5F407aBEF044a0FaF9F2f212;
uint256 public user_release_time = 1665331200; // 2022/10/10 0:0:0 UTC+8
uint256 public contract_release_time = 1625068800; // 2021/7/1 0:0:0 UTC+8
uint256 public release_ratio = 278;
uint256 ratio_base = 100000;
uint256 public amount_per_day = 4104000 ether;
uint256 day_time = 86400; // Seconds of one day.
uint256 public day_amount = 360;
uint256 public start_time;
uint256 public releasedAmount;
uint256 public user_lock_amount;
uint256 public contract_lock_amount;
uint256 valid_amount;
mapping(address => uint256) public lockedAmount;
// Events.
event LockToken(address indexed target, uint256 amount);
event ReleaseToken(address indexed target, uint256 amount);
constructor() public {
}
// Lock tokens for the specified address.
function lockToken(address _target, uint256 _amount) public admin_only {
require(_target != address(0), "target is a zero address");
require(now < user_release_time, "Current time is greater than lock time");
// Check if the token is enough.
if (contract_lock_amount == 0) {
uint256 num = (now.sub(start_time)).div(day_time).mul(amount_per_day);
if (num > valid_amount) {
num = valid_amount;
}
require(<FILL_ME>)
} else {
require(token.balanceOf(address(this)).add(releasedAmount).sub(contract_lock_amount).sub(user_lock_amount) >= _amount, "Not enough balance");
}
lockedAmount[_target] = lockedAmount[_target].add(_amount);
user_lock_amount = user_lock_amount.add(_amount);
emit LockToken(_target, _amount);
}
// Release the lock-up token at the specified address.
function releaseTokenToUser(address _target) public {
}
// Release the tokens locked in the contract to the address 'admin_address'.
function releaseTokenToAdmin() public admin_only {
}
// This function is used to withdraw the extra Suter tokens in the contract, the caller must be 'admin_address'.
function withdrawSuter() public admin_only {
}
modifier admin_only() {
}
function setAdmin( address new_admin_address ) public admin_only returns (bool) {
}
function withDraw() public admin_only {
}
function () external payable {
}
// The releasable tokens of specified address at the current time.
function releasableAmountOfUser(address _target) public view returns (uint256) {
}
// The releasable tokens of contract.
function releasableAmountOfContract() public view returns (uint256) {
}
// Get the amount of tokens used for contract lockup.
function getContractLockAmount() public view returns(uint256 num2) {
}
}
| token.balanceOf(address(this)).sub(num).sub(user_lock_amount)>=_amount,"Not enough balance" | 345,963 | token.balanceOf(address(this)).sub(num).sub(user_lock_amount)>=_amount |
"Not enough balance" | pragma solidity 0.4.23;
/**
* @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) {
}
}
contract SuterToken {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
}
contract SuterLock {
using SafeMath for uint256;
SuterToken public token;
address public admin_address = 0x0713591DBdA93C1E5F407aBEF044a0FaF9F2f212;
uint256 public user_release_time = 1665331200; // 2022/10/10 0:0:0 UTC+8
uint256 public contract_release_time = 1625068800; // 2021/7/1 0:0:0 UTC+8
uint256 public release_ratio = 278;
uint256 ratio_base = 100000;
uint256 public amount_per_day = 4104000 ether;
uint256 day_time = 86400; // Seconds of one day.
uint256 public day_amount = 360;
uint256 public start_time;
uint256 public releasedAmount;
uint256 public user_lock_amount;
uint256 public contract_lock_amount;
uint256 valid_amount;
mapping(address => uint256) public lockedAmount;
// Events.
event LockToken(address indexed target, uint256 amount);
event ReleaseToken(address indexed target, uint256 amount);
constructor() public {
}
// Lock tokens for the specified address.
function lockToken(address _target, uint256 _amount) public admin_only {
require(_target != address(0), "target is a zero address");
require(now < user_release_time, "Current time is greater than lock time");
// Check if the token is enough.
if (contract_lock_amount == 0) {
uint256 num = (now.sub(start_time)).div(day_time).mul(amount_per_day);
if (num > valid_amount) {
num = valid_amount;
}
require(token.balanceOf(address(this)).sub(num).sub(user_lock_amount) >= _amount, "Not enough balance");
} else {
require(<FILL_ME>)
}
lockedAmount[_target] = lockedAmount[_target].add(_amount);
user_lock_amount = user_lock_amount.add(_amount);
emit LockToken(_target, _amount);
}
// Release the lock-up token at the specified address.
function releaseTokenToUser(address _target) public {
}
// Release the tokens locked in the contract to the address 'admin_address'.
function releaseTokenToAdmin() public admin_only {
}
// This function is used to withdraw the extra Suter tokens in the contract, the caller must be 'admin_address'.
function withdrawSuter() public admin_only {
}
modifier admin_only() {
}
function setAdmin( address new_admin_address ) public admin_only returns (bool) {
}
function withDraw() public admin_only {
}
function () external payable {
}
// The releasable tokens of specified address at the current time.
function releasableAmountOfUser(address _target) public view returns (uint256) {
}
// The releasable tokens of contract.
function releasableAmountOfContract() public view returns (uint256) {
}
// Get the amount of tokens used for contract lockup.
function getContractLockAmount() public view returns(uint256 num2) {
}
}
| token.balanceOf(address(this)).add(releasedAmount).sub(contract_lock_amount).sub(user_lock_amount)>=_amount,"Not enough balance" | 345,963 | token.balanceOf(address(this)).add(releasedAmount).sub(contract_lock_amount).sub(user_lock_amount)>=_amount |
null | pragma solidity 0.4.23;
/**
* @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) {
}
}
contract SuterToken {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
}
contract SuterLock {
using SafeMath for uint256;
SuterToken public token;
address public admin_address = 0x0713591DBdA93C1E5F407aBEF044a0FaF9F2f212;
uint256 public user_release_time = 1665331200; // 2022/10/10 0:0:0 UTC+8
uint256 public contract_release_time = 1625068800; // 2021/7/1 0:0:0 UTC+8
uint256 public release_ratio = 278;
uint256 ratio_base = 100000;
uint256 public amount_per_day = 4104000 ether;
uint256 day_time = 86400; // Seconds of one day.
uint256 public day_amount = 360;
uint256 public start_time;
uint256 public releasedAmount;
uint256 public user_lock_amount;
uint256 public contract_lock_amount;
uint256 valid_amount;
mapping(address => uint256) public lockedAmount;
// Events.
event LockToken(address indexed target, uint256 amount);
event ReleaseToken(address indexed target, uint256 amount);
constructor() public {
}
// Lock tokens for the specified address.
function lockToken(address _target, uint256 _amount) public admin_only {
}
// Release the lock-up token at the specified address.
function releaseTokenToUser(address _target) public {
}
// Release the tokens locked in the contract to the address 'admin_address'.
function releaseTokenToAdmin() public admin_only {
}
// This function is used to withdraw the extra Suter tokens in the contract, the caller must be 'admin_address'.
function withdrawSuter() public admin_only {
require(contract_lock_amount > 0, "The number of token releases has not been determined");
uint256 lockAmount_ = user_lock_amount.add(contract_lock_amount).sub(releasedAmount); // The amount of tokens locked.
uint256 remainingAmount_ = token.balanceOf(address(this)).sub(lockAmount_); // The amount of extra tokens in the contract.
require(remainingAmount_ > 0, "No extra tokens");
require(<FILL_ME>)
}
modifier admin_only() {
}
function setAdmin( address new_admin_address ) public admin_only returns (bool) {
}
function withDraw() public admin_only {
}
function () external payable {
}
// The releasable tokens of specified address at the current time.
function releasableAmountOfUser(address _target) public view returns (uint256) {
}
// The releasable tokens of contract.
function releasableAmountOfContract() public view returns (uint256) {
}
// Get the amount of tokens used for contract lockup.
function getContractLockAmount() public view returns(uint256 num2) {
}
}
| token.transfer(msg.sender,remainingAmount_) | 345,963 | token.transfer(msg.sender,remainingAmount_) |
"Ether value sent is not correct" | pragma solidity ^0.8.0;
/**
______________ ______________ _________ ___________.____ .____ _________ __________________ _______ ___________
\__ ___/ | \_ _____/ \_ ___ \\_ _____/| | | | / _____/ \____ /\_____ \ \ \ \_ _____/
| | / ~ \ __)_ / \ \/ | __)_ | | | | \_____ \ / / / | \ / | \ | __)_
| | \ Y / \ \ \____| \| |___| |___ / \ / /_ / | \/ | \| \
|____| \___|_ /_______ / \______ /_______ /|_______ \_______ \/_______ / /_______ \\_______ /\____|__ /_______ /
\/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
**/
interface IERC20 {
function mint(address to, uint256 amount) external;
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
/**
* @title The Cells Zone
*
*/
contract Cells is ERC721Cells {
using ECDSA for bytes32;
bool public directMint = false;
bool public randomMint = true;
bool public packMint = false;
bool public signatureMint = true;
bool public bonusCoins = true;
uint256 public constant MAX_CELLS_PURCHASE = 25;
uint256 public constant MAX_CELLS = 29886;
uint256 public minMintable = 1;
uint256 public maxMintable = 29000;
uint256 public cellPrice = 0.025 ether;
uint256 public bonusCoinsAmount = 200;
IERC20 public celdaContract;
mapping (uint256 => uint256) public packPrices;
mapping (address => mapping(uint => bool)) private mintNonces;
constructor(address _erc20Address)
ERC721Cells("The Cells Zone", "CELLS")
{
}
function contractURI() public pure returns (string memory) {
}
function toggleDirectMint() public onlyOwner {
}
function toggleRandomMint() public onlyOwner {
}
function togglePackMint() public onlyOwner {
}
function toggleSignatureMint() public onlyOwner {
}
function toggleBonusCoins() public onlyOwner {
}
function setBonusCoinsAmount(uint amount) public onlyOwner {
}
function setCellPrice(uint256 newPrice) public onlyOwner {
}
function setPackPrice(uint packId, uint256 newPrice) public onlyOwner {
}
function setMinMintable(uint quantity) public onlyOwner {
}
function setMaxMintable(uint quantity) public onlyOwner {
}
function reserveCells(uint number, bool isRandom, uint256 data) public onlyOwner {
}
/**
* Mint Cells
*/
function mintCells(uint amount) public payable {
require(directMint, "Direct mint is not active");
require(amount >= minMintable, "Quantity too low");
require(amount <= MAX_CELLS_PURCHASE || mintedSupply + amount <= maxMintable || totalSupply() + amount <= MAX_CELLS, "Quantity too high");
require(<FILL_ME>)
mintCell(msg.sender, amount, randomMint, 0);
if (bonusCoins) {
sendBonusCoins(msg.sender, amount);
}
}
/**
* Batch Mint Cells
*/
function mintCellPack(uint amount) public payable {
}
/**
* Authorized Mint
*/
function verifyAndMint(bytes memory signature, uint amount, uint nonce, uint mintPrice, uint data) public payable {
}
function getPackPrice(uint256 _amount) internal view returns (uint256) {
}
function sendBonusCoins(address _to, uint256 _amount) internal {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function withdraw() public onlyOwner {
}
function reclaimToken(IERC20 token) public onlyOwner {
}
}
| cellPrice*amount<=msg.value,"Ether value sent is not correct" | 345,972 | cellPrice*amount<=msg.value |
"Ether value sent is not correct" | pragma solidity ^0.8.0;
/**
______________ ______________ _________ ___________.____ .____ _________ __________________ _______ ___________
\__ ___/ | \_ _____/ \_ ___ \\_ _____/| | | | / _____/ \____ /\_____ \ \ \ \_ _____/
| | / ~ \ __)_ / \ \/ | __)_ | | | | \_____ \ / / / | \ / | \ | __)_
| | \ Y / \ \ \____| \| |___| |___ / \ / /_ / | \/ | \| \
|____| \___|_ /_______ / \______ /_______ /|_______ \_______ \/_______ / /_______ \\_______ /\____|__ /_______ /
\/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
**/
interface IERC20 {
function mint(address to, uint256 amount) external;
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
/**
* @title The Cells Zone
*
*/
contract Cells is ERC721Cells {
using ECDSA for bytes32;
bool public directMint = false;
bool public randomMint = true;
bool public packMint = false;
bool public signatureMint = true;
bool public bonusCoins = true;
uint256 public constant MAX_CELLS_PURCHASE = 25;
uint256 public constant MAX_CELLS = 29886;
uint256 public minMintable = 1;
uint256 public maxMintable = 29000;
uint256 public cellPrice = 0.025 ether;
uint256 public bonusCoinsAmount = 200;
IERC20 public celdaContract;
mapping (uint256 => uint256) public packPrices;
mapping (address => mapping(uint => bool)) private mintNonces;
constructor(address _erc20Address)
ERC721Cells("The Cells Zone", "CELLS")
{
}
function contractURI() public pure returns (string memory) {
}
function toggleDirectMint() public onlyOwner {
}
function toggleRandomMint() public onlyOwner {
}
function togglePackMint() public onlyOwner {
}
function toggleSignatureMint() public onlyOwner {
}
function toggleBonusCoins() public onlyOwner {
}
function setBonusCoinsAmount(uint amount) public onlyOwner {
}
function setCellPrice(uint256 newPrice) public onlyOwner {
}
function setPackPrice(uint packId, uint256 newPrice) public onlyOwner {
}
function setMinMintable(uint quantity) public onlyOwner {
}
function setMaxMintable(uint quantity) public onlyOwner {
}
function reserveCells(uint number, bool isRandom, uint256 data) public onlyOwner {
}
/**
* Mint Cells
*/
function mintCells(uint amount) public payable {
}
/**
* Batch Mint Cells
*/
function mintCellPack(uint amount) public payable {
require(packMint, "Pack mint is not active");
require(amount >= minMintable, "Quantity too low");
require(amount <= MAX_CELLS_PURCHASE || mintedSupply + amount <= maxMintable || totalSupply() + amount <= MAX_CELLS, "Quantity too high");
require(<FILL_ME>)
mintCell(msg.sender, amount, randomMint, 0);
if (bonusCoins) {
sendBonusCoins(msg.sender, amount);
}
}
/**
* Authorized Mint
*/
function verifyAndMint(bytes memory signature, uint amount, uint nonce, uint mintPrice, uint data) public payable {
}
function getPackPrice(uint256 _amount) internal view returns (uint256) {
}
function sendBonusCoins(address _to, uint256 _amount) internal {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function withdraw() public onlyOwner {
}
function reclaimToken(IERC20 token) public onlyOwner {
}
}
| getPackPrice(amount)*amount<=msg.value,"Ether value sent is not correct" | 345,972 | getPackPrice(amount)*amount<=msg.value |
"Nonce already used" | pragma solidity ^0.8.0;
/**
______________ ______________ _________ ___________.____ .____ _________ __________________ _______ ___________
\__ ___/ | \_ _____/ \_ ___ \\_ _____/| | | | / _____/ \____ /\_____ \ \ \ \_ _____/
| | / ~ \ __)_ / \ \/ | __)_ | | | | \_____ \ / / / | \ / | \ | __)_
| | \ Y / \ \ \____| \| |___| |___ / \ / /_ / | \/ | \| \
|____| \___|_ /_______ / \______ /_______ /|_______ \_______ \/_______ / /_______ \\_______ /\____|__ /_______ /
\/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
**/
interface IERC20 {
function mint(address to, uint256 amount) external;
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
/**
* @title The Cells Zone
*
*/
contract Cells is ERC721Cells {
using ECDSA for bytes32;
bool public directMint = false;
bool public randomMint = true;
bool public packMint = false;
bool public signatureMint = true;
bool public bonusCoins = true;
uint256 public constant MAX_CELLS_PURCHASE = 25;
uint256 public constant MAX_CELLS = 29886;
uint256 public minMintable = 1;
uint256 public maxMintable = 29000;
uint256 public cellPrice = 0.025 ether;
uint256 public bonusCoinsAmount = 200;
IERC20 public celdaContract;
mapping (uint256 => uint256) public packPrices;
mapping (address => mapping(uint => bool)) private mintNonces;
constructor(address _erc20Address)
ERC721Cells("The Cells Zone", "CELLS")
{
}
function contractURI() public pure returns (string memory) {
}
function toggleDirectMint() public onlyOwner {
}
function toggleRandomMint() public onlyOwner {
}
function togglePackMint() public onlyOwner {
}
function toggleSignatureMint() public onlyOwner {
}
function toggleBonusCoins() public onlyOwner {
}
function setBonusCoinsAmount(uint amount) public onlyOwner {
}
function setCellPrice(uint256 newPrice) public onlyOwner {
}
function setPackPrice(uint packId, uint256 newPrice) public onlyOwner {
}
function setMinMintable(uint quantity) public onlyOwner {
}
function setMaxMintable(uint quantity) public onlyOwner {
}
function reserveCells(uint number, bool isRandom, uint256 data) public onlyOwner {
}
/**
* Mint Cells
*/
function mintCells(uint amount) public payable {
}
/**
* Batch Mint Cells
*/
function mintCellPack(uint amount) public payable {
}
/**
* Authorized Mint
*/
function verifyAndMint(bytes memory signature, uint amount, uint nonce, uint mintPrice, uint data) public payable {
require(signatureMint, "Signature mint is not active");
require(amount >= minMintable, "Quantity too low");
require(amount <= MAX_CELLS_PURCHASE || mintedSupply + amount <= maxMintable || totalSupply() + amount <= MAX_CELLS, "Quantity too high");
require(<FILL_ME>)
uint price;
if (mintPrice == 1) {
price = getPackPrice(amount);
} else if (mintPrice == 2) {
price = cellPrice;
} else {
price = mintPrice;
}
require(price * amount <= msg.value, "Ether value sent is not correct");
bytes32 hash = keccak256(abi.encode(msg.sender, amount, nonce, mintPrice, data));
bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
address signer = messageHash.recover(signature);
require(signer == signerAddress, "Signers don't match");
mintNonces[msg.sender][nonce] = true;
mintCell(msg.sender, amount, randomMint, data);
if (bonusCoins) {
sendBonusCoins(msg.sender, amount);
}
}
function getPackPrice(uint256 _amount) internal view returns (uint256) {
}
function sendBonusCoins(address _to, uint256 _amount) internal {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function withdraw() public onlyOwner {
}
function reclaimToken(IERC20 token) public onlyOwner {
}
}
| !mintNonces[msg.sender][nonce],"Nonce already used" | 345,972 | !mintNonces[msg.sender][nonce] |
"NONEXISTENT_TOKEN" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import "@openzeppelin/contracts/utils/Counters.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/Pausable.sol";
import '@openzeppelin/contracts/math/SafeMath.sol';
library UintLibrary {
function toString(uint256 _i) internal pure returns (string memory) {
}
}
library StringLibrary {
using UintLibrary for uint256;
function append(string memory _a, string memory _b) internal pure returns (string memory) {
}
function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
}
function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
}
function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
}
}
contract NiftysistasTraits is ERC1155, Ownable, Pausable {
using SafeMath for uint;
bool isSistasFinalized;
bool isBratsFinalized;
address sistasContract;
address bratsContract;
uint[] private specialTraits = [551, 565, 610, 617, 650, 706, 759, 770, 790, 818];
uint private rn = 0;
string public _name;
string public _symbol;
mapping (uint => bool) private claimedMap;
mapping (uint256 => uint256) public tokenSupply;
NiftydudesContract public dudesContract = NiftydudesContract(0x892555E75350E11f2058d086C72b9C94C9493d72);
constructor (string memory name_, string memory symbol_) ERC1155("https://niftysistas.com/traits/metadata/") {
}
function mint(uint[] calldata traits, address to) external {
}
function setURI(string memory baseURI) external onlyOwner {
}
function uri(uint256 _id) public view override returns (string memory) {
require(<FILL_ME>)
return StringLibrary.append(super.uri(_id), UintLibrary.toString(_id)
);
}
function totalSupply(uint256 _id) public view returns (uint256) {
}
function setSistasContract(address _address) external onlyOwner {
}
function setBratsContract(address _address) external onlyOwner {
}
function finalizeSistas() external onlyOwner {
}
function finalizeBrats() external onlyOwner {
}
function burn(address account, uint256 tokenId, uint256 amount) external {
}
function claimSpecialTrait(uint[] calldata dudeIds) external {
}
function randomizeSpecialTraits() external {
}
function getSpecialTraitIfNotClaimed(uint256[] calldata dudeIDs) external view returns (uint[] memory) {
}
function endClaiming() external onlyOwner {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
}
interface NiftydudesContract {
function ownerOf(uint dudeId) external view returns (address);
}
| tokenSupply[_id]>0,"NONEXISTENT_TOKEN" | 345,992 | tokenSupply[_id]>0 |
"not possible when finalized" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import "@openzeppelin/contracts/utils/Counters.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/Pausable.sol";
import '@openzeppelin/contracts/math/SafeMath.sol';
library UintLibrary {
function toString(uint256 _i) internal pure returns (string memory) {
}
}
library StringLibrary {
using UintLibrary for uint256;
function append(string memory _a, string memory _b) internal pure returns (string memory) {
}
function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
}
function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
}
function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
}
}
contract NiftysistasTraits is ERC1155, Ownable, Pausable {
using SafeMath for uint;
bool isSistasFinalized;
bool isBratsFinalized;
address sistasContract;
address bratsContract;
uint[] private specialTraits = [551, 565, 610, 617, 650, 706, 759, 770, 790, 818];
uint private rn = 0;
string public _name;
string public _symbol;
mapping (uint => bool) private claimedMap;
mapping (uint256 => uint256) public tokenSupply;
NiftydudesContract public dudesContract = NiftydudesContract(0x892555E75350E11f2058d086C72b9C94C9493d72);
constructor (string memory name_, string memory symbol_) ERC1155("https://niftysistas.com/traits/metadata/") {
}
function mint(uint[] calldata traits, address to) external {
}
function setURI(string memory baseURI) external onlyOwner {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function totalSupply(uint256 _id) public view returns (uint256) {
}
function setSistasContract(address _address) external onlyOwner {
require(<FILL_ME>)
sistasContract = _address;
}
function setBratsContract(address _address) external onlyOwner {
}
function finalizeSistas() external onlyOwner {
}
function finalizeBrats() external onlyOwner {
}
function burn(address account, uint256 tokenId, uint256 amount) external {
}
function claimSpecialTrait(uint[] calldata dudeIds) external {
}
function randomizeSpecialTraits() external {
}
function getSpecialTraitIfNotClaimed(uint256[] calldata dudeIDs) external view returns (uint[] memory) {
}
function endClaiming() external onlyOwner {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
}
interface NiftydudesContract {
function ownerOf(uint dudeId) external view returns (address);
}
| !isSistasFinalized,"not possible when finalized" | 345,992 | !isSistasFinalized |
"not possible when finalized" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import "@openzeppelin/contracts/utils/Counters.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/Pausable.sol";
import '@openzeppelin/contracts/math/SafeMath.sol';
library UintLibrary {
function toString(uint256 _i) internal pure returns (string memory) {
}
}
library StringLibrary {
using UintLibrary for uint256;
function append(string memory _a, string memory _b) internal pure returns (string memory) {
}
function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
}
function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
}
function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
}
}
contract NiftysistasTraits is ERC1155, Ownable, Pausable {
using SafeMath for uint;
bool isSistasFinalized;
bool isBratsFinalized;
address sistasContract;
address bratsContract;
uint[] private specialTraits = [551, 565, 610, 617, 650, 706, 759, 770, 790, 818];
uint private rn = 0;
string public _name;
string public _symbol;
mapping (uint => bool) private claimedMap;
mapping (uint256 => uint256) public tokenSupply;
NiftydudesContract public dudesContract = NiftydudesContract(0x892555E75350E11f2058d086C72b9C94C9493d72);
constructor (string memory name_, string memory symbol_) ERC1155("https://niftysistas.com/traits/metadata/") {
}
function mint(uint[] calldata traits, address to) external {
}
function setURI(string memory baseURI) external onlyOwner {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function totalSupply(uint256 _id) public view returns (uint256) {
}
function setSistasContract(address _address) external onlyOwner {
}
function setBratsContract(address _address) external onlyOwner {
require(<FILL_ME>)
bratsContract = _address;
}
function finalizeSistas() external onlyOwner {
}
function finalizeBrats() external onlyOwner {
}
function burn(address account, uint256 tokenId, uint256 amount) external {
}
function claimSpecialTrait(uint[] calldata dudeIds) external {
}
function randomizeSpecialTraits() external {
}
function getSpecialTraitIfNotClaimed(uint256[] calldata dudeIDs) external view returns (uint[] memory) {
}
function endClaiming() external onlyOwner {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
}
interface NiftydudesContract {
function ownerOf(uint dudeId) external view returns (address);
}
| !isBratsFinalized,"not possible when finalized" | 345,992 | !isBratsFinalized |
"sender is not owner of dude" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import "@openzeppelin/contracts/utils/Counters.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/Pausable.sol";
import '@openzeppelin/contracts/math/SafeMath.sol';
library UintLibrary {
function toString(uint256 _i) internal pure returns (string memory) {
}
}
library StringLibrary {
using UintLibrary for uint256;
function append(string memory _a, string memory _b) internal pure returns (string memory) {
}
function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
}
function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
}
function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
}
}
contract NiftysistasTraits is ERC1155, Ownable, Pausable {
using SafeMath for uint;
bool isSistasFinalized;
bool isBratsFinalized;
address sistasContract;
address bratsContract;
uint[] private specialTraits = [551, 565, 610, 617, 650, 706, 759, 770, 790, 818];
uint private rn = 0;
string public _name;
string public _symbol;
mapping (uint => bool) private claimedMap;
mapping (uint256 => uint256) public tokenSupply;
NiftydudesContract public dudesContract = NiftydudesContract(0x892555E75350E11f2058d086C72b9C94C9493d72);
constructor (string memory name_, string memory symbol_) ERC1155("https://niftysistas.com/traits/metadata/") {
}
function mint(uint[] calldata traits, address to) external {
}
function setURI(string memory baseURI) external onlyOwner {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function totalSupply(uint256 _id) public view returns (uint256) {
}
function setSistasContract(address _address) external onlyOwner {
}
function setBratsContract(address _address) external onlyOwner {
}
function finalizeSistas() external onlyOwner {
}
function finalizeBrats() external onlyOwner {
}
function burn(address account, uint256 tokenId, uint256 amount) external {
}
function claimSpecialTrait(uint[] calldata dudeIds) external {
require(!paused(), "claiming period ended");
require(rn!=0, "not randomized");
for (uint i=0; i < dudeIds.length; i++) {
require(<FILL_ME>)
require(!claimedMap[dudeIds[i]], "trait for this dude has already been claimed");
claimedMap[dudeIds[i]] = true;
uint tokenID = specialTraits[(dudeIds[i]+rn)%10];
tokenSupply[tokenID] = tokenSupply[tokenID].add(1);
_mint(msg.sender, tokenID, 1, "");
}
}
function randomizeSpecialTraits() external {
}
function getSpecialTraitIfNotClaimed(uint256[] calldata dudeIDs) external view returns (uint[] memory) {
}
function endClaiming() external onlyOwner {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
}
interface NiftydudesContract {
function ownerOf(uint dudeId) external view returns (address);
}
| dudesContract.ownerOf(dudeIds[i])==msg.sender,"sender is not owner of dude" | 345,992 | dudesContract.ownerOf(dudeIds[i])==msg.sender |
"trait for this dude has already been claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import "@openzeppelin/contracts/utils/Counters.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/Pausable.sol";
import '@openzeppelin/contracts/math/SafeMath.sol';
library UintLibrary {
function toString(uint256 _i) internal pure returns (string memory) {
}
}
library StringLibrary {
using UintLibrary for uint256;
function append(string memory _a, string memory _b) internal pure returns (string memory) {
}
function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
}
function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
}
function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
}
}
contract NiftysistasTraits is ERC1155, Ownable, Pausable {
using SafeMath for uint;
bool isSistasFinalized;
bool isBratsFinalized;
address sistasContract;
address bratsContract;
uint[] private specialTraits = [551, 565, 610, 617, 650, 706, 759, 770, 790, 818];
uint private rn = 0;
string public _name;
string public _symbol;
mapping (uint => bool) private claimedMap;
mapping (uint256 => uint256) public tokenSupply;
NiftydudesContract public dudesContract = NiftydudesContract(0x892555E75350E11f2058d086C72b9C94C9493d72);
constructor (string memory name_, string memory symbol_) ERC1155("https://niftysistas.com/traits/metadata/") {
}
function mint(uint[] calldata traits, address to) external {
}
function setURI(string memory baseURI) external onlyOwner {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function totalSupply(uint256 _id) public view returns (uint256) {
}
function setSistasContract(address _address) external onlyOwner {
}
function setBratsContract(address _address) external onlyOwner {
}
function finalizeSistas() external onlyOwner {
}
function finalizeBrats() external onlyOwner {
}
function burn(address account, uint256 tokenId, uint256 amount) external {
}
function claimSpecialTrait(uint[] calldata dudeIds) external {
require(!paused(), "claiming period ended");
require(rn!=0, "not randomized");
for (uint i=0; i < dudeIds.length; i++) {
require(dudesContract.ownerOf(dudeIds[i]) == msg.sender, "sender is not owner of dude");
require(<FILL_ME>)
claimedMap[dudeIds[i]] = true;
uint tokenID = specialTraits[(dudeIds[i]+rn)%10];
tokenSupply[tokenID] = tokenSupply[tokenID].add(1);
_mint(msg.sender, tokenID, 1, "");
}
}
function randomizeSpecialTraits() external {
}
function getSpecialTraitIfNotClaimed(uint256[] calldata dudeIDs) external view returns (uint[] memory) {
}
function endClaiming() external onlyOwner {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
}
interface NiftydudesContract {
function ownerOf(uint dudeId) external view returns (address);
}
| !claimedMap[dudeIds[i]],"trait for this dude has already been claimed" | 345,992 | !claimedMap[dudeIds[i]] |
null | /**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity >=0.8;
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2.sol";
contract Market is Ownable {
address public base; // ERC-20 currency
address public token; // ERC-20 share token
address public copyright;
uint8 public licenseFeeBps; // only charged on sales, max 1% i.e. 100
uint256 private price; // current offer price, without drift
uint256 public increment; // increment
uint256 public driftStart;
uint256 public timeToDrift; // seconds until drift pushes price by one drift increment
int256 public driftIncrement;
bool public buyingEnabled = true;
bool public sellingEnabled = true;
IUniswapV2 constant uniswap = IUniswapV2(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public weth;
event Trade(address indexed token, address who, bytes ref, int amount, address base, uint totPrice, uint fee, uint newprice);
constructor(address shareToken, uint256 price_, address baseCurrency, address owner) {
}
function setPrice(uint256 newPrice, uint256 newIncrement) public onlyOwner {
}
function hasDrift() public view returns (bool) {
}
// secondsPerStep should be negative for downwards drift
function setDrift(uint256 secondsPerStep, int256 newDriftIncrement) public onlyOwner {
}
function anchorPrice(uint256 currentPrice) private {
}
function getPrice() public view returns (uint256) {
}
function getPriceAtTime(uint256 timestamp) public view returns (uint256) {
}
function getPriceInEther(uint256 shares) public view returns (uint256) {
}
function buyWithEther(uint256 shares, bytes calldata ref) public payable returns (uint256) {
}
function buy(uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function buy(address recipient, uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function _buy(address paying, address recipient, uint256 shares, uint256 alreadyPaid, bytes calldata ref) internal returns (uint256) {
uint256 totPrice = getBuyPrice(shares);
IERC20 baseToken = IERC20(base);
if (totPrice > alreadyPaid){
require(<FILL_ME>)
} else if (totPrice < alreadyPaid){
// caller paid to much, return excess amount
require(baseToken.transfer(paying, alreadyPaid - totPrice));
}
IERC20 shareToken = IERC20(token);
require(shareToken.transfer(recipient, shares));
price = price + (shares * increment);
emit Trade(token, paying, ref, int256(shares), base, totPrice, 0, getPrice());
return totPrice;
}
function _notifyMoneyReceived(address from, uint256 amount, bytes calldata ref) internal {
}
function sell(uint256 tokens, bytes calldata ref) public returns (uint256){
}
function sell(address recipient, uint256 tokens, bytes calldata ref) public returns (uint256){
}
function _sell(address seller, address recipient, uint256 shares, bytes calldata ref) internal returns (uint256) {
}
// ERC-677 recipient
function onTokenTransfer(address from, uint256 amount, bytes calldata ref) public returns (bool success) {
}
function _notifyTokensReceived(address recipient, uint256 amount, bytes calldata ref) internal returns (uint256) {
}
function getSaleFee(uint256 totalPrice) public view returns (uint256) {
}
function getSaleProceeds(uint256 shares) public view returns (uint256) {
}
function getSellPrice(uint256 shares) public view returns (uint256) {
}
function getBuyPrice(uint256 shares) public view returns (uint256) {
}
function getPrice(uint256 lowest, uint256 shares) internal view returns (uint256){
}
function getShares(uint256 money) public view returns (uint256) {
}
function setCopyright(address newOwner) public {
}
function setLicenseFee(uint8 bps) public {
}
function withdraw(address ercAddress, address to, uint256 amount) public onlyOwner() {
}
function setEnabled(bool newBuyingEnabled, bool newSellingEnabled) public onlyOwner() {
}
}
| baseToken.transferFrom(paying,address(this),totPrice-alreadyPaid) | 346,030 | baseToken.transferFrom(paying,address(this),totPrice-alreadyPaid) |
null | /**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity >=0.8;
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2.sol";
contract Market is Ownable {
address public base; // ERC-20 currency
address public token; // ERC-20 share token
address public copyright;
uint8 public licenseFeeBps; // only charged on sales, max 1% i.e. 100
uint256 private price; // current offer price, without drift
uint256 public increment; // increment
uint256 public driftStart;
uint256 public timeToDrift; // seconds until drift pushes price by one drift increment
int256 public driftIncrement;
bool public buyingEnabled = true;
bool public sellingEnabled = true;
IUniswapV2 constant uniswap = IUniswapV2(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public weth;
event Trade(address indexed token, address who, bytes ref, int amount, address base, uint totPrice, uint fee, uint newprice);
constructor(address shareToken, uint256 price_, address baseCurrency, address owner) {
}
function setPrice(uint256 newPrice, uint256 newIncrement) public onlyOwner {
}
function hasDrift() public view returns (bool) {
}
// secondsPerStep should be negative for downwards drift
function setDrift(uint256 secondsPerStep, int256 newDriftIncrement) public onlyOwner {
}
function anchorPrice(uint256 currentPrice) private {
}
function getPrice() public view returns (uint256) {
}
function getPriceAtTime(uint256 timestamp) public view returns (uint256) {
}
function getPriceInEther(uint256 shares) public view returns (uint256) {
}
function buyWithEther(uint256 shares, bytes calldata ref) public payable returns (uint256) {
}
function buy(uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function buy(address recipient, uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function _buy(address paying, address recipient, uint256 shares, uint256 alreadyPaid, bytes calldata ref) internal returns (uint256) {
uint256 totPrice = getBuyPrice(shares);
IERC20 baseToken = IERC20(base);
if (totPrice > alreadyPaid){
require(baseToken.transferFrom(paying, address(this), totPrice - alreadyPaid));
} else if (totPrice < alreadyPaid){
// caller paid to much, return excess amount
require(<FILL_ME>)
}
IERC20 shareToken = IERC20(token);
require(shareToken.transfer(recipient, shares));
price = price + (shares * increment);
emit Trade(token, paying, ref, int256(shares), base, totPrice, 0, getPrice());
return totPrice;
}
function _notifyMoneyReceived(address from, uint256 amount, bytes calldata ref) internal {
}
function sell(uint256 tokens, bytes calldata ref) public returns (uint256){
}
function sell(address recipient, uint256 tokens, bytes calldata ref) public returns (uint256){
}
function _sell(address seller, address recipient, uint256 shares, bytes calldata ref) internal returns (uint256) {
}
// ERC-677 recipient
function onTokenTransfer(address from, uint256 amount, bytes calldata ref) public returns (bool success) {
}
function _notifyTokensReceived(address recipient, uint256 amount, bytes calldata ref) internal returns (uint256) {
}
function getSaleFee(uint256 totalPrice) public view returns (uint256) {
}
function getSaleProceeds(uint256 shares) public view returns (uint256) {
}
function getSellPrice(uint256 shares) public view returns (uint256) {
}
function getBuyPrice(uint256 shares) public view returns (uint256) {
}
function getPrice(uint256 lowest, uint256 shares) internal view returns (uint256){
}
function getShares(uint256 money) public view returns (uint256) {
}
function setCopyright(address newOwner) public {
}
function setLicenseFee(uint8 bps) public {
}
function withdraw(address ercAddress, address to, uint256 amount) public onlyOwner() {
}
function setEnabled(bool newBuyingEnabled, bool newSellingEnabled) public onlyOwner() {
}
}
| baseToken.transfer(paying,alreadyPaid-totPrice) | 346,030 | baseToken.transfer(paying,alreadyPaid-totPrice) |
null | /**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity >=0.8;
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2.sol";
contract Market is Ownable {
address public base; // ERC-20 currency
address public token; // ERC-20 share token
address public copyright;
uint8 public licenseFeeBps; // only charged on sales, max 1% i.e. 100
uint256 private price; // current offer price, without drift
uint256 public increment; // increment
uint256 public driftStart;
uint256 public timeToDrift; // seconds until drift pushes price by one drift increment
int256 public driftIncrement;
bool public buyingEnabled = true;
bool public sellingEnabled = true;
IUniswapV2 constant uniswap = IUniswapV2(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public weth;
event Trade(address indexed token, address who, bytes ref, int amount, address base, uint totPrice, uint fee, uint newprice);
constructor(address shareToken, uint256 price_, address baseCurrency, address owner) {
}
function setPrice(uint256 newPrice, uint256 newIncrement) public onlyOwner {
}
function hasDrift() public view returns (bool) {
}
// secondsPerStep should be negative for downwards drift
function setDrift(uint256 secondsPerStep, int256 newDriftIncrement) public onlyOwner {
}
function anchorPrice(uint256 currentPrice) private {
}
function getPrice() public view returns (uint256) {
}
function getPriceAtTime(uint256 timestamp) public view returns (uint256) {
}
function getPriceInEther(uint256 shares) public view returns (uint256) {
}
function buyWithEther(uint256 shares, bytes calldata ref) public payable returns (uint256) {
}
function buy(uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function buy(address recipient, uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function _buy(address paying, address recipient, uint256 shares, uint256 alreadyPaid, bytes calldata ref) internal returns (uint256) {
uint256 totPrice = getBuyPrice(shares);
IERC20 baseToken = IERC20(base);
if (totPrice > alreadyPaid){
require(baseToken.transferFrom(paying, address(this), totPrice - alreadyPaid));
} else if (totPrice < alreadyPaid){
// caller paid to much, return excess amount
require(baseToken.transfer(paying, alreadyPaid - totPrice));
}
IERC20 shareToken = IERC20(token);
require(<FILL_ME>)
price = price + (shares * increment);
emit Trade(token, paying, ref, int256(shares), base, totPrice, 0, getPrice());
return totPrice;
}
function _notifyMoneyReceived(address from, uint256 amount, bytes calldata ref) internal {
}
function sell(uint256 tokens, bytes calldata ref) public returns (uint256){
}
function sell(address recipient, uint256 tokens, bytes calldata ref) public returns (uint256){
}
function _sell(address seller, address recipient, uint256 shares, bytes calldata ref) internal returns (uint256) {
}
// ERC-677 recipient
function onTokenTransfer(address from, uint256 amount, bytes calldata ref) public returns (bool success) {
}
function _notifyTokensReceived(address recipient, uint256 amount, bytes calldata ref) internal returns (uint256) {
}
function getSaleFee(uint256 totalPrice) public view returns (uint256) {
}
function getSaleProceeds(uint256 shares) public view returns (uint256) {
}
function getSellPrice(uint256 shares) public view returns (uint256) {
}
function getBuyPrice(uint256 shares) public view returns (uint256) {
}
function getPrice(uint256 lowest, uint256 shares) internal view returns (uint256){
}
function getShares(uint256 money) public view returns (uint256) {
}
function setCopyright(address newOwner) public {
}
function setLicenseFee(uint8 bps) public {
}
function withdraw(address ercAddress, address to, uint256 amount) public onlyOwner() {
}
function setEnabled(bool newBuyingEnabled, bool newSellingEnabled) public onlyOwner() {
}
}
| shareToken.transfer(recipient,shares) | 346,030 | shareToken.transfer(recipient,shares) |
null | /**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity >=0.8;
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2.sol";
contract Market is Ownable {
address public base; // ERC-20 currency
address public token; // ERC-20 share token
address public copyright;
uint8 public licenseFeeBps; // only charged on sales, max 1% i.e. 100
uint256 private price; // current offer price, without drift
uint256 public increment; // increment
uint256 public driftStart;
uint256 public timeToDrift; // seconds until drift pushes price by one drift increment
int256 public driftIncrement;
bool public buyingEnabled = true;
bool public sellingEnabled = true;
IUniswapV2 constant uniswap = IUniswapV2(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public weth;
event Trade(address indexed token, address who, bytes ref, int amount, address base, uint totPrice, uint fee, uint newprice);
constructor(address shareToken, uint256 price_, address baseCurrency, address owner) {
}
function setPrice(uint256 newPrice, uint256 newIncrement) public onlyOwner {
}
function hasDrift() public view returns (bool) {
}
// secondsPerStep should be negative for downwards drift
function setDrift(uint256 secondsPerStep, int256 newDriftIncrement) public onlyOwner {
}
function anchorPrice(uint256 currentPrice) private {
}
function getPrice() public view returns (uint256) {
}
function getPriceAtTime(uint256 timestamp) public view returns (uint256) {
}
function getPriceInEther(uint256 shares) public view returns (uint256) {
}
function buyWithEther(uint256 shares, bytes calldata ref) public payable returns (uint256) {
}
function buy(uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function buy(address recipient, uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function _buy(address paying, address recipient, uint256 shares, uint256 alreadyPaid, bytes calldata ref) internal returns (uint256) {
}
function _notifyMoneyReceived(address from, uint256 amount, bytes calldata ref) internal {
}
function sell(uint256 tokens, bytes calldata ref) public returns (uint256){
}
function sell(address recipient, uint256 tokens, bytes calldata ref) public returns (uint256){
}
function _sell(address seller, address recipient, uint256 shares, bytes calldata ref) internal returns (uint256) {
IERC20 shareToken = IERC20(token);
require(<FILL_ME>)
return _notifyTokensReceived(recipient, shares, ref);
}
// ERC-677 recipient
function onTokenTransfer(address from, uint256 amount, bytes calldata ref) public returns (bool success) {
}
function _notifyTokensReceived(address recipient, uint256 amount, bytes calldata ref) internal returns (uint256) {
}
function getSaleFee(uint256 totalPrice) public view returns (uint256) {
}
function getSaleProceeds(uint256 shares) public view returns (uint256) {
}
function getSellPrice(uint256 shares) public view returns (uint256) {
}
function getBuyPrice(uint256 shares) public view returns (uint256) {
}
function getPrice(uint256 lowest, uint256 shares) internal view returns (uint256){
}
function getShares(uint256 money) public view returns (uint256) {
}
function setCopyright(address newOwner) public {
}
function setLicenseFee(uint8 bps) public {
}
function withdraw(address ercAddress, address to, uint256 amount) public onlyOwner() {
}
function setEnabled(bool newBuyingEnabled, bool newSellingEnabled) public onlyOwner() {
}
}
| shareToken.transferFrom(seller,address(this),shares) | 346,030 | shareToken.transferFrom(seller,address(this),shares) |
null | /**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity >=0.8;
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2.sol";
contract Market is Ownable {
address public base; // ERC-20 currency
address public token; // ERC-20 share token
address public copyright;
uint8 public licenseFeeBps; // only charged on sales, max 1% i.e. 100
uint256 private price; // current offer price, without drift
uint256 public increment; // increment
uint256 public driftStart;
uint256 public timeToDrift; // seconds until drift pushes price by one drift increment
int256 public driftIncrement;
bool public buyingEnabled = true;
bool public sellingEnabled = true;
IUniswapV2 constant uniswap = IUniswapV2(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public weth;
event Trade(address indexed token, address who, bytes ref, int amount, address base, uint totPrice, uint fee, uint newprice);
constructor(address shareToken, uint256 price_, address baseCurrency, address owner) {
}
function setPrice(uint256 newPrice, uint256 newIncrement) public onlyOwner {
}
function hasDrift() public view returns (bool) {
}
// secondsPerStep should be negative for downwards drift
function setDrift(uint256 secondsPerStep, int256 newDriftIncrement) public onlyOwner {
}
function anchorPrice(uint256 currentPrice) private {
}
function getPrice() public view returns (uint256) {
}
function getPriceAtTime(uint256 timestamp) public view returns (uint256) {
}
function getPriceInEther(uint256 shares) public view returns (uint256) {
}
function buyWithEther(uint256 shares, bytes calldata ref) public payable returns (uint256) {
}
function buy(uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function buy(address recipient, uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function _buy(address paying, address recipient, uint256 shares, uint256 alreadyPaid, bytes calldata ref) internal returns (uint256) {
}
function _notifyMoneyReceived(address from, uint256 amount, bytes calldata ref) internal {
}
function sell(uint256 tokens, bytes calldata ref) public returns (uint256){
}
function sell(address recipient, uint256 tokens, bytes calldata ref) public returns (uint256){
}
function _sell(address seller, address recipient, uint256 shares, bytes calldata ref) internal returns (uint256) {
}
// ERC-677 recipient
function onTokenTransfer(address from, uint256 amount, bytes calldata ref) public returns (bool success) {
}
function _notifyTokensReceived(address recipient, uint256 amount, bytes calldata ref) internal returns (uint256) {
uint256 totPrice = getSellPrice(amount);
IERC20 baseToken = IERC20(base);
uint256 fee = getSaleFee(totPrice);
if (fee > 0){
require(<FILL_ME>)
}
require(baseToken.transfer(recipient, totPrice - fee));
price -= amount * increment;
emit Trade(token, recipient, ref, -int256(amount), base, totPrice, fee, getPrice());
return totPrice;
}
function getSaleFee(uint256 totalPrice) public view returns (uint256) {
}
function getSaleProceeds(uint256 shares) public view returns (uint256) {
}
function getSellPrice(uint256 shares) public view returns (uint256) {
}
function getBuyPrice(uint256 shares) public view returns (uint256) {
}
function getPrice(uint256 lowest, uint256 shares) internal view returns (uint256){
}
function getShares(uint256 money) public view returns (uint256) {
}
function setCopyright(address newOwner) public {
}
function setLicenseFee(uint8 bps) public {
}
function withdraw(address ercAddress, address to, uint256 amount) public onlyOwner() {
}
function setEnabled(bool newBuyingEnabled, bool newSellingEnabled) public onlyOwner() {
}
}
| baseToken.transfer(copyright,fee) | 346,030 | baseToken.transfer(copyright,fee) |
null | /**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity >=0.8;
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2.sol";
contract Market is Ownable {
address public base; // ERC-20 currency
address public token; // ERC-20 share token
address public copyright;
uint8 public licenseFeeBps; // only charged on sales, max 1% i.e. 100
uint256 private price; // current offer price, without drift
uint256 public increment; // increment
uint256 public driftStart;
uint256 public timeToDrift; // seconds until drift pushes price by one drift increment
int256 public driftIncrement;
bool public buyingEnabled = true;
bool public sellingEnabled = true;
IUniswapV2 constant uniswap = IUniswapV2(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public weth;
event Trade(address indexed token, address who, bytes ref, int amount, address base, uint totPrice, uint fee, uint newprice);
constructor(address shareToken, uint256 price_, address baseCurrency, address owner) {
}
function setPrice(uint256 newPrice, uint256 newIncrement) public onlyOwner {
}
function hasDrift() public view returns (bool) {
}
// secondsPerStep should be negative for downwards drift
function setDrift(uint256 secondsPerStep, int256 newDriftIncrement) public onlyOwner {
}
function anchorPrice(uint256 currentPrice) private {
}
function getPrice() public view returns (uint256) {
}
function getPriceAtTime(uint256 timestamp) public view returns (uint256) {
}
function getPriceInEther(uint256 shares) public view returns (uint256) {
}
function buyWithEther(uint256 shares, bytes calldata ref) public payable returns (uint256) {
}
function buy(uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function buy(address recipient, uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function _buy(address paying, address recipient, uint256 shares, uint256 alreadyPaid, bytes calldata ref) internal returns (uint256) {
}
function _notifyMoneyReceived(address from, uint256 amount, bytes calldata ref) internal {
}
function sell(uint256 tokens, bytes calldata ref) public returns (uint256){
}
function sell(address recipient, uint256 tokens, bytes calldata ref) public returns (uint256){
}
function _sell(address seller, address recipient, uint256 shares, bytes calldata ref) internal returns (uint256) {
}
// ERC-677 recipient
function onTokenTransfer(address from, uint256 amount, bytes calldata ref) public returns (bool success) {
}
function _notifyTokensReceived(address recipient, uint256 amount, bytes calldata ref) internal returns (uint256) {
uint256 totPrice = getSellPrice(amount);
IERC20 baseToken = IERC20(base);
uint256 fee = getSaleFee(totPrice);
if (fee > 0){
require(baseToken.transfer(copyright, fee));
}
require(<FILL_ME>)
price -= amount * increment;
emit Trade(token, recipient, ref, -int256(amount), base, totPrice, fee, getPrice());
return totPrice;
}
function getSaleFee(uint256 totalPrice) public view returns (uint256) {
}
function getSaleProceeds(uint256 shares) public view returns (uint256) {
}
function getSellPrice(uint256 shares) public view returns (uint256) {
}
function getBuyPrice(uint256 shares) public view returns (uint256) {
}
function getPrice(uint256 lowest, uint256 shares) internal view returns (uint256){
}
function getShares(uint256 money) public view returns (uint256) {
}
function setCopyright(address newOwner) public {
}
function setLicenseFee(uint8 bps) public {
}
function withdraw(address ercAddress, address to, uint256 amount) public onlyOwner() {
}
function setEnabled(bool newBuyingEnabled, bool newSellingEnabled) public onlyOwner() {
}
}
| baseToken.transfer(recipient,totPrice-fee) | 346,030 | baseToken.transfer(recipient,totPrice-fee) |
"Transfer failed" | /**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity >=0.8;
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2.sol";
contract Market is Ownable {
address public base; // ERC-20 currency
address public token; // ERC-20 share token
address public copyright;
uint8 public licenseFeeBps; // only charged on sales, max 1% i.e. 100
uint256 private price; // current offer price, without drift
uint256 public increment; // increment
uint256 public driftStart;
uint256 public timeToDrift; // seconds until drift pushes price by one drift increment
int256 public driftIncrement;
bool public buyingEnabled = true;
bool public sellingEnabled = true;
IUniswapV2 constant uniswap = IUniswapV2(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public weth;
event Trade(address indexed token, address who, bytes ref, int amount, address base, uint totPrice, uint fee, uint newprice);
constructor(address shareToken, uint256 price_, address baseCurrency, address owner) {
}
function setPrice(uint256 newPrice, uint256 newIncrement) public onlyOwner {
}
function hasDrift() public view returns (bool) {
}
// secondsPerStep should be negative for downwards drift
function setDrift(uint256 secondsPerStep, int256 newDriftIncrement) public onlyOwner {
}
function anchorPrice(uint256 currentPrice) private {
}
function getPrice() public view returns (uint256) {
}
function getPriceAtTime(uint256 timestamp) public view returns (uint256) {
}
function getPriceInEther(uint256 shares) public view returns (uint256) {
}
function buyWithEther(uint256 shares, bytes calldata ref) public payable returns (uint256) {
}
function buy(uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function buy(address recipient, uint256 numberOfSharesToBuy, bytes calldata ref) public returns (uint256) {
}
function _buy(address paying, address recipient, uint256 shares, uint256 alreadyPaid, bytes calldata ref) internal returns (uint256) {
}
function _notifyMoneyReceived(address from, uint256 amount, bytes calldata ref) internal {
}
function sell(uint256 tokens, bytes calldata ref) public returns (uint256){
}
function sell(address recipient, uint256 tokens, bytes calldata ref) public returns (uint256){
}
function _sell(address seller, address recipient, uint256 shares, bytes calldata ref) internal returns (uint256) {
}
// ERC-677 recipient
function onTokenTransfer(address from, uint256 amount, bytes calldata ref) public returns (bool success) {
}
function _notifyTokensReceived(address recipient, uint256 amount, bytes calldata ref) internal returns (uint256) {
}
function getSaleFee(uint256 totalPrice) public view returns (uint256) {
}
function getSaleProceeds(uint256 shares) public view returns (uint256) {
}
function getSellPrice(uint256 shares) public view returns (uint256) {
}
function getBuyPrice(uint256 shares) public view returns (uint256) {
}
function getPrice(uint256 lowest, uint256 shares) internal view returns (uint256){
}
function getShares(uint256 money) public view returns (uint256) {
}
function setCopyright(address newOwner) public {
}
function setLicenseFee(uint8 bps) public {
}
function withdraw(address ercAddress, address to, uint256 amount) public onlyOwner() {
IERC20 erc20 = IERC20(ercAddress);
require(<FILL_ME>)
}
function setEnabled(bool newBuyingEnabled, bool newSellingEnabled) public onlyOwner() {
}
}
| erc20.transfer(to,amount),"Transfer failed" | 346,030 | erc20.transfer(to,amount) |
'para error' | pragma solidity ^0.6.2;
contract Presale {
using SafeMath for uint256;
IERC20 public badger = IERC20(0x3472A5A71965499acd81997a54BBA8D852C6E53d);
address public wbtc = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599;
IERC20 public digg = IERC20(0x798D1bE841a82a273720CE31c822C61a67a601C3);
INFTHG public hgNFT = INFTHG(0xd608D64D2D9DA1320742d6df06D7323848e35248);
IUNIRouter public router = IUNIRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public teamAddr = address(0x316C0837F85383bDc10dD0DA3DcC178DC13fcb11);
address public owner;
mapping(uint8 => uint256) public salePrice;
mapping(uint8 => uint256) public saleAmount;
mapping(uint8 => bool) public saleType; //false:digg true:badger
constructor() public {
}
modifier onlyOwner{
}
function AddSale(uint8 level, uint256 price, uint256 amount, bool isBadger) public onlyOwner {
require(<FILL_ME>)
salePrice[level] = price;
saleAmount[level] = amount;
saleType[level] = isBadger;
}
function BuyCardUseDigg(uint8 level, uint256 count) public {
}
function BuyCardUseBadger(uint8 level, uint256 count) public {
}
function Burn(uint256 tokenId) public {
}
}
| salePrice[level]==0&&price>0&&amount>0,'para error' | 346,093 | salePrice[level]==0&&price>0&&amount>0 |
"already registered for presale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
contract S16Presale is Ownable {
address private admin; //address of the s16 owner
mapping(address => bool) public regForPresaleMint;
uint256 public preSaleRegisterPrice = 0.016 ether;
uint256 private PRE_SALE_REG_TIME = 1643414400; // Presale Time till 28th JAN 2021 07: 00 PM
address[] public preSaleRegisterUserList;
fallback() external payable {
require(admin != address(0x0), "S16Presale: zero address error");
require(
block.timestamp <= PRE_SALE_REG_TIME,
"S16Presale: preSale registration times end"
);
require(msg.value >= preSaleRegisterPrice, "transfer ether error");
require(<FILL_ME>)
payable(admin).transfer(msg.value);
regForPresaleMint[msg.sender] = true;
preSaleRegisterUserList.push(msg.sender);
}
function changePreSaleTime(uint256 _PRE_SALE_REG_TIME) external onlyOwner {
}
function setOwnerAddress(address _admin) external onlyOwner {
}
function isRegisterforPresale(address _wallet)
external
view
returns (bool)
{
}
function getETHBalance(address _wallet) external view returns (uint256) {
}
function getPresaleRegisterUserList()
external
view
returns (address[] memory)
{
}
function getPresaleTime() external view returns (uint) {
}
}
| regForPresaleMint[msg.sender]==false,"already registered for presale" | 346,106 | regForPresaleMint[msg.sender]==false |
"NFT not found" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import "./interface/IRMU.sol";
import "./interface/IHopeNonTradable.sol";
import "./interface/IHope.sol";
contract HopeVendingMachineV2 is Ownable, ReentrancyGuard {
using SafeMath for uint256;
IRMU public rmu;
IHope public hope;
IHopeNonTradable public hopeNonTradable;
mapping(uint256 => uint256) public cardCosts;
event CardAdded(uint256 card, uint256 cost);
event Redeemed(address indexed user, uint256 amount, uint256 costPerUnit);
constructor(IRMU _rmu, IHopeNonTradable _hopeNonTradable, IHope _hope) public {
}
function getCardCosts(uint256[] memory _cardIds) public view returns(uint256[] memory) {
}
function addCards(uint256[] memory _cardIds, uint256[] memory _costs) public onlyOwner {
}
function redeem(uint256 _card, uint256 _amount, bool _useHopeNonTradable) public nonReentrant {
require(<FILL_ME>)
uint256 supply = rmu.totalSupply(_card);
uint256 maxSupply = rmu.maxSupply(_card);
if (supply.add(_amount) > maxSupply) {
_amount = maxSupply.sub(supply);
require(_amount != 0, "No NFTs left");
}
uint256 totalPrice = cardCosts[_card].mul(_amount);
if (_useHopeNonTradable) {
hopeNonTradable.burn(msg.sender, totalPrice);
} else {
hope.burn(msg.sender, totalPrice);
}
rmu.mint(msg.sender, _card, _amount, "");
emit Redeemed(msg.sender, _amount, cardCosts[_card]);
}
}
| cardCosts[_card]!=0,"NFT not found" | 346,268 | cardCosts[_card]!=0 |
"Wrong amount, 0.1 multiples allowed" | /*
░█████╗░██████╗░░█████╗░░██╗░░░░░░░██╗██████╗░░██████╗██╗░░██╗░█████╗░██████╗░██╗███╗░░██╗░██████╗░ ██╗░█████╗░
██╔══██╗██╔══██╗██╔══██╗░██║░░██╗░░██║██╔══██╗██╔════╝██║░░██║██╔══██╗██╔══██╗██║████╗░██║██╔════╝░ ██║██╔══██╗
██║░░╚═╝██████╔╝██║░░██║░╚██╗████╗██╔╝██║░░██║╚█████╗░███████║███████║██████╔╝██║██╔██╗██║██║░░██╗░ ██║██║░░██║
██║░░██╗██╔══██╗██║░░██║░░████╔═████║░██║░░██║░╚═══██╗██╔══██║██╔══██║██╔══██╗██║██║╚████║██║░░╚██╗ ██║██║░░██║
╚█████╔╝██║░░██║╚█████╔╝░░╚██╔╝░╚██╔╝░██████╔╝██████╔╝██║░░██║██║░░██║██║░░██║██║██║░╚███║╚██████╔╝ ██║╚█████╔╝
░╚════╝░╚═╝░░╚═╝░╚════╝░░░░╚═╝░░░╚═╝░░╚═════╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚═╝╚═╝░░╚══╝░╚═════╝░ ╚═╝░╚════╝░
Official Telegram: https://t.me/crowdsharing
Official Website: https://crowdsharing.io
*/
pragma solidity ^0.5.17;
contract CrowdsharingIO {
using SafeMath for *;
address public owner;
address private admin;
CrowdsharingIO public oldSC = CrowdsharingIO(0x77E867326F438360bF382fB5fFeE3BC77845566D);
uint public oldSCUserId = 1;
uint256 public currUserID = 0;
uint256 private houseFee = 3;
uint256 private poolTime = 24 hours;
uint256 private payoutPeriod = 24 hours;
uint256 private dailyWinPool = 10;
uint256 private incomeTimes = 32;
uint256 private incomeDivide = 10;
uint256 public roundID;
uint256 public r1 = 0;
uint256 public r2 = 0;
uint256 public r3 = 0;
uint256 public totalAmountWithdrawn = 0;
uint256[3] private awardPercentage;
struct Leaderboard {
uint256 amt;
address addr;
}
Leaderboard[3] public topPromoters;
Leaderboard[3] public topInvestors;
Leaderboard[3] public lastTopInvestors;
Leaderboard[3] public lastTopPromoters;
uint256[3] public lastTopInvestorsWinningAmount;
uint256[3] public lastTopPromotersWinningAmount;
mapping (address => uint256) private playerEventVariable;
mapping (uint256 => address) public userList;
mapping (uint256 => DataStructs.DailyRound) public round;
mapping (address => DataStructs.Player) public player;
mapping (address => mapping (uint256 => DataStructs.PlayerDailyRounds)) public plyrRnds_;
/**************************** EVENTS *****************************************/
event registerUserEvent(address indexed _playerAddress, uint256 _userID, address indexed _referrer, uint256 _referrerID);
event investmentEvent(address indexed _playerAddress, uint256 indexed _amount);
event referralCommissionEvent(address indexed _playerAddress, address indexed _referrer, uint256 indexed amount, uint256 timeStamp);
event dailyPayoutEvent(address indexed _playerAddress, uint256 indexed amount, uint256 indexed timeStamp);
event withdrawEvent(address indexed _playerAddress, uint256 indexed amount, uint256 indexed timeStamp);
event superBonusEvent(address indexed _playerAddress, uint256 indexed _amount);
event superBonusAwardEvent(address indexed _playerAddress, uint256 indexed _amount);
event roundAwardsEvent(address indexed _playerAddress, uint256 indexed _amount);
event ownershipTransferred(address indexed owner, address indexed newOwner);
constructor (address _admin) public {
}
/**************************** MODIFIERS *****************************************/
/**
* @dev sets boundaries for incoming tx
*/
modifier isWithinLimits(uint256 _eth) {
}
/**
* @dev sets permissible values for incoming tx
*/
modifier isallowedValue(uint256 _eth) {
require(<FILL_ME>)
_;
}
/**
* @dev allows only the user to run the function
*/
modifier onlyOwner() {
}
/**************************** CORE LOGIC *****************************************/
//if someone accidently sends eth to contract address
function () external payable {
}
function regAdmins(address [] memory _adminAddress, uint256 _amount) public onlyOwner {
}
function syncUsers(uint limit) public onlyOwner {
}
function syncData() public onlyOwner{
}
function closeSync() public onlyOwner{
}
function depositAmount(uint256 _referrerID)
public
isWithinLimits(msg.value)
isallowedValue(msg.value)
payable {
}
//Check Super bonus award
function checkSuperBonus(address _playerAddress) private {
}
function referralBonusTransferDirect(address _playerAddress, uint256 amount)
private
{
}
function referralBonusTransferDailyROI(address _playerAddress, uint256 amount)
private
{
}
//method to settle and withdraw the daily ROI
function settleIncome(address _playerAddress)
private {
}
//function to allow users to withdraw their earnings
function withdrawIncome()
public {
}
//To start the new round for daily pool
function startNewRound()
private
{
}
function addPromoter(address _add)
private
returns (bool)
{
}
function addInvestor(address _add)
private
returns (bool)
{
}
function distributeTopPromoters()
private
returns (uint256)
{
}
function distributeTopInvestors()
private
returns (uint256)
{
}
function withdrawFees(uint256 _amount, address _receiver, uint256 _numberUI) 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) external onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) private {
}
}
library DataStructs {
struct DailyRound {
uint256 startTime;
uint256 endTime;
bool ended; //has daily round ended
uint256 pool; //amount in the pool;
}
struct Player {
uint256 id;
uint256 totalInvestment;
uint256 totalVolumeEth;
uint256 directReferralIncome;
uint256 roiReferralIncome;
uint256 currentInvestedAmount;
uint256 dailyIncome;
uint256 lastSettledTime;
uint256 incomeLimitLeft;
uint256 investorPoolIncome;
uint256 sponsorPoolIncome;
uint256 superIncome;
uint256 referralCount;
address referrer;
}
struct PlayerDailyRounds {
uint256 selfInvestment;
uint256 ethVolume;
}
}
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.
*
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
* @dev Get it via `npm install @openzeppelin/contracts@next`.
*/
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.
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
* @dev Get it via `npm install @openzeppelin/contracts@next`.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
| _eth%100000000000000000==0,"Wrong amount, 0.1 multiples allowed" | 346,381 | _eth%100000000000000000==0 |
"limit still left" | /*
░█████╗░██████╗░░█████╗░░██╗░░░░░░░██╗██████╗░░██████╗██╗░░██╗░█████╗░██████╗░██╗███╗░░██╗░██████╗░ ██╗░█████╗░
██╔══██╗██╔══██╗██╔══██╗░██║░░██╗░░██║██╔══██╗██╔════╝██║░░██║██╔══██╗██╔══██╗██║████╗░██║██╔════╝░ ██║██╔══██╗
██║░░╚═╝██████╔╝██║░░██║░╚██╗████╗██╔╝██║░░██║╚█████╗░███████║███████║██████╔╝██║██╔██╗██║██║░░██╗░ ██║██║░░██║
██║░░██╗██╔══██╗██║░░██║░░████╔═████║░██║░░██║░╚═══██╗██╔══██║██╔══██║██╔══██╗██║██║╚████║██║░░╚██╗ ██║██║░░██║
╚█████╔╝██║░░██║╚█████╔╝░░╚██╔╝░╚██╔╝░██████╔╝██████╔╝██║░░██║██║░░██║██║░░██║██║██║░╚███║╚██████╔╝ ██║╚█████╔╝
░╚════╝░╚═╝░░╚═╝░╚════╝░░░░╚═╝░░░╚═╝░░╚═════╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚═╝╚═╝░░╚══╝░╚═════╝░ ╚═╝░╚════╝░
Official Telegram: https://t.me/crowdsharing
Official Website: https://crowdsharing.io
*/
pragma solidity ^0.5.17;
contract CrowdsharingIO {
using SafeMath for *;
address public owner;
address private admin;
CrowdsharingIO public oldSC = CrowdsharingIO(0x77E867326F438360bF382fB5fFeE3BC77845566D);
uint public oldSCUserId = 1;
uint256 public currUserID = 0;
uint256 private houseFee = 3;
uint256 private poolTime = 24 hours;
uint256 private payoutPeriod = 24 hours;
uint256 private dailyWinPool = 10;
uint256 private incomeTimes = 32;
uint256 private incomeDivide = 10;
uint256 public roundID;
uint256 public r1 = 0;
uint256 public r2 = 0;
uint256 public r3 = 0;
uint256 public totalAmountWithdrawn = 0;
uint256[3] private awardPercentage;
struct Leaderboard {
uint256 amt;
address addr;
}
Leaderboard[3] public topPromoters;
Leaderboard[3] public topInvestors;
Leaderboard[3] public lastTopInvestors;
Leaderboard[3] public lastTopPromoters;
uint256[3] public lastTopInvestorsWinningAmount;
uint256[3] public lastTopPromotersWinningAmount;
mapping (address => uint256) private playerEventVariable;
mapping (uint256 => address) public userList;
mapping (uint256 => DataStructs.DailyRound) public round;
mapping (address => DataStructs.Player) public player;
mapping (address => mapping (uint256 => DataStructs.PlayerDailyRounds)) public plyrRnds_;
/**************************** EVENTS *****************************************/
event registerUserEvent(address indexed _playerAddress, uint256 _userID, address indexed _referrer, uint256 _referrerID);
event investmentEvent(address indexed _playerAddress, uint256 indexed _amount);
event referralCommissionEvent(address indexed _playerAddress, address indexed _referrer, uint256 indexed amount, uint256 timeStamp);
event dailyPayoutEvent(address indexed _playerAddress, uint256 indexed amount, uint256 indexed timeStamp);
event withdrawEvent(address indexed _playerAddress, uint256 indexed amount, uint256 indexed timeStamp);
event superBonusEvent(address indexed _playerAddress, uint256 indexed _amount);
event superBonusAwardEvent(address indexed _playerAddress, uint256 indexed _amount);
event roundAwardsEvent(address indexed _playerAddress, uint256 indexed _amount);
event ownershipTransferred(address indexed owner, address indexed newOwner);
constructor (address _admin) public {
}
/**************************** MODIFIERS *****************************************/
/**
* @dev sets boundaries for incoming tx
*/
modifier isWithinLimits(uint256 _eth) {
}
/**
* @dev sets permissible values for incoming tx
*/
modifier isallowedValue(uint256 _eth) {
}
/**
* @dev allows only the user to run the function
*/
modifier onlyOwner() {
}
/**************************** CORE LOGIC *****************************************/
//if someone accidently sends eth to contract address
function () external payable {
}
function regAdmins(address [] memory _adminAddress, uint256 _amount) public onlyOwner {
}
function syncUsers(uint limit) public onlyOwner {
}
function syncData() public onlyOwner{
}
function closeSync() public onlyOwner{
}
function depositAmount(uint256 _referrerID)
public
isWithinLimits(msg.value)
isallowedValue(msg.value)
payable {
require(_referrerID >0 && _referrerID <=currUserID,"Wrong Referrer ID");
uint256 amount = msg.value;
address _referrer = userList[_referrerID];
//check whether it's the new user
if (player[msg.sender].id <= 0) {
currUserID++;
player[msg.sender].id = currUserID;
player[msg.sender].lastSettledTime = now;
player[msg.sender].currentInvestedAmount = amount;
player[msg.sender].incomeLimitLeft = amount.mul(incomeTimes).div(incomeDivide);
player[msg.sender].totalInvestment = amount;
player[msg.sender].referrer = _referrer;
player[_referrer].referralCount = player[_referrer].referralCount.add(1);
userList[currUserID] = msg.sender;
playerEventVariable[msg.sender] = 100 ether;
//update player's investment in current round
plyrRnds_[msg.sender][roundID].selfInvestment = plyrRnds_[msg.sender][roundID].selfInvestment.add(amount);
addInvestor(msg.sender);
if(_referrer == owner) {
player[owner].directReferralIncome = player[owner].directReferralIncome.add(amount.mul(20).div(100));
r1 = r1.add(amount.mul(13).div(100));
}
else {
player[_referrer].totalVolumeEth = player[_referrer].totalVolumeEth.add(amount);
plyrRnds_[_referrer][roundID].ethVolume = plyrRnds_[_referrer][roundID].ethVolume.add(amount);
addPromoter(_referrer);
checkSuperBonus(_referrer);
//assign the referral commission to all.
referralBonusTransferDirect(msg.sender, amount.mul(20).div(100));
}
emit registerUserEvent(msg.sender, currUserID, _referrer, _referrerID);
}
//if the user has already joined earlier
else {
require(<FILL_ME>)
require(amount >= player[msg.sender].currentInvestedAmount, "bad amount");
_referrer = player[msg.sender].referrer;
player[msg.sender].lastSettledTime = now;
player[msg.sender].currentInvestedAmount = amount;
player[msg.sender].incomeLimitLeft = amount.mul(incomeTimes).div(incomeDivide);
player[msg.sender].totalInvestment = player[msg.sender].totalInvestment.add(amount);
//update player's investment in current round pool
plyrRnds_[msg.sender][roundID].selfInvestment = plyrRnds_[msg.sender][roundID].selfInvestment.add(amount);
addInvestor(msg.sender);
if(_referrer == owner) {
player[owner].directReferralIncome = player[owner].directReferralIncome.add(amount.mul(20).div(100));
}
else {
player[_referrer].totalVolumeEth = player[_referrer].totalVolumeEth.add(amount);
plyrRnds_[_referrer][roundID].ethVolume = plyrRnds_[_referrer][roundID].ethVolume.add(amount);
addPromoter(_referrer);
checkSuperBonus(_referrer);
//assign the referral commission to all.
referralBonusTransferDirect(msg.sender, amount.mul(20).div(100));
}
}
round[roundID].pool = round[roundID].pool.add(amount.mul(dailyWinPool).div(100));
address(uint160(admin)).transfer(amount.mul(houseFee).div(100));
r3 = r3.add(amount.mul(5).div(100));
//check if round time has finished
if (now > round[roundID].endTime && round[roundID].ended == false) {
startNewRound();
}
emit investmentEvent (msg.sender, amount);
}
//Check Super bonus award
function checkSuperBonus(address _playerAddress) private {
}
function referralBonusTransferDirect(address _playerAddress, uint256 amount)
private
{
}
function referralBonusTransferDailyROI(address _playerAddress, uint256 amount)
private
{
}
//method to settle and withdraw the daily ROI
function settleIncome(address _playerAddress)
private {
}
//function to allow users to withdraw their earnings
function withdrawIncome()
public {
}
//To start the new round for daily pool
function startNewRound()
private
{
}
function addPromoter(address _add)
private
returns (bool)
{
}
function addInvestor(address _add)
private
returns (bool)
{
}
function distributeTopPromoters()
private
returns (uint256)
{
}
function distributeTopInvestors()
private
returns (uint256)
{
}
function withdrawFees(uint256 _amount, address _receiver, uint256 _numberUI) 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) external onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) private {
}
}
library DataStructs {
struct DailyRound {
uint256 startTime;
uint256 endTime;
bool ended; //has daily round ended
uint256 pool; //amount in the pool;
}
struct Player {
uint256 id;
uint256 totalInvestment;
uint256 totalVolumeEth;
uint256 directReferralIncome;
uint256 roiReferralIncome;
uint256 currentInvestedAmount;
uint256 dailyIncome;
uint256 lastSettledTime;
uint256 incomeLimitLeft;
uint256 investorPoolIncome;
uint256 sponsorPoolIncome;
uint256 superIncome;
uint256 referralCount;
address referrer;
}
struct PlayerDailyRounds {
uint256 selfInvestment;
uint256 ethVolume;
}
}
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.
*
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
* @dev Get it via `npm install @openzeppelin/contracts@next`.
*/
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.
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
* @dev Get it via `npm install @openzeppelin/contracts@next`.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
| player[msg.sender].incomeLimitLeft==0,"limit still left" | 346,381 | player[msg.sender].incomeLimitLeft==0 |
"Short of funds in contract, sorry" | /*
░█████╗░██████╗░░█████╗░░██╗░░░░░░░██╗██████╗░░██████╗██╗░░██╗░█████╗░██████╗░██╗███╗░░██╗░██████╗░ ██╗░█████╗░
██╔══██╗██╔══██╗██╔══██╗░██║░░██╗░░██║██╔══██╗██╔════╝██║░░██║██╔══██╗██╔══██╗██║████╗░██║██╔════╝░ ██║██╔══██╗
██║░░╚═╝██████╔╝██║░░██║░╚██╗████╗██╔╝██║░░██║╚█████╗░███████║███████║██████╔╝██║██╔██╗██║██║░░██╗░ ██║██║░░██║
██║░░██╗██╔══██╗██║░░██║░░████╔═████║░██║░░██║░╚═══██╗██╔══██║██╔══██║██╔══██╗██║██║╚████║██║░░╚██╗ ██║██║░░██║
╚█████╔╝██║░░██║╚█████╔╝░░╚██╔╝░╚██╔╝░██████╔╝██████╔╝██║░░██║██║░░██║██║░░██║██║██║░╚███║╚██████╔╝ ██║╚█████╔╝
░╚════╝░╚═╝░░╚═╝░╚════╝░░░░╚═╝░░░╚═╝░░╚═════╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚═╝╚═╝░░╚══╝░╚═════╝░ ╚═╝░╚════╝░
Official Telegram: https://t.me/crowdsharing
Official Website: https://crowdsharing.io
*/
pragma solidity ^0.5.17;
contract CrowdsharingIO {
using SafeMath for *;
address public owner;
address private admin;
CrowdsharingIO public oldSC = CrowdsharingIO(0x77E867326F438360bF382fB5fFeE3BC77845566D);
uint public oldSCUserId = 1;
uint256 public currUserID = 0;
uint256 private houseFee = 3;
uint256 private poolTime = 24 hours;
uint256 private payoutPeriod = 24 hours;
uint256 private dailyWinPool = 10;
uint256 private incomeTimes = 32;
uint256 private incomeDivide = 10;
uint256 public roundID;
uint256 public r1 = 0;
uint256 public r2 = 0;
uint256 public r3 = 0;
uint256 public totalAmountWithdrawn = 0;
uint256[3] private awardPercentage;
struct Leaderboard {
uint256 amt;
address addr;
}
Leaderboard[3] public topPromoters;
Leaderboard[3] public topInvestors;
Leaderboard[3] public lastTopInvestors;
Leaderboard[3] public lastTopPromoters;
uint256[3] public lastTopInvestorsWinningAmount;
uint256[3] public lastTopPromotersWinningAmount;
mapping (address => uint256) private playerEventVariable;
mapping (uint256 => address) public userList;
mapping (uint256 => DataStructs.DailyRound) public round;
mapping (address => DataStructs.Player) public player;
mapping (address => mapping (uint256 => DataStructs.PlayerDailyRounds)) public plyrRnds_;
/**************************** EVENTS *****************************************/
event registerUserEvent(address indexed _playerAddress, uint256 _userID, address indexed _referrer, uint256 _referrerID);
event investmentEvent(address indexed _playerAddress, uint256 indexed _amount);
event referralCommissionEvent(address indexed _playerAddress, address indexed _referrer, uint256 indexed amount, uint256 timeStamp);
event dailyPayoutEvent(address indexed _playerAddress, uint256 indexed amount, uint256 indexed timeStamp);
event withdrawEvent(address indexed _playerAddress, uint256 indexed amount, uint256 indexed timeStamp);
event superBonusEvent(address indexed _playerAddress, uint256 indexed _amount);
event superBonusAwardEvent(address indexed _playerAddress, uint256 indexed _amount);
event roundAwardsEvent(address indexed _playerAddress, uint256 indexed _amount);
event ownershipTransferred(address indexed owner, address indexed newOwner);
constructor (address _admin) public {
}
/**************************** MODIFIERS *****************************************/
/**
* @dev sets boundaries for incoming tx
*/
modifier isWithinLimits(uint256 _eth) {
}
/**
* @dev sets permissible values for incoming tx
*/
modifier isallowedValue(uint256 _eth) {
}
/**
* @dev allows only the user to run the function
*/
modifier onlyOwner() {
}
/**************************** CORE LOGIC *****************************************/
//if someone accidently sends eth to contract address
function () external payable {
}
function regAdmins(address [] memory _adminAddress, uint256 _amount) public onlyOwner {
}
function syncUsers(uint limit) public onlyOwner {
}
function syncData() public onlyOwner{
}
function closeSync() public onlyOwner{
}
function depositAmount(uint256 _referrerID)
public
isWithinLimits(msg.value)
isallowedValue(msg.value)
payable {
}
//Check Super bonus award
function checkSuperBonus(address _playerAddress) private {
}
function referralBonusTransferDirect(address _playerAddress, uint256 amount)
private
{
}
function referralBonusTransferDailyROI(address _playerAddress, uint256 amount)
private
{
}
//method to settle and withdraw the daily ROI
function settleIncome(address _playerAddress)
private {
}
//function to allow users to withdraw their earnings
function withdrawIncome()
public {
address _playerAddress = msg.sender;
//settle the daily dividend
settleIncome(_playerAddress);
uint256 _earnings =
player[_playerAddress].dailyIncome +
player[_playerAddress].directReferralIncome +
player[_playerAddress].roiReferralIncome +
player[_playerAddress].investorPoolIncome +
player[_playerAddress].sponsorPoolIncome +
player[_playerAddress].superIncome;
//can only withdraw if they have some earnings.
if(_earnings > 0) {
require(<FILL_ME>)
player[_playerAddress].dailyIncome = 0;
player[_playerAddress].directReferralIncome = 0;
player[_playerAddress].roiReferralIncome = 0;
player[_playerAddress].investorPoolIncome = 0;
player[_playerAddress].sponsorPoolIncome = 0;
player[_playerAddress].superIncome = 0;
totalAmountWithdrawn = totalAmountWithdrawn.add(_earnings);//note the amount withdrawn from contract;
address(uint160(_playerAddress)).transfer(_earnings);
emit withdrawEvent(_playerAddress, _earnings, now);
}
}
//To start the new round for daily pool
function startNewRound()
private
{
}
function addPromoter(address _add)
private
returns (bool)
{
}
function addInvestor(address _add)
private
returns (bool)
{
}
function distributeTopPromoters()
private
returns (uint256)
{
}
function distributeTopInvestors()
private
returns (uint256)
{
}
function withdrawFees(uint256 _amount, address _receiver, uint256 _numberUI) 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) external onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) private {
}
}
library DataStructs {
struct DailyRound {
uint256 startTime;
uint256 endTime;
bool ended; //has daily round ended
uint256 pool; //amount in the pool;
}
struct Player {
uint256 id;
uint256 totalInvestment;
uint256 totalVolumeEth;
uint256 directReferralIncome;
uint256 roiReferralIncome;
uint256 currentInvestedAmount;
uint256 dailyIncome;
uint256 lastSettledTime;
uint256 incomeLimitLeft;
uint256 investorPoolIncome;
uint256 sponsorPoolIncome;
uint256 superIncome;
uint256 referralCount;
address referrer;
}
struct PlayerDailyRounds {
uint256 selfInvestment;
uint256 ethVolume;
}
}
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.
*
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
* @dev Get it via `npm install @openzeppelin/contracts@next`.
*/
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.
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
* @dev Get it via `npm install @openzeppelin/contracts@next`.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
| address(this).balance>=_earnings,"Short of funds in contract, sorry" | 346,381 | address(this).balance>=_earnings |
"Exceeds max supply" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract OwnableDelegateProxy {}
/**
* Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users
*/
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract OneHundredTwentyChequeredSphere is ERC721, Ownable, Pausable {
using Counters for Counters.Counter;
event Withdraw(address indexed operator);
uint256 public constant MAX_SUPPLY = 2020;
string public baseURI;
uint256 public fee = 0.08 ether;
bool public isBurnable = false;
address public proxyRegistryAddress;
Counters.Counter private _nextTokenId;
string private _contractURI;
modifier onlyHolder(uint256 tokenId) {
}
modifier whenBurnable() {
}
constructor(
string memory _baseUri,
string memory _baseContractUri,
address _proxyAddress
) ERC721("OneHundredTwentyChequeredSphere", "OHTCS") {
}
function totalSupply() public view returns (uint256) {
}
function exists(uint256 tokenId) public view returns (bool) {
}
function contractURI() public view returns (string memory) {
}
function setContractURI(string memory contractUri) external onlyOwner {
}
function setIsBurnable(bool status) external onlyOwner {
}
// Open Sea implmentation
function baseTokenURI() public view returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseUri) external onlyOwner {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function mint() public payable whenNotPaused {
require(fee <= msg.value, "Insufficient fee");
require(<FILL_ME>)
_nextTokenId.increment();
_mint(_msgSender(), _nextTokenId.current());
}
function mintTo(address beneficiary) public payable whenNotPaused {
}
function burn(uint256 tokenId) public onlyHolder(tokenId) whenBurnable {
}
// Open Sea implmentation
function setOSRegistryAddress(address newAddress) external onlyOwner {
}
// Open Sea implmentation
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
* @dev See {ERC721-_beforeTokenTransfer}.
*
* Requirements:
*
* - the contract must not be paused.
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
fallback() external payable {}
}
| _nextTokenId.current()<MAX_SUPPLY,"Exceeds max supply" | 346,525 | _nextTokenId.current()<MAX_SUPPLY |
"Caller is not an editor" | /// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "./ConstantsAF.sol";
abstract contract AFRoles is AccessControlEnumerable {
modifier onlyEditor() {
require(<FILL_ME>)
_;
}
modifier onlyContract() {
}
function setRole(bytes32 role, address user) external {
}
}
| hasRole(ConstantsAF.EDITOR_ROLE,msg.sender),"Caller is not an editor" | 346,540 | hasRole(ConstantsAF.EDITOR_ROLE,msg.sender) |
"Caller is not a contract" | /// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "./ConstantsAF.sol";
abstract contract AFRoles is AccessControlEnumerable {
modifier onlyEditor() {
}
modifier onlyContract() {
require(<FILL_ME>)
_;
}
function setRole(bytes32 role, address user) external {
}
}
| hasRole(ConstantsAF.CONTRACT_ROLE,msg.sender),"Caller is not a contract" | 346,540 | hasRole(ConstantsAF.CONTRACT_ROLE,msg.sender) |
"Caller is not admin nor role manager" | /// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "./ConstantsAF.sol";
abstract contract AFRoles is AccessControlEnumerable {
modifier onlyEditor() {
}
modifier onlyContract() {
}
function setRole(bytes32 role, address user) external {
require(<FILL_ME>)
_setupRole(role, user);
}
}
| hasRole(DEFAULT_ADMIN_ROLE,msg.sender)||hasRole(ConstantsAF.ROLE_MANAGER_ROLE,msg.sender),"Caller is not admin nor role manager" | 346,540 | hasRole(DEFAULT_ADMIN_ROLE,msg.sender)||hasRole(ConstantsAF.ROLE_MANAGER_ROLE,msg.sender) |
"Sum of percentile should be 100" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./libraries/TransferHelper.sol";
contract ERC20Crowdsale is Ownable {
bool public isEnabled = false;
// ERC20 Token address => price mapping
mapping(address => uint256) public basePrice;
uint256 public maxSupply;
uint256 public totalSupply;
address public WETH;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// wallet addresses for beneficiary parties
address payable public charitiesBeneficiary;
address payable public carbonOffsetBeneficiary;
address payable public ccFundBeneficiary;
address payable public metaCarbonBeneficiary;
address payable public extraBeneficiary;
// distribution Percentile for beneficiary parties
uint8 public charitiesPercentile;
uint8 public carbonOffsetPercentile;
uint8 public ccFundPercentile;
uint8 public metaCarbonPercentile;
uint8 public extraPercentile;
/**
* @dev Emitted when token is purchased by `to` in `token` for `price`.
*/
event Purchased(
address indexed to,
address indexed token,
uint256 indexed price
);
/**
* @dev Emitted when token is purchased by `to` in `token` for `price`.
*/
event PurchasedWithBidPrice(
address indexed to,
address indexed token,
uint256 totalPrice,
uint256 indexed amount
);
// have to provide WETH token address and price in
constructor(address wethAddress, uint256 priceInEth) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view returns (uint256) {
}
function setBasePriceInToken(address token, uint256 price)
external
onlyOwner
{
}
function removeToken(address token) external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleStatus(bool status) public onlyOwner {
}
function setCharitiesBeneficiary(address payable account)
external
onlyOwner
{
}
function setCarbonOffsetBeneficiary(address payable account)
external
onlyOwner
{
}
function setCCFundBeneficiary(address payable account) external onlyOwner {
}
function setMetaCarbonBeneficiary(address payable account)
external
onlyOwner
{
}
function setExtraBeneficiary(address payable account) external onlyOwner {
}
function setDistributionPercentile(
uint8 charities,
uint8 carbonOffset,
uint8 ccFund,
uint8 metaCarbon,
uint8 extra
) external onlyOwner {
require(<FILL_ME>)
charitiesPercentile = charities;
carbonOffsetPercentile = carbonOffset;
ccFundPercentile = ccFund;
metaCarbonPercentile = metaCarbon;
extraPercentile = extra;
}
function setMaxSupply(uint256 supply) public onlyOwner {
}
function buyWithToken(address token, uint256 amount) public {
}
function buyWithTokenBidPrice(
address token,
uint256 amount,
uint256 totalPrice
) public {
}
/**
* Fallback function is called when msg.data is empty
*/
receive() external payable {
}
/**
* paid mint for sale.
*/
function buyWithEth() public payable {
}
function buyWithEthBidPrice(uint256 amount) public payable {
}
function _forwardToken(address token, uint256 amount) private {
}
function _forwardETH(uint256 amount) private {
}
function withdrawEth() external onlyOwner {
}
function withdrawToken(address token) external onlyOwner {
}
}
| charities+carbonOffset+ccFund+metaCarbon+extra==100,"Sum of percentile should be 100" | 346,696 | charities+carbonOffset+ccFund+metaCarbon+extra==100 |
"Price in this token was not set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./libraries/TransferHelper.sol";
contract ERC20Crowdsale is Ownable {
bool public isEnabled = false;
// ERC20 Token address => price mapping
mapping(address => uint256) public basePrice;
uint256 public maxSupply;
uint256 public totalSupply;
address public WETH;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// wallet addresses for beneficiary parties
address payable public charitiesBeneficiary;
address payable public carbonOffsetBeneficiary;
address payable public ccFundBeneficiary;
address payable public metaCarbonBeneficiary;
address payable public extraBeneficiary;
// distribution Percentile for beneficiary parties
uint8 public charitiesPercentile;
uint8 public carbonOffsetPercentile;
uint8 public ccFundPercentile;
uint8 public metaCarbonPercentile;
uint8 public extraPercentile;
/**
* @dev Emitted when token is purchased by `to` in `token` for `price`.
*/
event Purchased(
address indexed to,
address indexed token,
uint256 indexed price
);
/**
* @dev Emitted when token is purchased by `to` in `token` for `price`.
*/
event PurchasedWithBidPrice(
address indexed to,
address indexed token,
uint256 totalPrice,
uint256 indexed amount
);
// have to provide WETH token address and price in
constructor(address wethAddress, uint256 priceInEth) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view returns (uint256) {
}
function setBasePriceInToken(address token, uint256 price)
external
onlyOwner
{
}
function removeToken(address token) external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleStatus(bool status) public onlyOwner {
}
function setCharitiesBeneficiary(address payable account)
external
onlyOwner
{
}
function setCarbonOffsetBeneficiary(address payable account)
external
onlyOwner
{
}
function setCCFundBeneficiary(address payable account) external onlyOwner {
}
function setMetaCarbonBeneficiary(address payable account)
external
onlyOwner
{
}
function setExtraBeneficiary(address payable account) external onlyOwner {
}
function setDistributionPercentile(
uint8 charities,
uint8 carbonOffset,
uint8 ccFund,
uint8 metaCarbon,
uint8 extra
) external onlyOwner {
}
function setMaxSupply(uint256 supply) public onlyOwner {
}
function buyWithToken(address token, uint256 amount) public {
require(isEnabled, "Sale is disabled");
require(amount > 0, "You need to buy at least 1 token");
require(<FILL_ME>)
uint256 value = amount * basePrice[token];
uint256 allowance = IERC20(token).allowance(msg.sender, address(this));
require(allowance >= value, "token allowance is not enough");
TransferHelper.safeTransferFrom(
token,
msg.sender,
address(this),
value
);
_balances[msg.sender] += amount;
for (uint256 i = 0; i < amount; i++) {
emit Purchased(msg.sender, token, basePrice[token]);
}
}
function buyWithTokenBidPrice(
address token,
uint256 amount,
uint256 totalPrice
) public {
}
/**
* Fallback function is called when msg.data is empty
*/
receive() external payable {
}
/**
* paid mint for sale.
*/
function buyWithEth() public payable {
}
function buyWithEthBidPrice(uint256 amount) public payable {
}
function _forwardToken(address token, uint256 amount) private {
}
function _forwardETH(uint256 amount) private {
}
function withdrawEth() external onlyOwner {
}
function withdrawToken(address token) external onlyOwner {
}
}
| basePrice[token]>0,"Price in this token was not set" | 346,696 | basePrice[token]>0 |
"Sum of percentile should be 100" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./libraries/TransferHelper.sol";
contract ERC20Crowdsale is Ownable {
bool public isEnabled = false;
// ERC20 Token address => price mapping
mapping(address => uint256) public basePrice;
uint256 public maxSupply;
uint256 public totalSupply;
address public WETH;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// wallet addresses for beneficiary parties
address payable public charitiesBeneficiary;
address payable public carbonOffsetBeneficiary;
address payable public ccFundBeneficiary;
address payable public metaCarbonBeneficiary;
address payable public extraBeneficiary;
// distribution Percentile for beneficiary parties
uint8 public charitiesPercentile;
uint8 public carbonOffsetPercentile;
uint8 public ccFundPercentile;
uint8 public metaCarbonPercentile;
uint8 public extraPercentile;
/**
* @dev Emitted when token is purchased by `to` in `token` for `price`.
*/
event Purchased(
address indexed to,
address indexed token,
uint256 indexed price
);
/**
* @dev Emitted when token is purchased by `to` in `token` for `price`.
*/
event PurchasedWithBidPrice(
address indexed to,
address indexed token,
uint256 totalPrice,
uint256 indexed amount
);
// have to provide WETH token address and price in
constructor(address wethAddress, uint256 priceInEth) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view returns (uint256) {
}
function setBasePriceInToken(address token, uint256 price)
external
onlyOwner
{
}
function removeToken(address token) external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleStatus(bool status) public onlyOwner {
}
function setCharitiesBeneficiary(address payable account)
external
onlyOwner
{
}
function setCarbonOffsetBeneficiary(address payable account)
external
onlyOwner
{
}
function setCCFundBeneficiary(address payable account) external onlyOwner {
}
function setMetaCarbonBeneficiary(address payable account)
external
onlyOwner
{
}
function setExtraBeneficiary(address payable account) external onlyOwner {
}
function setDistributionPercentile(
uint8 charities,
uint8 carbonOffset,
uint8 ccFund,
uint8 metaCarbon,
uint8 extra
) external onlyOwner {
}
function setMaxSupply(uint256 supply) public onlyOwner {
}
function buyWithToken(address token, uint256 amount) public {
}
function buyWithTokenBidPrice(
address token,
uint256 amount,
uint256 totalPrice
) public {
}
/**
* Fallback function is called when msg.data is empty
*/
receive() external payable {
}
/**
* paid mint for sale.
*/
function buyWithEth() public payable {
}
function buyWithEthBidPrice(uint256 amount) public payable {
}
function _forwardToken(address token, uint256 amount) private {
require(<FILL_ME>)
require(amount > 0, "amount should be greater than zero");
uint256 value = (amount * charitiesPercentile) / 100;
uint256 remaining = amount - value;
if (value > 0) {
require(
charitiesBeneficiary != address(0),
"Charities wallet is not set"
);
TransferHelper.safeTransfer(token, charitiesBeneficiary, value);
}
value = (amount * carbonOffsetPercentile) / 100;
if (value > 0) {
require(
carbonOffsetBeneficiary != address(0),
"CarbonOffset wallet is not set"
);
TransferHelper.safeTransfer(token, carbonOffsetBeneficiary, value);
remaining -= value;
}
value = (amount * ccFundPercentile) / 100;
if (value > 0) {
require(
ccFundBeneficiary != address(0),
"ccFund wallet is not set"
);
TransferHelper.safeTransfer(token, ccFundBeneficiary, value);
remaining -= value;
}
value = (amount * extraPercentile) / 100;
if (value > 0) {
require(extraBeneficiary != address(0), "extra wallet is not set");
TransferHelper.safeTransfer(token, extraBeneficiary, value);
remaining -= value;
}
// no need to calculate, just send all remaining funds to extra
if (remaining > 0) {
require(
metaCarbonBeneficiary != address(0),
"metaCarbon wallet is not set"
);
TransferHelper.safeTransfer(
token,
metaCarbonBeneficiary,
remaining
);
}
}
function _forwardETH(uint256 amount) private {
}
function withdrawEth() external onlyOwner {
}
function withdrawToken(address token) external onlyOwner {
}
}
| charitiesPercentile+carbonOffsetPercentile+ccFundPercentile+metaCarbonPercentile+extraPercentile==100,"Sum of percentile should be 100" | 346,696 | charitiesPercentile+carbonOffsetPercentile+ccFundPercentile+metaCarbonPercentile+extraPercentile==100 |
"LPStaking: stakeToken_ should be a contract" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.6.8;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IMintable.sol";
contract LPStaking is ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address;
using SafeERC20 for IERC20;
event Staked(address indexed from, uint256 amount);
event Withdrawn(address indexed to, uint256 amount);
event Claimed(address indexed to, uint256 amount);
IERC20 public stakeToken;
IMintable public rewardToken;
// reward rate per second
uint256 public rewardRate;
struct UserInfos {
uint256 balance; // stacked balance
uint256 pendingReward; // claimable reward
uint256 rewardPerTokenPaid; // accumulated reward
}
struct PoolInfos {
uint256 lastUpdateTimestamp;
uint256 rewardPerTokenStored;
uint256 totalValueStacked;
}
PoolInfos private _poolInfos;
mapping(address => UserInfos) private _usersInfos; // Users infos per address
uint256 public constant DURATION = 31 days;
uint256 public constant REWARD_ALLOCATION = 16500 * 1e18;
// Farming will be open on 15/03/2021 at 07:00:00 UTC
uint256 public constant FARMING_START_TIMESTAMP = 1615791600;
// No more rewards after 15/04/2021 at 07:00:00 UTC
uint256 public constant FARMING_END_TIMESTAMP =
FARMING_START_TIMESTAMP + DURATION;
bool public farmingStarted = false;
constructor(address stakeToken_, address rewardToken_) public {
require(<FILL_ME>)
require(
stakeToken_.isContract(),
"LPStaking: rewardToken_ should be a contract"
);
stakeToken = IERC20(stakeToken_);
rewardToken = IMintable(rewardToken_);
rewardRate = REWARD_ALLOCATION.div(DURATION);
}
function stake(uint256 amount_) external nonReentrant {
}
function withdraw(uint256 amount_) public nonReentrant {
}
function claim() public nonReentrant {
}
function withdrawAndClaim(uint256 amount_) public {
}
function exit() external {
}
function totalValue() external view returns (uint256) {
}
function balanceOf(address account_) public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function lastRewardTimestamp() public view returns (uint256) {
}
function pendingReward(address account_) public view returns (uint256) {
}
function _updateReward(address account_) internal {
}
// Check if farming is started
function _checkFarming() internal {
}
}
| stakeToken_.isContract(),"LPStaking: stakeToken_ should be a contract" | 346,797 | stakeToken_.isContract() |
"LPStaking: Please use your individual account" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.6.8;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IMintable.sol";
contract LPStaking is ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address;
using SafeERC20 for IERC20;
event Staked(address indexed from, uint256 amount);
event Withdrawn(address indexed to, uint256 amount);
event Claimed(address indexed to, uint256 amount);
IERC20 public stakeToken;
IMintable public rewardToken;
// reward rate per second
uint256 public rewardRate;
struct UserInfos {
uint256 balance; // stacked balance
uint256 pendingReward; // claimable reward
uint256 rewardPerTokenPaid; // accumulated reward
}
struct PoolInfos {
uint256 lastUpdateTimestamp;
uint256 rewardPerTokenStored;
uint256 totalValueStacked;
}
PoolInfos private _poolInfos;
mapping(address => UserInfos) private _usersInfos; // Users infos per address
uint256 public constant DURATION = 31 days;
uint256 public constant REWARD_ALLOCATION = 16500 * 1e18;
// Farming will be open on 15/03/2021 at 07:00:00 UTC
uint256 public constant FARMING_START_TIMESTAMP = 1615791600;
// No more rewards after 15/04/2021 at 07:00:00 UTC
uint256 public constant FARMING_END_TIMESTAMP =
FARMING_START_TIMESTAMP + DURATION;
bool public farmingStarted = false;
constructor(address stakeToken_, address rewardToken_) public {
}
function stake(uint256 amount_) external nonReentrant {
_checkFarming();
_updateReward(msg.sender);
require(<FILL_ME>)
stakeToken.safeTransferFrom(msg.sender, address(this), amount_);
_poolInfos.totalValueStacked = _poolInfos.totalValueStacked.add(
amount_
);
// Add to balance
_usersInfos[msg.sender].balance = _usersInfos[msg.sender].balance.add(
amount_
);
emit Staked(msg.sender, amount_);
}
function withdraw(uint256 amount_) public nonReentrant {
}
function claim() public nonReentrant {
}
function withdrawAndClaim(uint256 amount_) public {
}
function exit() external {
}
function totalValue() external view returns (uint256) {
}
function balanceOf(address account_) public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function lastRewardTimestamp() public view returns (uint256) {
}
function pendingReward(address account_) public view returns (uint256) {
}
function _updateReward(address account_) internal {
}
// Check if farming is started
function _checkFarming() internal {
}
}
| !address(msg.sender).isContract(),"LPStaking: Please use your individual account" | 346,797 | !address(msg.sender).isContract() |
"not qulifiled as new root" | pragma solidity ^0.5.8;
import './ERC20.sol';
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
contract VDPoolBasic {
function price() external view returns (uint256);
function buyToken(uint256 ethAmount) external returns (uint256);
function currentLevel() external view returns(uint256);
function currentLevelRemaining() external view returns(uint256);
}
contract InvitationBasic {
function signUp(address referrer, address addr, uint256 phase, uint256 ePhase) external;
function isRoot(address addr) external view returns (bool);
function newRoot(address addr, uint256 phase) external;
function getParent(address addr) external view returns(address);
function getAncestors(address addr) external view returns(address[] memory);
function isSignedUp(address addr) public view returns (bool);
function getPoints(uint256 phase, address addr) external view returns (uint256);
function newSignupCount(uint256 phase) external view returns (uint256);
function getTop(uint256 phase) external view returns(address[] memory);
function distributeBonus(uint256 len) external pure returns(uint256[] memory);
}
contract LuckyDrawBasic {
function buyTicket(address addr, uint256 phase) external;
function aggregateIcexWinners(uint256 phase) external;
function getWinners(uint256 phase) external view returns(address[] memory);
}
contract XDS is StandardToken {
using address_make_payable for address;
/*
* CONSTANTS
*/
uint16[] public bonusRate = [200, 150, 100, 50];
/*
* STATES
*/
address public settler;
string public name;
string public symbol;
uint8 public constant decimals = 18;
address public reservedAccount;
uint256 public reservedAmount;
address public foundationAddr;
uint256 public firstBlock = 0;
uint256 public blockPerPhase = 0;
mapping (uint256 => uint256) public ethBalance;
mapping (uint256 => mapping (address => uint256)) public addressInvestment;
mapping (address => uint256) public totalInvestment;
mapping (address => uint256) public crBonus; // controlled release bonus
address[] icexInvestors;
mapping (uint256 => address[]) public topInvestor;
mapping (uint256 => bool) public settled;
InvitationBasic invitationContract;
LuckyDrawBasic luckydrawContract;
VDPoolBasic vdPoolContract;
uint256 public signUpFee = 0;
uint256 public rootFee = 0;
uint256 referrerBonus = 0;
uint256 ancestorBonus = 0;
uint16 topInvestorCounter = 0;
uint16 icexCRBonusRatio = 75;
uint256 crBonusReleasePhases = 10;
uint256 ethBonusReleasePhases = 20;
uint256 luckyDrawRate = 10;
uint256 invitationRate = 70;
uint256 topInvestorRate = 20;
uint256 foundationRate = 50;
uint256 icexRewardETHPool = 0;
/*
* EVENTS
*/
/// Emitted only once after token sale starts.
event SaleStarted();
event Settled(uint256 phase, uint256 ethDistributed, uint256 ethToPool);
event LuckydrawSettle(uint256 phase, address indexed who, uint256 ethAmount);
event InvitationSettle(uint256 phase, address indexed who, uint256 ethAmount);
event InvestorSettle(uint256 phase, address indexed who, uint256 ethAmount);
/*
* MODIFIERS
*/
/// only master can call the function
modifier onlyOwner {
}
constructor(string memory _name, string memory _symbol, uint256 _blockPerPhase, uint256 _totalSupply, uint256 _reservedAmount, address _reservedAccount, address _foundationAddr) public {
}
/*
* EXTERNAL FUNCTIONS
*/
function setOwner(address newOwner) external onlyOwner {
}
function setSettler(address newSettler) external onlyOwner {
}
function transfer(address _to, uint256 _value) external onlyPayloadSize(2 * 32) {
if ( _to == address(this)) {
require(_value == rootFee, "only valid value is root fee for this recipient");
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
require(<FILL_ME>)
invitationContract.newRoot(msg.sender, currentPhase());
} else if ( _value == signUpFee && invitationContract.isSignedUp(_to) && !isSignedUp()) {
uint256 fee = _value;
balances[msg.sender] = balances[msg.sender].sub(fee);
uint256 phase = currentPhase();
uint256 ePhase = phase;
if (phase < bonusRate.length) {
ePhase = bonusRate.length - 1;
}
invitationContract.signUp(_to, msg.sender, phase, ePhase);
//direct referrer
balances[_to] = balances[_to].add(referrerBonus);
emit Transfer(msg.sender, _to, referrerBonus);
fee = fee.sub(referrerBonus);
// go up referrer tree
address[] memory ancestors = invitationContract.getAncestors(msg.sender);
for ( uint256 i = 0; i < ancestors.length && fee >= ancestorBonus; i++) {
if (ancestors[i] == address(0)) {
break;
}
balances[ancestors[i]] = balances[ancestors[i]].add(ancestorBonus);
emit Transfer(msg.sender, ancestors[i], ancestorBonus);
fee = fee.sub(ancestorBonus);
}
balances[foundationAddr] = balances[foundationAddr].add(fee);
emit Transfer(msg.sender, foundationAddr, fee);
} else {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
}
}
function setInvitationContract(address addr, uint256 _rootFee, uint256 _signUpFee, uint256 _ancestorBonus, uint256 _referrerBonus, uint256 _invitationRate) external onlyOwner {
}
function setVdPoolContract(address addr, uint16 _topInvestorCounter, uint256 _topInvestorRate, uint256 _foundationRate) external onlyOwner {
}
function setLuckyDrawContract(address addr, uint256 _luckyDrawRate) external onlyOwner {
}
function settle(uint256 phase) external {
}
function start(uint256 _firstBlock) external onlyOwner {
}
/// @dev This default function allows token to be purchased by directly
/// sending ether to this smart contract.
function () external payable {
}
function price() external view returns(uint256) {
}
function currentLevel() external view returns(uint256) {
}
function currentRemainingEth() external view returns(uint256) {
}
function currentBonusRate() external view returns(uint16) {
}
function isSignedUp() public view returns (bool) {
}
function topInvestors(uint256 phase) external view returns (address[] memory) {
}
function luckyWinners(uint256 phase) external view returns (address[] memory) {
}
function invitationWinners(uint256 phase) external view returns(address[] memory) {
}
function drain(uint256 amount) external onlyOwner {
}
/*
* PUBLIC FUNCTIONS
*/
function saleStarted() public view returns (bool) {
}
function currentPhase() public view returns(uint256) {
}
function issueToken(address recipient) public payable {
}
/*
* INTERNAL FUNCTIONS
*/
function updateTopInvestor(address addr, uint256 ethAmount, uint256 phase) internal {
}
function transferToFoundation(uint256 ethAmount) internal {
}
function settleLuckydraw(uint256 phase, uint256 ethAmount, bool isIcex) internal {
}
function settleTopInvestor (uint256 phase, uint256 ethAmount) internal {
}
function settleInvitation (uint256 phase, uint256 ethAmount) internal {
}
function distributeCRBonus(uint256 phase) internal {
}
}
| !isSignedUp(),"not qulifiled as new root" | 346,866 | !isSignedUp() |
"phase already settled" | pragma solidity ^0.5.8;
import './ERC20.sol';
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
contract VDPoolBasic {
function price() external view returns (uint256);
function buyToken(uint256 ethAmount) external returns (uint256);
function currentLevel() external view returns(uint256);
function currentLevelRemaining() external view returns(uint256);
}
contract InvitationBasic {
function signUp(address referrer, address addr, uint256 phase, uint256 ePhase) external;
function isRoot(address addr) external view returns (bool);
function newRoot(address addr, uint256 phase) external;
function getParent(address addr) external view returns(address);
function getAncestors(address addr) external view returns(address[] memory);
function isSignedUp(address addr) public view returns (bool);
function getPoints(uint256 phase, address addr) external view returns (uint256);
function newSignupCount(uint256 phase) external view returns (uint256);
function getTop(uint256 phase) external view returns(address[] memory);
function distributeBonus(uint256 len) external pure returns(uint256[] memory);
}
contract LuckyDrawBasic {
function buyTicket(address addr, uint256 phase) external;
function aggregateIcexWinners(uint256 phase) external;
function getWinners(uint256 phase) external view returns(address[] memory);
}
contract XDS is StandardToken {
using address_make_payable for address;
/*
* CONSTANTS
*/
uint16[] public bonusRate = [200, 150, 100, 50];
/*
* STATES
*/
address public settler;
string public name;
string public symbol;
uint8 public constant decimals = 18;
address public reservedAccount;
uint256 public reservedAmount;
address public foundationAddr;
uint256 public firstBlock = 0;
uint256 public blockPerPhase = 0;
mapping (uint256 => uint256) public ethBalance;
mapping (uint256 => mapping (address => uint256)) public addressInvestment;
mapping (address => uint256) public totalInvestment;
mapping (address => uint256) public crBonus; // controlled release bonus
address[] icexInvestors;
mapping (uint256 => address[]) public topInvestor;
mapping (uint256 => bool) public settled;
InvitationBasic invitationContract;
LuckyDrawBasic luckydrawContract;
VDPoolBasic vdPoolContract;
uint256 public signUpFee = 0;
uint256 public rootFee = 0;
uint256 referrerBonus = 0;
uint256 ancestorBonus = 0;
uint16 topInvestorCounter = 0;
uint16 icexCRBonusRatio = 75;
uint256 crBonusReleasePhases = 10;
uint256 ethBonusReleasePhases = 20;
uint256 luckyDrawRate = 10;
uint256 invitationRate = 70;
uint256 topInvestorRate = 20;
uint256 foundationRate = 50;
uint256 icexRewardETHPool = 0;
/*
* EVENTS
*/
/// Emitted only once after token sale starts.
event SaleStarted();
event Settled(uint256 phase, uint256 ethDistributed, uint256 ethToPool);
event LuckydrawSettle(uint256 phase, address indexed who, uint256 ethAmount);
event InvitationSettle(uint256 phase, address indexed who, uint256 ethAmount);
event InvestorSettle(uint256 phase, address indexed who, uint256 ethAmount);
/*
* MODIFIERS
*/
/// only master can call the function
modifier onlyOwner {
}
constructor(string memory _name, string memory _symbol, uint256 _blockPerPhase, uint256 _totalSupply, uint256 _reservedAmount, address _reservedAccount, address _foundationAddr) public {
}
/*
* EXTERNAL FUNCTIONS
*/
function setOwner(address newOwner) external onlyOwner {
}
function setSettler(address newSettler) external onlyOwner {
}
function transfer(address _to, uint256 _value) external onlyPayloadSize(2 * 32) {
}
function setInvitationContract(address addr, uint256 _rootFee, uint256 _signUpFee, uint256 _ancestorBonus, uint256 _referrerBonus, uint256 _invitationRate) external onlyOwner {
}
function setVdPoolContract(address addr, uint16 _topInvestorCounter, uint256 _topInvestorRate, uint256 _foundationRate) external onlyOwner {
}
function setLuckyDrawContract(address addr, uint256 _luckyDrawRate) external onlyOwner {
}
function settle(uint256 phase) external {
require(settler == address(0) || settler == msg.sender, "only settler can call");
require(phase >= 0, "invalid phase");
require(phase < currentPhase(), "phase not matured yet");
require(<FILL_ME>)
uint256 pool = 0;
uint256 toPool = 0;
if (phase < bonusRate.length) {
if(ethBalance[phase] > 0) {
toPool = ethBalance[phase].mul(bonusRate.length).div(bonusRate.length + ethBonusReleasePhases);
icexRewardETHPool = icexRewardETHPool.add(toPool);
transferToFoundation(ethBalance[phase].sub(toPool));
}
// settling last phase of ICEX, combine pools
if (phase == bonusRate.length - 1) {
pool = icexRewardETHPool;
}
} else {
pool = ethBalance[phase];
distributeCRBonus(phase);
}
if (pool > 0 ) {
settleLuckydraw(phase, pool, phase < bonusRate.length);
settleTopInvestor(phase, pool);
settleInvitation(phase, pool);
}
settled[phase] = true;
emit Settled(phase, pool, toPool);
}
function start(uint256 _firstBlock) external onlyOwner {
}
/// @dev This default function allows token to be purchased by directly
/// sending ether to this smart contract.
function () external payable {
}
function price() external view returns(uint256) {
}
function currentLevel() external view returns(uint256) {
}
function currentRemainingEth() external view returns(uint256) {
}
function currentBonusRate() external view returns(uint16) {
}
function isSignedUp() public view returns (bool) {
}
function topInvestors(uint256 phase) external view returns (address[] memory) {
}
function luckyWinners(uint256 phase) external view returns (address[] memory) {
}
function invitationWinners(uint256 phase) external view returns(address[] memory) {
}
function drain(uint256 amount) external onlyOwner {
}
/*
* PUBLIC FUNCTIONS
*/
function saleStarted() public view returns (bool) {
}
function currentPhase() public view returns(uint256) {
}
function issueToken(address recipient) public payable {
}
/*
* INTERNAL FUNCTIONS
*/
function updateTopInvestor(address addr, uint256 ethAmount, uint256 phase) internal {
}
function transferToFoundation(uint256 ethAmount) internal {
}
function settleLuckydraw(uint256 phase, uint256 ethAmount, bool isIcex) internal {
}
function settleTopInvestor (uint256 phase, uint256 ethAmount) internal {
}
function settleInvitation (uint256 phase, uint256 ethAmount) internal {
}
function distributeCRBonus(uint256 phase) internal {
}
}
| !settled[phase],"phase already settled" | 346,866 | !settled[phase] |
"Arr length not eq" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.10;
abstract contract IDFSRegistry {
function getAddr(bytes4 _id) public view virtual returns (address);
function addNewContract(
bytes32 _id,
address _contractAddr,
uint256 _waitPeriod
) public virtual;
function startContractChange(bytes32 _id, address _newContractAddr) public virtual;
function approveContractChange(bytes32 _id) public virtual;
function cancelContractChange(bytes32 _id) public virtual;
function changeWaitPeriod(bytes32 _id, uint256 _newWaitPeriod) public virtual;
}
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint256 digits);
function totalSupply() external view returns (uint256 supply);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
library Address {
//insufficient balance
error InsufficientBalance(uint256 available, uint256 required);
//unable to send value, recipient may have reverted
error SendingValueFail();
//insufficient balance for call
error InsufficientBalanceForCall(uint256 available, uint256 required);
//call to non-contract
error NonContractCall();
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function _functionCallWithValue(
address target,
bytes memory data,
uint256 weiValue,
string memory errorMessage
) private returns (bytes memory) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
}
/// @dev Edited so it always first approves 0 and then the value, because of non standard tokens
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract MainnetAuthAddresses {
address internal constant ADMIN_VAULT_ADDR = 0xCCf3d848e08b94478Ed8f46fFead3008faF581fD;
address internal constant FACTORY_ADDRESS = 0x5a15566417e6C1c9546523066500bDDBc53F88C7;
address internal constant ADMIN_ADDR = 0x25eFA336886C74eA8E282ac466BdCd0199f85BB9; // USED IN ADMIN VAULT CONSTRUCTOR
}
contract AuthHelper is MainnetAuthAddresses {
}
contract AdminVault is AuthHelper {
address public owner;
address public admin;
error SenderNotAdmin();
constructor() {
}
/// @notice Admin is able to change owner
/// @param _owner Address of new owner
function changeOwner(address _owner) public {
}
/// @notice Admin is able to set new admin
/// @param _admin Address of multisig that becomes new admin
function changeAdmin(address _admin) public {
}
}
contract AdminAuth is AuthHelper {
using SafeERC20 for IERC20;
AdminVault public constant adminVault = AdminVault(ADMIN_VAULT_ADDR);
error SenderNotOwner();
error SenderNotAdmin();
modifier onlyOwner() {
}
modifier onlyAdmin() {
}
/// @notice withdraw stuck funds
function withdrawStuckFunds(address _token, address _receiver, uint256 _amount) public onlyOwner {
}
/// @notice Destroy the contract
function kill() public onlyAdmin {
}
}
contract DFSRegistry is AdminAuth {
error EntryAlreadyExistsError(bytes4);
error EntryNonExistentError(bytes4);
error EntryNotInChangeError(bytes4);
error ChangeNotReadyError(uint256,uint256);
error EmptyPrevAddrError(bytes4);
error AlreadyInContractChangeError(bytes4);
error AlreadyInWaitPeriodChangeError(bytes4);
event AddNewContract(address,bytes4,address,uint256);
event RevertToPreviousAddress(address,bytes4,address,address);
event StartContractChange(address,bytes4,address,address);
event ApproveContractChange(address,bytes4,address,address);
event CancelContractChange(address,bytes4,address,address);
event StartWaitPeriodChange(address,bytes4,uint256);
event ApproveWaitPeriodChange(address,bytes4,uint256,uint256);
event CancelWaitPeriodChange(address,bytes4,uint256,uint256);
struct Entry {
address contractAddr;
uint256 waitPeriod;
uint256 changeStartTime;
bool inContractChange;
bool inWaitPeriodChange;
bool exists;
}
mapping(bytes4 => Entry) public entries;
mapping(bytes4 => address) public previousAddresses;
mapping(bytes4 => address) public pendingAddresses;
mapping(bytes4 => uint256) public pendingWaitTimes;
/// @notice Given an contract id returns the registered address
/// @dev Id is keccak256 of the contract name
/// @param _id Id of contract
function getAddr(bytes4 _id) public view returns (address) {
}
/// @notice Helper function to easily query if id is registered
/// @param _id Id of contract
function isRegistered(bytes4 _id) public view returns (bool) {
}
/////////////////////////// OWNER ONLY FUNCTIONS ///////////////////////////
/// @notice Adds a new contract to the registry
/// @param _id Id of contract
/// @param _contractAddr Address of the contract
/// @param _waitPeriod Amount of time to wait before a contract address can be changed
function addNewContract(
bytes4 _id,
address _contractAddr,
uint256 _waitPeriod
) public onlyOwner {
}
/// @notice Reverts to the previous address immediately
/// @dev In case the new version has a fault, a quick way to fallback to the old contract
/// @param _id Id of contract
function revertToPreviousAddress(bytes4 _id) public onlyOwner {
}
/// @notice Starts an address change for an existing entry
/// @dev Can override a change that is currently in progress
/// @param _id Id of contract
/// @param _newContractAddr Address of the new contract
function startContractChange(bytes4 _id, address _newContractAddr) public onlyOwner {
}
/// @notice Changes new contract address, correct time must have passed
/// @param _id Id of contract
function approveContractChange(bytes4 _id) public onlyOwner {
}
/// @notice Cancel pending change
/// @param _id Id of contract
function cancelContractChange(bytes4 _id) public onlyOwner {
}
/// @notice Starts the change for waitPeriod
/// @param _id Id of contract
/// @param _newWaitPeriod New wait time
function startWaitPeriodChange(bytes4 _id, uint256 _newWaitPeriod) public onlyOwner {
}
/// @notice Changes new wait period, correct time must have passed
/// @param _id Id of contract
function approveWaitPeriodChange(bytes4 _id) public onlyOwner {
}
/// @notice Cancel wait period change
/// @param _id Id of contract
function cancelWaitPeriodChange(bytes4 _id) public onlyOwner {
}
}
contract MainnetCoreAddresses {
address internal constant REGISTRY_ADDR = 0x287778F121F134C66212FB16c9b53eC991D32f5b;
address internal constant PROXY_AUTH_ADDR = 0xD489FfAEEB46b2d7E377850d45E1F8cA3350fc82;
address internal constant DEFISAVER_LOGGER = 0xcE7a977Cac4a481bc84AC06b2Da0df614e621cf3;
}
contract CoreHelper is MainnetCoreAddresses {
}
contract MultiDFSRegistrySetter is CoreHelper {
address internal owner = 0x76720aC2574631530eC8163e4085d6F98513fb27;
modifier onlyOwner() {
}
/// @notice Adds multiple entries to DFSRegistry
/// @param _ids Ids used to fetch contract addresses
/// @param _contractAddrs Array of contract addresses matching the ids
/// @param _waitPeriods Array of wait periods (used for contract change)
function addMultipleEntries(
bytes4[] calldata _ids,
address[] calldata _contractAddrs,
uint256[] calldata _waitPeriods
) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _ids.length; ++i) {
DFSRegistry(REGISTRY_ADDR).addNewContract(_ids[i], _contractAddrs[i], _waitPeriods[i]);
}
}
/// @notice Starts multiple entries changes to DFSRegistry
/// @param _ids Ids used to fetch contract addresses
/// @param _contractAddrs Array of contract addresses matching the ids
function startMultipleContractChanges(bytes4[] calldata _ids, address[] calldata _contractAddrs)
external
onlyOwner
{
}
/// @notice Approves multiple entries changes to DFSRegistry
/// @dev In order to work all entries must have expired wait times
/// @param _ids Ids used to fetch contract addresses
function approveMultipleContractChanges(bytes4[] calldata _ids) external onlyOwner {
}
}
| (_ids.length==_contractAddrs.length)&&(_ids.length==_waitPeriods.length),"Arr length not eq" | 346,897 | (_ids.length==_contractAddrs.length)&&(_ids.length==_waitPeriods.length) |
null | pragma solidity ^0.4.19;
contract GoldTokenStorage is ResolverClient, DigixConstants {
struct FeeConfiguration {
uint256 base;
uint256 rate;
}
struct GlobalConfig {
bytes32 current_version;
bool no_demurrage_fee;
bool no_transfer_fee;
uint256 minimum_transfer_amount;
Fees fees;
}
struct Fees {
FeeConfiguration demurrage;
FeeConfiguration recast;
FeeConfiguration transfer;
}
struct Collectors {
address demurrage;
address recast;
address transfer;
}
struct UserConfig {
bool no_demurrage_fee;
bool no_transfer_fee;
bool no_recast_fee;
}
struct UserData {
uint256 last_payment_date;
uint256 raw_balance;
mapping (address => uint256) spender_allowances;
}
struct User {
UserConfig config;
UserData data;
}
struct System {
Collectors collectors;
GlobalConfig config;
uint256 total_supply;
uint256 effective_total_supply;
mapping (address => User) users;
}
System system;
function GoldTokenStorage(address _resolver) public
{
require(<FILL_ME>)
address _demurrage_collector;
address _transfer_collector;
address _recast_collector;
assembly {
_demurrage_collector := create(0,0,0)
_transfer_collector := create(0,0,0)
_recast_collector := create(0,0,0)
}
system.collectors.demurrage = _demurrage_collector;
system.collectors.recast = _recast_collector;
system.collectors.transfer = _transfer_collector;
system.config.fees.demurrage.base = 10000000;
system.config.fees.demurrage.rate = 165;
system.config.fees.recast.base = 100000000000;
system.config.fees.recast.rate = 1000000000;
system.config.fees.transfer.base = 10000;
system.config.fees.transfer.rate = 13;
system.config.minimum_transfer_amount = 1000000;
system.config.no_demurrage_fee = false;
system.config.no_transfer_fee = false;
system.config.current_version = "1.0.0";
system.total_supply = 0;
system.effective_total_supply = 0;
}
/////////////////////////////////////////////////////
/// functions to read global configs ///
/////////////////////////////////////////////////////
/// @notice read the total number of tokens
function read_total_supply()
constant
public
returns (uint256 _total_supply)
{
}
/// @notice read the effective total, which is the number of nanograms of gold that is backing the Gold tokens
function read_effective_total_supply()
constant
public
returns (uint256 _effective_total_supply)
{
}
/// @notice read both the total_supply and effective_total_supply
function read_supply()
constant
public
returns (uint256 _total_supply, uint256 _effective_total_supply)
{
}
/// @notice read general global configs: no_demurrage_fee, no_transfer_fee, minimum_transfer_amount, current_version
function read_general_config()
constant
public
returns (bytes32 _current_version, bool _no_demurrage_fee, bool _no_transfer_fee, uint256 _minimum_transfer_amount)
{
}
function read_collectors_addresses()
constant
public
returns (address[3] _collectors)
{
}
///////////////////////////////////////////////
/// functions to read users' configs ///
///////////////////////////////////////////////
/// @notice read all details of a user
function read_user(address _account)
public
constant
returns (bool _exists,
uint256 _raw_balance,
uint256 _payment_date,
bool _no_demurrage_fee,
bool _no_recast_fee,
bool _no_transfer_fee)
{
}
function read_user_fees_configs(address _account)
public
constant
returns (bool _no_demurrage_fee,
bool _no_transfer_fee,
bool _no_recast_fee)
{
}
/// @notice read a user's spender allowance
function read_account_spender_allowance(address _account,
address _spender)
public
constant
returns (uint256 _spender_allowance)
{
}
//////////////////////////////////////////////////
/// Update functions regarding users ///
//////////////////////////////////////////////////
/// @notice called by TokenApprovalController to update an account's spender allowance of a _spender
function update_account_spender_allowance(address _account,
address _spender,
uint256 _new_allowance)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_APPROVAL)
public
returns (bool _success)
{
}
/// @notice update the _user balance and the global total supply after minting some tokens
function update_balances_after_mint(address _user, uint256 _user_new_balance, uint256 _new_total_supply, uint256 _new_effective_total_supply)
if_sender_is(CONTRACT_CONTROLLER_ASSETS)
public
returns (bool _success)
{
}
/// @notice update a user's fees configs
function update_user_fees_configs(address _user, bool _no_demurrage_fee, bool _no_transfer_fee, bool _no_recast_fee)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_CONFIG)
public
returns (bool _success)
{
}
///////////////////////////////////////////////////////////
/// Update functions to change global configs ///
///////////////////////////////////////////////////////////
/// @notice called by AssetsController to update the effective supply (when an item failed audit or is replaced)
function update_effective_supply(uint256 _effective_total_supply)
if_sender_is(CONTRACT_CONTROLLER_ASSETS)
public
returns (bool _success)
{
}
/// @notice update configs for recast fees
function update_config_recast(uint256 _base, uint256 _rate)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_CONFIG)
public
returns (bool _success)
{
}
/// @notice update configs for demurrage fees
function update_config_demurrage(uint256 _base, uint256 _rate, bool _no_demurrage_fee)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_CONFIG)
public
returns (bool _success)
{
}
/// @notice update configs for transfer fees
function update_config_transfer(uint256 _base, uint256 _rate, bool _no_transfer_fee, uint256 _minimum_transfer_amount)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_CONFIG)
public
returns (bool _success)
{
}
/////////////////////////////////////////////
/// Demurrage-related functions ///
/////////////////////////////////////////////
/// @notice called by TokenDemurrageService to get the global demurrage configs
function read_demurrage_config()
constant
public
returns (uint256 _collector_balance,
uint256 _base,
uint256 _rate,
address _collector)
{
}
function read_demurrage_config_underlying()
public
constant
returns (uint256 _base,
uint256 _rate,
address _collector,
bool _no_demurrage_fee)
{
}
/// @notice called by TokenDemurrageService to get the user's information needed to deduct his demurrage fees
function read_user_for_demurrage(address _account)
public
constant
returns (uint256 _raw_balance, uint256 _payment_date, bool _no_demurrage_fee)
{
}
/// @notice called by TokenDemurrageService to deduct demurrage fees from a user's balance
function update_user_for_demurrage(address _user, uint256 _user_new_balance, uint256 _user_new_payment_date, uint256 _collector_new_balance)
if_sender_is(CONTRACT_SERVICE_TOKEN_DEMURRAGE)
public
returns (bool _success)
{
}
////////////////////////////////////////
/// Recast-related functions ///
////////////////////////////////////////
/// @notice called by AssetsController to read global info to recast an asset item
function read_recast_config()
constant
public
returns (uint256 _base,
uint256 _rate,
uint256 _total_supply,
uint256 _effective_total_supply,
address _collector,
uint256 _collector_balance)
{
}
/// @notice called by AssetsController to read a user's configs for recasting assets
function read_user_for_recast(address _account)
public
constant
returns (uint256 _raw_balance, bool _no_recast_fee)
{
}
/// @notice called by AssetsController to recast an asset item
function update_balances_after_recast(address _recaster,
uint256 _recaster_new_balance,
uint256 _recast_fee_collector_new_balance,
uint256 _new_total_supply,
uint256 _new_effective_total_supply)
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
public
returns (bool _success)
{
}
////////////////////////////////////////
/// Transfer-related functions ///
////////////////////////////////////////
/// @notice called by TokenTransferController to read global configs for transfering tokens
function read_transfer_config()
public
constant
returns (uint256 _collector_balance,
uint256 _base,
uint256 _rate,
address _collector,
bool _no_transfer_fee,
uint256 _minimum_transfer_amount)
{
}
/// @notice called by TokenTransferController to read a user's configs for tranfering tokens
function read_user_for_transfer(address _account)
public
constant
returns (uint256 _raw_balance, bool _no_transfer_fee)
{
}
/// @notice called by TokenTransferController to update user balances after transfering
function update_transfer_balance(address _sender, uint256 _sender_new_balance, address _recipient,
uint256 _recipient_new_balance, uint256 _transfer_fee_collector_new_balance)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_TRANSFER)
public
returns (bool _success)
{
}
/// @notice called by TokenTransferController to update balances after transfering from
function update_transfer_from_balance(address _sender, uint256 _sender_new_balance, address _recipient,
uint256 _recipient_new_balance, uint256 _transfer_fee_collector_new_balance,
address _spender, uint256 _spender_new_allowance)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_TRANSFER)
public
returns (bool _success)
{
}
////////////////////////////////////////
/// transfer fees to distributors ///
////////////////////////////////////////
function internal_move_balance(address _from, address _to)
internal
returns (uint256 _fees)
{
}
function move_fees_to_distributors(address _demurrage_fees_distributor, address _recast_fees_distributor, address _transfer_fees_distributor)
if_sender_is(CONTRACT_CONTROLLER_TOKEN_CONFIG)
public
returns (bool _success, uint256[3] _fees_array)
{
}
}
| init(CONTRACT_STORAGE_GOLD_TOKEN,_resolver) | 346,923 | init(CONTRACT_STORAGE_GOLD_TOKEN,_resolver) |
null | pragma solidity ^0.4.19;
contract AssetsStorageElectron is ResolverClient, BytesIteratorStorage, DigixConstants, DigixConstantsElectron {
using DoublyLinkedList for DoublyLinkedList.Bytes;
uint256 public recast_block_threshold;
mapping (bytes32 => bytes32) custodian_by_asset_id;
mapping (bytes32 => bytes32) custodian_by_global_audit_doc;
mapping (bytes32 => uint256) global_audit_timestamp;
mapping (bytes32 => bool) valid_custodians;
DoublyLinkedList.Bytes all_custodians;
mapping(bytes32 => uint256) public remint_item_blocked_at;
uint256 public remint_item_block_duration;
function AssetsStorageElectron(address _resolver) public {
require(<FILL_ME>)
recast_block_threshold = 20;
remint_item_block_duration = 1 days;
}
function set_remint_item_block_duration(uint256 _duration)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function set_remint_item_blocked_at(bytes32 _item, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function add_custodian(bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_custodian(bytes32 _doc, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_timestamp(bytes32 _doc, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_recast_block_threshold(uint256 _block_threshold)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function update_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function read_asset_custodian(bytes32 _item)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_custodian(bytes32 _doc)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_info(bytes32 _doc)
public
constant
returns (bytes32 _custodian, uint256 _timestamp)
{
}
function is_valid_custodian(bytes32 _custodian)
public
constant
returns (bool _valid)
{
}
function read_first_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_last_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_next_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _next_custodian)
{
}
function read_previous_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _previous_custodian)
{
}
function read_total_custodians()
public
constant
returns (uint256 _total_count)
{
}
}
| init(CONTRACT_STORAGE_ASSETS_ELECTRON,_resolver) | 346,943 | init(CONTRACT_STORAGE_ASSETS_ELECTRON,_resolver) |
null | pragma solidity ^0.4.19;
contract AssetsStorageElectron is ResolverClient, BytesIteratorStorage, DigixConstants, DigixConstantsElectron {
using DoublyLinkedList for DoublyLinkedList.Bytes;
uint256 public recast_block_threshold;
mapping (bytes32 => bytes32) custodian_by_asset_id;
mapping (bytes32 => bytes32) custodian_by_global_audit_doc;
mapping (bytes32 => uint256) global_audit_timestamp;
mapping (bytes32 => bool) valid_custodians;
DoublyLinkedList.Bytes all_custodians;
mapping(bytes32 => uint256) public remint_item_blocked_at;
uint256 public remint_item_block_duration;
function AssetsStorageElectron(address _resolver) public {
}
function set_remint_item_block_duration(uint256 _duration)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function set_remint_item_blocked_at(bytes32 _item, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function add_custodian(bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
require(<FILL_ME>)
custodian_by_asset_id[_item] = _custodian;
_success = true;
}
function set_audit_custodian(bytes32 _doc, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_timestamp(bytes32 _doc, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_recast_block_threshold(uint256 _block_threshold)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function update_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function read_asset_custodian(bytes32 _item)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_custodian(bytes32 _doc)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_info(bytes32 _doc)
public
constant
returns (bytes32 _custodian, uint256 _timestamp)
{
}
function is_valid_custodian(bytes32 _custodian)
public
constant
returns (bool _valid)
{
}
function read_first_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_last_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_next_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _next_custodian)
{
}
function read_previous_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _previous_custodian)
{
}
function read_total_custodians()
public
constant
returns (uint256 _total_count)
{
}
}
| custodian_by_asset_id[_item]==bytes32(0x0) | 346,943 | custodian_by_asset_id[_item]==bytes32(0x0) |
null | pragma solidity ^0.4.19;
contract AssetsStorageElectron is ResolverClient, BytesIteratorStorage, DigixConstants, DigixConstantsElectron {
using DoublyLinkedList for DoublyLinkedList.Bytes;
uint256 public recast_block_threshold;
mapping (bytes32 => bytes32) custodian_by_asset_id;
mapping (bytes32 => bytes32) custodian_by_global_audit_doc;
mapping (bytes32 => uint256) global_audit_timestamp;
mapping (bytes32 => bool) valid_custodians;
DoublyLinkedList.Bytes all_custodians;
mapping(bytes32 => uint256) public remint_item_blocked_at;
uint256 public remint_item_block_duration;
function AssetsStorageElectron(address _resolver) public {
}
function set_remint_item_block_duration(uint256 _duration)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function set_remint_item_blocked_at(bytes32 _item, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function add_custodian(bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_custodian(bytes32 _doc, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
require(<FILL_ME>)
custodian_by_global_audit_doc[_doc] = _custodian;
_success = true;
}
function set_audit_timestamp(bytes32 _doc, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_recast_block_threshold(uint256 _block_threshold)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function update_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function read_asset_custodian(bytes32 _item)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_custodian(bytes32 _doc)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_info(bytes32 _doc)
public
constant
returns (bytes32 _custodian, uint256 _timestamp)
{
}
function is_valid_custodian(bytes32 _custodian)
public
constant
returns (bool _valid)
{
}
function read_first_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_last_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_next_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _next_custodian)
{
}
function read_previous_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _previous_custodian)
{
}
function read_total_custodians()
public
constant
returns (uint256 _total_count)
{
}
}
| custodian_by_global_audit_doc[_doc]==bytes32(0x0) | 346,943 | custodian_by_global_audit_doc[_doc]==bytes32(0x0) |
null | pragma solidity ^0.4.19;
contract AssetsStorageElectron is ResolverClient, BytesIteratorStorage, DigixConstants, DigixConstantsElectron {
using DoublyLinkedList for DoublyLinkedList.Bytes;
uint256 public recast_block_threshold;
mapping (bytes32 => bytes32) custodian_by_asset_id;
mapping (bytes32 => bytes32) custodian_by_global_audit_doc;
mapping (bytes32 => uint256) global_audit_timestamp;
mapping (bytes32 => bool) valid_custodians;
DoublyLinkedList.Bytes all_custodians;
mapping(bytes32 => uint256) public remint_item_blocked_at;
uint256 public remint_item_block_duration;
function AssetsStorageElectron(address _resolver) public {
}
function set_remint_item_block_duration(uint256 _duration)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function set_remint_item_blocked_at(bytes32 _item, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function add_custodian(bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_custodian(bytes32 _doc, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_timestamp(bytes32 _doc, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
require(<FILL_ME>)
global_audit_timestamp[_doc] = _timestamp;
_success = true;
}
function set_recast_block_threshold(uint256 _block_threshold)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function update_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function read_asset_custodian(bytes32 _item)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_custodian(bytes32 _doc)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_info(bytes32 _doc)
public
constant
returns (bytes32 _custodian, uint256 _timestamp)
{
}
function is_valid_custodian(bytes32 _custodian)
public
constant
returns (bool _valid)
{
}
function read_first_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_last_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_next_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _next_custodian)
{
}
function read_previous_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _previous_custodian)
{
}
function read_total_custodians()
public
constant
returns (uint256 _total_count)
{
}
}
| global_audit_timestamp[_doc]==0 | 346,943 | global_audit_timestamp[_doc]==0 |
null | pragma solidity ^0.4.19;
contract AssetsStorageElectron is ResolverClient, BytesIteratorStorage, DigixConstants, DigixConstantsElectron {
using DoublyLinkedList for DoublyLinkedList.Bytes;
uint256 public recast_block_threshold;
mapping (bytes32 => bytes32) custodian_by_asset_id;
mapping (bytes32 => bytes32) custodian_by_global_audit_doc;
mapping (bytes32 => uint256) global_audit_timestamp;
mapping (bytes32 => bool) valid_custodians;
DoublyLinkedList.Bytes all_custodians;
mapping(bytes32 => uint256) public remint_item_blocked_at;
uint256 public remint_item_block_duration;
function AssetsStorageElectron(address _resolver) public {
}
function set_remint_item_block_duration(uint256 _duration)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function set_remint_item_blocked_at(bytes32 _item, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
}
function add_custodian(bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_custodian(bytes32 _doc, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_audit_timestamp(bytes32 _doc, uint256 _timestamp)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function set_recast_block_threshold(uint256 _block_threshold)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
}
function update_asset_custodian(bytes32 _item, bytes32 _custodian)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_ELECTRON)
returns (bool _success)
{
require(<FILL_ME>)
custodian_by_asset_id[_item] = _custodian;
_success = true;
}
function read_asset_custodian(bytes32 _item)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_custodian(bytes32 _doc)
public
constant
returns (bytes32 _custodian)
{
}
function read_audit_info(bytes32 _doc)
public
constant
returns (bytes32 _custodian, uint256 _timestamp)
{
}
function is_valid_custodian(bytes32 _custodian)
public
constant
returns (bool _valid)
{
}
function read_first_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_last_custodian()
public
constant
returns (bytes32 _custodian)
{
}
function read_next_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _next_custodian)
{
}
function read_previous_custodian(bytes32 _custodian)
public
constant
returns (bytes32 _previous_custodian)
{
}
function read_total_custodians()
public
constant
returns (uint256 _total_count)
{
}
}
| custodian_by_asset_id[_item]!=bytes32(0x0) | 346,943 | custodian_by_asset_id[_item]!=bytes32(0x0) |
null | /// math.sol -- mixin for inline numerical wizardry
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the 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 (express or implied).
pragma solidity ^0.4.13;
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) {
}
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) {
}
}
/// auth.sol -- widely-used access control pattern for Ethereum
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the 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 (express or implied).
pragma solidity ^0.4.13;
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;
function DSAuth() 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) {
}
}
/// note.sol -- the `note' modifier, for logging calls as events
// Copyright (C) 2017 DappHub, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the 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 (express or implied).
pragma solidity ^0.4.13;
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
/// stop.sol -- mixin for enable/disable functionality
// Copyright (C) 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the 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 (express or implied).
pragma solidity ^0.4.13;
contract DSStop is DSNote, DSAuth {
bool public stopped;
modifier stoppable {
}
function stop() public auth note {
}
function start() public auth note {
}
}
/*
Copyright 2017 DappHub, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.4.8;
// Token standard API
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
function totalSupply() public view returns (uint supply);
function balanceOf( address who ) public view returns (uint value);
function allowance( address owner, address spender ) public view returns (uint _allowance);
function transfer( address to, uint value) public returns (bool ok);
function transferFrom( address from, address to, uint value) public returns (bool ok);
function approve( address spender, uint value ) public returns (bool ok);
event Transfer( address indexed from, address indexed to, uint value);
event Approval( address indexed owner, address indexed spender, uint value);
}
/// base.sol -- basic ERC20 implementation
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the 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 (express or implied).
pragma solidity ^0.4.13;
contract DSTokenBase is ERC20, DSMath {
uint256 _supply;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _approvals;
function DSTokenBase(uint supply) public {
}
function totalSupply() public view returns (uint) {
}
function balanceOf(address src) public view returns (uint) {
}
function allowance(address src, address guy) public view returns (uint) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
function approve(address guy, uint wad) public returns (bool) {
}
}
/// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the 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 (express or implied).
pragma solidity ^0.4.13;
contract DSToken is DSTokenBase(0), DSStop {
mapping (address => mapping (address => bool)) _trusted;
bytes32 public symbol;
uint256 public decimals = 18; // standard token precision. override to customize
function DSToken(bytes32 symbol_) public {
}
event Trust(address indexed src, address indexed guy, bool wat);
event Mint(address indexed guy, uint wad);
event Burn(address indexed guy, uint wad);
function trusted(address src, address guy) public view returns (bool) {
}
function trust(address guy, bool wat) public stoppable {
}
function approve(address guy, uint wad) public stoppable returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
stoppable
returns (bool)
{
}
function push(address dst, uint wad) public {
}
function pull(address src, uint wad) public {
}
function move(address src, address dst, uint wad) public {
}
function mint(uint wad) public {
}
function burn(uint wad) public {
}
function mint(address guy, uint wad) public auth stoppable {
}
function burn(address guy, uint wad) public auth stoppable {
}
// Optional token name
bytes32 public name = "";
function setName(bytes32 name_) public auth {
}
}
// The MIT License (MIT)
// Copyright (c) 2017 Viewly (https://view.ly)
pragma solidity ^0.4.18;
/*
* ViewTokenMintage contract is used to mint VIEW Tokens within the
* constraints set in the Viewly Whitepaper. It tracks total minted tokens for
* each distribution category.
*/
contract ViewTokenMintage is DSAuth, DSMath {
enum CategoryId {
Founders,
Supporters,
Creators,
Bounties,
SeedSale,
MainSale
}
struct Category {
uint mintLimit;
uint amountMinted;
}
DSToken public viewToken;
Category[6] public categories;
event TokensMinted(
address recipient,
uint tokens,
CategoryId category
);
function ViewTokenMintage(DSToken viewToken_) public {
}
function mint(address recipient, uint tokens, CategoryId categoryId) public auth {
require(tokens > 0);
Category storage category = categories[uint8(categoryId)];
require(<FILL_ME>)
categories[uint8(categoryId)].amountMinted += tokens;
viewToken.mint(recipient, tokens);
TokensMinted(recipient, tokens, categoryId);
}
function destruct(address addr) public auth {
}
function totalMintLimit() public view returns (uint total) {
}
}
| add(tokens,category.amountMinted)<=category.mintLimit | 347,156 | add(tokens,category.amountMinted)<=category.mintLimit |
null | pragma solidity ^0.4.24;
contract ERC20Basic {
function totalSupply() public view returns (uint256 supply);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
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;
/**
* @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 {
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
function totalSupply() public view returns (uint256) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract K1Token is Ownable,StandardToken {
string public constant name = "K1";
string public constant symbol = "K1";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 21 * (10 ** 6) * (10 ** uint256(decimals));
event Issue(uint256 amount);
constructor() public {
}
function issue(uint256 amount) public onlyOwner {
require(<FILL_ME>)
require(balances[owner] + amount > balances[owner]);
balances[owner] += amount;
totalSupply_ += amount;
emit Issue(amount);
}
}
| totalSupply_+amount>totalSupply_ | 347,243 | totalSupply_+amount>totalSupply_ |
"already transacted" | // Copyright (c) 2018-2020 double jump.tokyo inc.
pragma solidity 0.5.16;
library ECDSA {
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* NOTE: This call _does not revert_ if the signature is invalid, or
* if the signer is otherwise unable to be retrieved. In those scenarios,
* the zero address is returned.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* replicates the behavior of the
* https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
* JSON-RPC method.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
}
}
library Roles {
struct Role {
mapping (address => bool) bearer;
}
function add(Role storage role, address account) internal {
}
function remove(Role storage role, address account) internal {
}
function has(Role storage role, address account) internal view returns (bool) {
}
}
interface IERC165 {
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
/// @title ERC-165 Standard Interface Detection
/// @dev See https://eips.ethereum.org/EIPS/eip-165
contract ERC165 is IERC165 {
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
mapping(bytes4 => bool) private _supportedInterfaces;
constructor () internal {
}
function supportsInterface(bytes4 interfaceId) external view returns (bool) {
}
function _registerInterface(bytes4 interfaceId) internal {
}
}
interface IERC173 /* is ERC165 */ {
/// @dev This emits when ownership of a contract changes.
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/// @notice Get the address of the owner
/// @return The address of the owner.
function owner() external view returns (address);
/// @notice Set the address of the new owner of the contract
/// @param _newOwner The address of the new owner of the contract
function transferOwnership(address _newOwner) external;
}
contract ERC173 is IERC173, ERC165 {
address private _owner;
constructor() public {
}
modifier onlyOwner() {
}
function owner() public view returns (address) {
}
function transferOwnership(address _newOwner) public onlyOwner() {
}
function _transferOwnership(address _newOwner) internal {
}
}
contract Operatable is ERC173 {
using Roles for Roles.Role;
event OperatorAdded(address indexed account);
event OperatorRemoved(address indexed account);
event Paused(address account);
event Unpaused(address account);
bool private _paused;
Roles.Role private operators;
constructor() public {
}
modifier onlyOperator() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function transferOwnership(address _newOwner) public onlyOperator() {
}
function isOperator(address account) public view returns (bool) {
}
function addOperator(address account) public onlyOperator() {
}
function removeOperator(address account) public onlyOperator() {
}
function paused() public view returns (bool) {
}
function pause() public onlyOperator() whenNotPaused() {
}
function unpause() public onlyOperator() whenPaused() {
}
function withdrawEther() public onlyOperator() {
}
}
contract BFHDailyActionV1 is Operatable {
address public validator;
mapping(address => int64) public lastActionDateAddress;
mapping(bytes32 => int64) public lastActionDateHash;
event Action(address indexed user, int64 at);
constructor(address _varidator) public {
}
function setValidater(address _varidator) public onlyOperator() {
}
function isApplicable(address _sender, bytes32 _hash, int64 _time) public view returns (bool) {
}
function action(bytes calldata _signature, bytes32 _hash, int64 _time) external whenNotPaused() {
require(<FILL_ME>)
require(validateSig(msg.sender, _hash, _time, _signature), "invalid signature");
int64 day = _time / 86400;
lastActionDateAddress[msg.sender] = day;
lastActionDateHash[_hash] = day;
emit Action(msg.sender, _time);
}
function validateSig(address _from, bytes32 _hash, int64 _time, bytes memory _signature) public view returns (bool) {
}
function encodeData(address _from, bytes32 _hash, int64 _time) public pure returns (bytes32) {
}
function ethSignedMessageHash(bytes32 _data) public pure returns (bytes32) {
}
function recover(bytes32 _data, bytes memory _signature) public pure returns (address) {
}
}
| isApplicable(msg.sender,_hash,_time),"already transacted" | 347,250 | isApplicable(msg.sender,_hash,_time) |
"invalid signature" | // Copyright (c) 2018-2020 double jump.tokyo inc.
pragma solidity 0.5.16;
library ECDSA {
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* NOTE: This call _does not revert_ if the signature is invalid, or
* if the signer is otherwise unable to be retrieved. In those scenarios,
* the zero address is returned.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* replicates the behavior of the
* https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
* JSON-RPC method.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
}
}
library Roles {
struct Role {
mapping (address => bool) bearer;
}
function add(Role storage role, address account) internal {
}
function remove(Role storage role, address account) internal {
}
function has(Role storage role, address account) internal view returns (bool) {
}
}
interface IERC165 {
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
/// @title ERC-165 Standard Interface Detection
/// @dev See https://eips.ethereum.org/EIPS/eip-165
contract ERC165 is IERC165 {
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
mapping(bytes4 => bool) private _supportedInterfaces;
constructor () internal {
}
function supportsInterface(bytes4 interfaceId) external view returns (bool) {
}
function _registerInterface(bytes4 interfaceId) internal {
}
}
interface IERC173 /* is ERC165 */ {
/// @dev This emits when ownership of a contract changes.
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/// @notice Get the address of the owner
/// @return The address of the owner.
function owner() external view returns (address);
/// @notice Set the address of the new owner of the contract
/// @param _newOwner The address of the new owner of the contract
function transferOwnership(address _newOwner) external;
}
contract ERC173 is IERC173, ERC165 {
address private _owner;
constructor() public {
}
modifier onlyOwner() {
}
function owner() public view returns (address) {
}
function transferOwnership(address _newOwner) public onlyOwner() {
}
function _transferOwnership(address _newOwner) internal {
}
}
contract Operatable is ERC173 {
using Roles for Roles.Role;
event OperatorAdded(address indexed account);
event OperatorRemoved(address indexed account);
event Paused(address account);
event Unpaused(address account);
bool private _paused;
Roles.Role private operators;
constructor() public {
}
modifier onlyOperator() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function transferOwnership(address _newOwner) public onlyOperator() {
}
function isOperator(address account) public view returns (bool) {
}
function addOperator(address account) public onlyOperator() {
}
function removeOperator(address account) public onlyOperator() {
}
function paused() public view returns (bool) {
}
function pause() public onlyOperator() whenNotPaused() {
}
function unpause() public onlyOperator() whenPaused() {
}
function withdrawEther() public onlyOperator() {
}
}
contract BFHDailyActionV1 is Operatable {
address public validator;
mapping(address => int64) public lastActionDateAddress;
mapping(bytes32 => int64) public lastActionDateHash;
event Action(address indexed user, int64 at);
constructor(address _varidator) public {
}
function setValidater(address _varidator) public onlyOperator() {
}
function isApplicable(address _sender, bytes32 _hash, int64 _time) public view returns (bool) {
}
function action(bytes calldata _signature, bytes32 _hash, int64 _time) external whenNotPaused() {
require(isApplicable(msg.sender, _hash, _time), "already transacted");
require(<FILL_ME>)
int64 day = _time / 86400;
lastActionDateAddress[msg.sender] = day;
lastActionDateHash[_hash] = day;
emit Action(msg.sender, _time);
}
function validateSig(address _from, bytes32 _hash, int64 _time, bytes memory _signature) public view returns (bool) {
}
function encodeData(address _from, bytes32 _hash, int64 _time) public pure returns (bytes32) {
}
function ethSignedMessageHash(bytes32 _data) public pure returns (bytes32) {
}
function recover(bytes32 _data, bytes memory _signature) public pure returns (address) {
}
}
| validateSig(msg.sender,_hash,_time,_signature),"invalid signature" | 347,250 | validateSig(msg.sender,_hash,_time,_signature) |
"beneficiary didn't receive fees" | // SPDX-License-Identifier: GNU-3.0
pragma solidity =0.6.12;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
/**
@title Coinbase Wallet Swap Proxy
This contract is meant to be stateless and not meant to custody funds.
Any funds sent directly to this contract may not be recoverable.
*/
contract SwapProxy is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
// ETH Indicator
address private constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
// WETH address
address private immutable _WETH;
// Fee collection beneficiary
address payable private _beneficiary;
// Uniswap V2 router
IUniswapV2Router02 private immutable _uniswapV2Router;
// Event fired after a successful swap
event TokensTraded(
address indexed sender,
address indexed from,
address indexed to,
uint256 fromAmount,
uint256 toAmount,
uint256 fee
);
// Event fired after updating beneficiary address
event BeneficiaryUpdate(address indexed beneficiary);
constructor(address uniswapV2Router, address payable beneficiary, address WETH) public {
}
/// @dev Execute swap operation from ETH to ERC20
/// @param toERC20 Destination ERC20 contract address
/// @param minAmount Minimum amount of ERC20 tokens to receive in base units
/// @param fee Fee collected and sent to the beneficiary, deducted from msg.value
function swapETHForTokens(
IERC20 toERC20,
uint256 minAmount,
uint256 fee
) external payable nonReentrant() {
}
/// @dev Execute swap operation from ERC20 to ETH
/// @param fromERC20 Source ERC20 contract address or ETH indicator
/// @param fromAmount Amount of ERC20 tokens to sell in base units
/// @param minAmount Minimum amount of ETH to receive in base units
/// @param fee Fee collected and sent to the beneficiary, deducted from fromAmount
function swapTokensForETH(
IERC20 fromERC20,
uint256 fromAmount,
uint256 minAmount,
uint256 fee
) external payable nonReentrant() {
require(fromAmount > fee, "fee cannot exceed fromAmount");
require(msg.sender != _beneficiary, "msg.sender can't be beneficiary");
address contractAddress = address(this);
uint256 beneficiaryBalance = fromERC20.balanceOf(_beneficiary);
uint256 fromAmountMinusFee = fromAmount.sub(fee);
// Pull the funds into the smart contract
fromERC20.safeTransferFrom(msg.sender, contractAddress, fromAmountMinusFee);
// Send Coinbase fee
if (fee > 0) {
fromERC20.safeTransferFrom(msg.sender, _beneficiary, fee);
}
require(<FILL_ME>)
// Execute the swap through Uniswap
address[] memory path = new address[](2);
path[0] = address(fromERC20);
path[1] = address(_WETH);
uint256[] memory amounts = _uniswapV2Router.swapExactTokensForETH(
fromAmountMinusFee,
minAmount,
path,
contractAddress,
block.timestamp
);
uint256 toAmount = amounts[1];
// Send swapped ETH back to user
_sendETH(msg.sender, toAmount);
emit TokensTraded(
msg.sender,
address(fromERC20),
ETH_ADDRESS,
fromAmountMinusFee,
toAmount,
fee
);
}
/// @dev Execute swap operation from ERC20 to ERC20
/// @param fromERC20 Source ERC20 contract address or ETH indicator
/// @param toERC20 Destination ERC20 contract address or ETH indicator
/// @param fromAmount Amount of ERC20 tokens to sell in base units
/// @param minAmount Minimum amount of ERC20 tokens to receive in base units
/// @param fee Fee collected and sent to the beneficiary, deducted from fromAmount
function swapTokensForTokens(
IERC20 fromERC20,
IERC20 toERC20,
uint256 fromAmount,
uint256 minAmount,
uint256 fee
) external payable nonReentrant() {
}
/// @dev Grant ERC20 approval to the Uniswap V2 Router
/// @param tokens List of tokens to approve
function approve(IERC20[] calldata tokens) external onlyOwner {
}
function getUniswapV2Router() public view returns(IUniswapV2Router02) {
}
function getBeneficiary() public view returns(address) {
}
/// @dev Updates fee collection beneficiary
/// @param beneficiary Address collecting all the fees
function setBeneficiary(address payable beneficiary) external onlyOwner {
}
// Needed to receive ETH
receive() external payable {}
function _sendETH(address payable toAddress, uint256 amount) private {
}
function _sendERC20(IERC20 token, address payable toAddress, uint256 amount) private {
}
}
| fromERC20.balanceOf(_beneficiary)>=beneficiaryBalance.add(fee),"beneficiary didn't receive fees" | 347,259 | fromERC20.balanceOf(_beneficiary)>=beneficiaryBalance.add(fee) |
"Sold out!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
contract TipsyTiger is ERC721Enumerable, Ownable {
using Strings for uint256;
string public PROVENANCE = "";
string _baseTokenURI;
string public baseExtension = '.json';
uint256 public reserved = 100;
uint256 public publicSalePrice = 0.05 ether;
uint256 public presalePrice = 0.04 ether;
uint256 public presaleSupply = 1000;
uint256 public createTime = block.timestamp;
uint256 public maxSupply = 8000;
mapping(address => uint256) public presaleMintedAmount;
bool public publicSaleOpen = false;
bool public presaleOpen = false;
constructor(string memory baseURI) ERC721("TipsyTiger Club", "TIPSY") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mintTiger(uint256 num) public payable {
require( publicSaleOpen, "Public sale is not open" );
require( num < 21, "You can only mint a maximum of 20 Tigers" );
uint256 supply = totalSupply();
require(<FILL_ME>)
require( msg.value >= publicSalePrice * num, "Ether sent is not correct" );
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
}
function mintPresale(uint256 _mintNum) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// only owner
function setPublicPrice(uint256 _newPublic) public onlyOwner() {
}
function setPresalePrice(uint256 _newPresale) public onlyOwner() {
}
function setPresaleSupply(uint256 _newSupply) public onlyOwner() {
}
// reserve some tigers aside
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
// set provenance once it's calculated
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setBaseExtension(string memory _newExtension) public onlyOwner() {
}
// burn token
function burn(uint256 _tokenId) public onlyOwner {
}
function togglePublicSale() public onlyOwner {
}
function togglePresale() public onlyOwner {
}
function withdraw() public onlyOwner {
}
function sendBalance() public onlyOwner {
}
}
| supply+num<=maxSupply-100,"Sold out!" | 347,314 | supply+num<=maxSupply-100 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.