comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"insufficent-seed-tokens" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";
import "./interfaces/IBabyBirdez.sol";
import "./interfaces/ISeedToken.sol";
import "hardhat/console.sol";
contract Breeder is Ownable {
event SeedClaimed(
address indexed user,
uint256 indexed tokenId,
uint256 amount
);
ISeedToken public immutable seed;
IERC721Enumerable public immutable genesis;
IBabyBirdez public immutable baby;
uint256 public immutable breedStart;
// Operation costs
uint256 public constant BREEDING_COST = 600 * (10**18);
uint256 public constant NAME_COST = 300 * (10**18);
uint256 public constant BIO_COST = 100 * (10**18);
// Seed drip per token, per day
uint256 public constant SEED_PER_DAY = 10 * (10**18);
// Max seed drip from this contract
uint256 public constant SEED_AMOUNT = 48_654_500 * (10**18);
// Max totalSupply of mintable Baby
uint256 public maxBreedableBaby = 5000;
// Total Seed claimed from this contract
uint256 public totalSeedClaimed;
// Genesis TokenId -> Seed Claimed
mapping(uint256 => uint256) public seedClaimed;
// Genesis TokenID -> Custom Bio
mapping(uint256 => string) public bio;
// Genesis TokenID -> Custom Name
mapping(uint256 => string) public name;
modifier onlyGenesisOwner(uint256 _tokenId) {
}
constructor(
ISeedToken _seed,
IERC721Enumerable _genesis,
IBabyBirdez _baby
) {
}
function pendingRewards(uint256 _tokenId) public view returns (uint256) {
}
function allPendingRewards(address _user) external view returns (uint256) {
}
function claim(uint256 _tokenId) external onlyGenesisOwner(_tokenId) {
}
function setBio(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
require(<FILL_ME>)
_burn(msg.sender, BIO_COST);
bio[_tokenId] = _text;
}
function setName(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function claimAll() external {
}
function setMaxBreedable(uint256 _newLimit) external onlyOwner {
}
function breed(uint256 _numberOfTokens) external {
}
function _mint(address _to, uint256 _amount) internal {
}
function _burn(address _to, uint256 _amount) internal {
}
function _claim(uint256 _tokenId) internal {
}
function _getGenesisCount(address _owner)
internal
view
returns (uint256 _count)
{
}
function _getGenesisIds(address _owner)
internal
view
returns (uint256[] memory)
{
}
}
| seed.balanceOf(msg.sender)>=BIO_COST,"insufficent-seed-tokens" | 326,417 | seed.balanceOf(msg.sender)>=BIO_COST |
"insufficent-seed-tokens" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";
import "./interfaces/IBabyBirdez.sol";
import "./interfaces/ISeedToken.sol";
import "hardhat/console.sol";
contract Breeder is Ownable {
event SeedClaimed(
address indexed user,
uint256 indexed tokenId,
uint256 amount
);
ISeedToken public immutable seed;
IERC721Enumerable public immutable genesis;
IBabyBirdez public immutable baby;
uint256 public immutable breedStart;
// Operation costs
uint256 public constant BREEDING_COST = 600 * (10**18);
uint256 public constant NAME_COST = 300 * (10**18);
uint256 public constant BIO_COST = 100 * (10**18);
// Seed drip per token, per day
uint256 public constant SEED_PER_DAY = 10 * (10**18);
// Max seed drip from this contract
uint256 public constant SEED_AMOUNT = 48_654_500 * (10**18);
// Max totalSupply of mintable Baby
uint256 public maxBreedableBaby = 5000;
// Total Seed claimed from this contract
uint256 public totalSeedClaimed;
// Genesis TokenId -> Seed Claimed
mapping(uint256 => uint256) public seedClaimed;
// Genesis TokenID -> Custom Bio
mapping(uint256 => string) public bio;
// Genesis TokenID -> Custom Name
mapping(uint256 => string) public name;
modifier onlyGenesisOwner(uint256 _tokenId) {
}
constructor(
ISeedToken _seed,
IERC721Enumerable _genesis,
IBabyBirdez _baby
) {
}
function pendingRewards(uint256 _tokenId) public view returns (uint256) {
}
function allPendingRewards(address _user) external view returns (uint256) {
}
function claim(uint256 _tokenId) external onlyGenesisOwner(_tokenId) {
}
function setBio(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function setName(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
require(<FILL_ME>)
_burn(msg.sender, NAME_COST);
name[_tokenId] = _text;
}
function claimAll() external {
}
function setMaxBreedable(uint256 _newLimit) external onlyOwner {
}
function breed(uint256 _numberOfTokens) external {
}
function _mint(address _to, uint256 _amount) internal {
}
function _burn(address _to, uint256 _amount) internal {
}
function _claim(uint256 _tokenId) internal {
}
function _getGenesisCount(address _owner)
internal
view
returns (uint256 _count)
{
}
function _getGenesisIds(address _owner)
internal
view
returns (uint256[] memory)
{
}
}
| seed.balanceOf(msg.sender)>=NAME_COST,"insufficent-seed-tokens" | 326,417 | seed.balanceOf(msg.sender)>=NAME_COST |
"not-enough-genesis" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";
import "./interfaces/IBabyBirdez.sol";
import "./interfaces/ISeedToken.sol";
import "hardhat/console.sol";
contract Breeder is Ownable {
event SeedClaimed(
address indexed user,
uint256 indexed tokenId,
uint256 amount
);
ISeedToken public immutable seed;
IERC721Enumerable public immutable genesis;
IBabyBirdez public immutable baby;
uint256 public immutable breedStart;
// Operation costs
uint256 public constant BREEDING_COST = 600 * (10**18);
uint256 public constant NAME_COST = 300 * (10**18);
uint256 public constant BIO_COST = 100 * (10**18);
// Seed drip per token, per day
uint256 public constant SEED_PER_DAY = 10 * (10**18);
// Max seed drip from this contract
uint256 public constant SEED_AMOUNT = 48_654_500 * (10**18);
// Max totalSupply of mintable Baby
uint256 public maxBreedableBaby = 5000;
// Total Seed claimed from this contract
uint256 public totalSeedClaimed;
// Genesis TokenId -> Seed Claimed
mapping(uint256 => uint256) public seedClaimed;
// Genesis TokenID -> Custom Bio
mapping(uint256 => string) public bio;
// Genesis TokenID -> Custom Name
mapping(uint256 => string) public name;
modifier onlyGenesisOwner(uint256 _tokenId) {
}
constructor(
ISeedToken _seed,
IERC721Enumerable _genesis,
IBabyBirdez _baby
) {
}
function pendingRewards(uint256 _tokenId) public view returns (uint256) {
}
function allPendingRewards(address _user) external view returns (uint256) {
}
function claim(uint256 _tokenId) external onlyGenesisOwner(_tokenId) {
}
function setBio(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function setName(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function claimAll() external {
}
function setMaxBreedable(uint256 _newLimit) external onlyOwner {
}
function breed(uint256 _numberOfTokens) external {
require(<FILL_ME>)
uint256 _maxLeft = maxBreedableBaby - baby.totalSupply();
if (_numberOfTokens > _maxLeft) _numberOfTokens = _maxLeft;
if (_numberOfTokens > 0) {
uint256 _cost = _numberOfTokens * BREEDING_COST;
require(
seed.balanceOf(msg.sender) >= _cost,
"insufficent-seed-tokens"
);
_burn(msg.sender, _cost);
baby.mintTo(msg.sender, _numberOfTokens);
}
}
function _mint(address _to, uint256 _amount) internal {
}
function _burn(address _to, uint256 _amount) internal {
}
function _claim(uint256 _tokenId) internal {
}
function _getGenesisCount(address _owner)
internal
view
returns (uint256 _count)
{
}
function _getGenesisIds(address _owner)
internal
view
returns (uint256[] memory)
{
}
}
| _getGenesisCount(msg.sender)>=2,"not-enough-genesis" | 326,417 | _getGenesisCount(msg.sender)>=2 |
"insufficent-seed-tokens" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";
import "./interfaces/IBabyBirdez.sol";
import "./interfaces/ISeedToken.sol";
import "hardhat/console.sol";
contract Breeder is Ownable {
event SeedClaimed(
address indexed user,
uint256 indexed tokenId,
uint256 amount
);
ISeedToken public immutable seed;
IERC721Enumerable public immutable genesis;
IBabyBirdez public immutable baby;
uint256 public immutable breedStart;
// Operation costs
uint256 public constant BREEDING_COST = 600 * (10**18);
uint256 public constant NAME_COST = 300 * (10**18);
uint256 public constant BIO_COST = 100 * (10**18);
// Seed drip per token, per day
uint256 public constant SEED_PER_DAY = 10 * (10**18);
// Max seed drip from this contract
uint256 public constant SEED_AMOUNT = 48_654_500 * (10**18);
// Max totalSupply of mintable Baby
uint256 public maxBreedableBaby = 5000;
// Total Seed claimed from this contract
uint256 public totalSeedClaimed;
// Genesis TokenId -> Seed Claimed
mapping(uint256 => uint256) public seedClaimed;
// Genesis TokenID -> Custom Bio
mapping(uint256 => string) public bio;
// Genesis TokenID -> Custom Name
mapping(uint256 => string) public name;
modifier onlyGenesisOwner(uint256 _tokenId) {
}
constructor(
ISeedToken _seed,
IERC721Enumerable _genesis,
IBabyBirdez _baby
) {
}
function pendingRewards(uint256 _tokenId) public view returns (uint256) {
}
function allPendingRewards(address _user) external view returns (uint256) {
}
function claim(uint256 _tokenId) external onlyGenesisOwner(_tokenId) {
}
function setBio(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function setName(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function claimAll() external {
}
function setMaxBreedable(uint256 _newLimit) external onlyOwner {
}
function breed(uint256 _numberOfTokens) external {
require(_getGenesisCount(msg.sender) >= 2, "not-enough-genesis");
uint256 _maxLeft = maxBreedableBaby - baby.totalSupply();
if (_numberOfTokens > _maxLeft) _numberOfTokens = _maxLeft;
if (_numberOfTokens > 0) {
uint256 _cost = _numberOfTokens * BREEDING_COST;
require(<FILL_ME>)
_burn(msg.sender, _cost);
baby.mintTo(msg.sender, _numberOfTokens);
}
}
function _mint(address _to, uint256 _amount) internal {
}
function _burn(address _to, uint256 _amount) internal {
}
function _claim(uint256 _tokenId) internal {
}
function _getGenesisCount(address _owner)
internal
view
returns (uint256 _count)
{
}
function _getGenesisIds(address _owner)
internal
view
returns (uint256[] memory)
{
}
}
| seed.balanceOf(msg.sender)>=_cost,"insufficent-seed-tokens" | 326,417 | seed.balanceOf(msg.sender)>=_cost |
"NOT_A_SUPER_ADMIN" | pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
import "../../libraries/LibOrder.sol";
import "../../libraries/LibOrderAmounts.sol";
import "../../libraries/LibOutcome.sol";
import "../../interfaces/IEscrow.sol";
import "../../interfaces/IOutcomeReporter.sol";
import "../../interfaces/permissions/ISuperAdminRole.sol";
import "../../interfaces/trading/ITokenTransferProxy.sol";
import "../../interfaces/trading/IFills.sol";
import "../Initializable.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
/// @title BaseFillOrder
/// @author Julian Wilson <[email protected]>
/// @notice Manages the core internal functionality to fill orders and check their validity.
contract BaseFillOrder is Initializable {
using LibOrder for LibOrder.Order;
using SafeMath for uint256;
ITokenTransferProxy internal proxy;
IFills internal fills;
IEscrow internal escrow;
ISuperAdminRole internal superAdminRole;
IOutcomeReporter internal outcomeReporter;
event OrderFill(
address indexed maker,
bytes32 indexed marketHash,
address indexed taker,
uint256 newFilledAmount,
bytes32 orderHash,
bytes32 fillHash,
LibOrder.Order order,
LibOrderAmounts.OrderAmounts orderAmounts
);
constructor(ISuperAdminRole _superAdminRole) public Initializable() {
}
/// @notice Initializes this contract with reference to other contracts.
/// @param _fills The Fills contract.
/// @param _escrow The Escrow contract.
/// @param _tokenTransferProxy The TokenTransferProxy contract.
function initialize(
IFills _fills,
IEscrow _escrow,
ITokenTransferProxy _tokenTransferProxy,
IOutcomeReporter _outcomeReporter
)
external
notInitialized
onlySuperAdmin(msg.sender)
{
}
/// @notice Throws if the caller is not a super admin.
/// @param operator The caller of the method.
modifier onlySuperAdmin(address operator) {
require(<FILL_ME>)
_;
}
/// @notice Intermediate function to fill a single order
/// @param order The order to be filled.
/// @param takerAmount The amount to fill the order by.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable.
function _fillSingleOrder(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for each maker and taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable in the case of a meta fill.
function updateOrderState(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for the maker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
function settleOrderForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
internal
{
}
/// @notice Intermediate function that settles the order for the taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker for this order.
function settleOrderForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
internal
{
}
/// @notice Checks that the order is valid given the taker and taker amount.
/// @param order The order to check.
/// @param takerAmount The amount the order will be filled by.
/// @param taker The taker who would fill this order.
/// @param makerSig The maker signature for this order.
function assertOrderValid(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes memory makerSig
)
internal
view
{
}
/// @notice Transfers a token using TokenTransferProxy transferFrom function.
/// @param token Address of token to transferFrom.
/// @param from Address transfering token.
/// @param to Address receiving token.
/// @param value Amount of token to transfer.
/// @return Success of token transfer.
function transferViaProxy(
address token,
address from,
address to,
uint256 value
)
internal
returns (bool)
{
}
/// @notice Updates the taker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
/// @param taker The taker of this order.
function updateTakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
/// @notice Updates the maker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
function updateMakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the maker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
function settleTransfersForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the taker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
/// @param taker The taker of this order.
function settleTransfersForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
}
| superAdminRole.isSuperAdmin(operator),"NOT_A_SUPER_ADMIN" | 326,561 | superAdminRole.isSuperAdmin(operator) |
"MARKET_NOT_TRADEABLE" | pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
import "../../libraries/LibOrder.sol";
import "../../libraries/LibOrderAmounts.sol";
import "../../libraries/LibOutcome.sol";
import "../../interfaces/IEscrow.sol";
import "../../interfaces/IOutcomeReporter.sol";
import "../../interfaces/permissions/ISuperAdminRole.sol";
import "../../interfaces/trading/ITokenTransferProxy.sol";
import "../../interfaces/trading/IFills.sol";
import "../Initializable.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
/// @title BaseFillOrder
/// @author Julian Wilson <[email protected]>
/// @notice Manages the core internal functionality to fill orders and check their validity.
contract BaseFillOrder is Initializable {
using LibOrder for LibOrder.Order;
using SafeMath for uint256;
ITokenTransferProxy internal proxy;
IFills internal fills;
IEscrow internal escrow;
ISuperAdminRole internal superAdminRole;
IOutcomeReporter internal outcomeReporter;
event OrderFill(
address indexed maker,
bytes32 indexed marketHash,
address indexed taker,
uint256 newFilledAmount,
bytes32 orderHash,
bytes32 fillHash,
LibOrder.Order order,
LibOrderAmounts.OrderAmounts orderAmounts
);
constructor(ISuperAdminRole _superAdminRole) public Initializable() {
}
/// @notice Initializes this contract with reference to other contracts.
/// @param _fills The Fills contract.
/// @param _escrow The Escrow contract.
/// @param _tokenTransferProxy The TokenTransferProxy contract.
function initialize(
IFills _fills,
IEscrow _escrow,
ITokenTransferProxy _tokenTransferProxy,
IOutcomeReporter _outcomeReporter
)
external
notInitialized
onlySuperAdmin(msg.sender)
{
}
/// @notice Throws if the caller is not a super admin.
/// @param operator The caller of the method.
modifier onlySuperAdmin(address operator) {
}
/// @notice Intermediate function to fill a single order
/// @param order The order to be filled.
/// @param takerAmount The amount to fill the order by.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable.
function _fillSingleOrder(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for each maker and taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable in the case of a meta fill.
function updateOrderState(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for the maker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
function settleOrderForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
internal
{
}
/// @notice Intermediate function that settles the order for the taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker for this order.
function settleOrderForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
internal
{
}
/// @notice Checks that the order is valid given the taker and taker amount.
/// @param order The order to check.
/// @param takerAmount The amount the order will be filled by.
/// @param taker The taker who would fill this order.
/// @param makerSig The maker signature for this order.
function assertOrderValid(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes memory makerSig
)
internal
view
{
require(
takerAmount > 0,
"TAKER_AMOUNT_NOT_POSITIVE"
);
order.assertValidAsTaker(taker, makerSig);
require(<FILL_ME>)
require(
fills.orderHasSpace(order, takerAmount),
"INSUFFICIENT_SPACE"
);
}
/// @notice Transfers a token using TokenTransferProxy transferFrom function.
/// @param token Address of token to transferFrom.
/// @param from Address transfering token.
/// @param to Address receiving token.
/// @param value Amount of token to transfer.
/// @return Success of token transfer.
function transferViaProxy(
address token,
address from,
address to,
uint256 value
)
internal
returns (bool)
{
}
/// @notice Updates the taker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
/// @param taker The taker of this order.
function updateTakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
/// @notice Updates the maker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
function updateMakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the maker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
function settleTransfersForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the taker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
/// @param taker The taker of this order.
function settleTransfersForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
}
| outcomeReporter.getReportTime(order.marketHash)==0,"MARKET_NOT_TRADEABLE" | 326,561 | outcomeReporter.getReportTime(order.marketHash)==0 |
"INSUFFICIENT_SPACE" | pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
import "../../libraries/LibOrder.sol";
import "../../libraries/LibOrderAmounts.sol";
import "../../libraries/LibOutcome.sol";
import "../../interfaces/IEscrow.sol";
import "../../interfaces/IOutcomeReporter.sol";
import "../../interfaces/permissions/ISuperAdminRole.sol";
import "../../interfaces/trading/ITokenTransferProxy.sol";
import "../../interfaces/trading/IFills.sol";
import "../Initializable.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
/// @title BaseFillOrder
/// @author Julian Wilson <[email protected]>
/// @notice Manages the core internal functionality to fill orders and check their validity.
contract BaseFillOrder is Initializable {
using LibOrder for LibOrder.Order;
using SafeMath for uint256;
ITokenTransferProxy internal proxy;
IFills internal fills;
IEscrow internal escrow;
ISuperAdminRole internal superAdminRole;
IOutcomeReporter internal outcomeReporter;
event OrderFill(
address indexed maker,
bytes32 indexed marketHash,
address indexed taker,
uint256 newFilledAmount,
bytes32 orderHash,
bytes32 fillHash,
LibOrder.Order order,
LibOrderAmounts.OrderAmounts orderAmounts
);
constructor(ISuperAdminRole _superAdminRole) public Initializable() {
}
/// @notice Initializes this contract with reference to other contracts.
/// @param _fills The Fills contract.
/// @param _escrow The Escrow contract.
/// @param _tokenTransferProxy The TokenTransferProxy contract.
function initialize(
IFills _fills,
IEscrow _escrow,
ITokenTransferProxy _tokenTransferProxy,
IOutcomeReporter _outcomeReporter
)
external
notInitialized
onlySuperAdmin(msg.sender)
{
}
/// @notice Throws if the caller is not a super admin.
/// @param operator The caller of the method.
modifier onlySuperAdmin(address operator) {
}
/// @notice Intermediate function to fill a single order
/// @param order The order to be filled.
/// @param takerAmount The amount to fill the order by.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable.
function _fillSingleOrder(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for each maker and taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable in the case of a meta fill.
function updateOrderState(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for the maker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
function settleOrderForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
internal
{
}
/// @notice Intermediate function that settles the order for the taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker for this order.
function settleOrderForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
internal
{
}
/// @notice Checks that the order is valid given the taker and taker amount.
/// @param order The order to check.
/// @param takerAmount The amount the order will be filled by.
/// @param taker The taker who would fill this order.
/// @param makerSig The maker signature for this order.
function assertOrderValid(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes memory makerSig
)
internal
view
{
require(
takerAmount > 0,
"TAKER_AMOUNT_NOT_POSITIVE"
);
order.assertValidAsTaker(taker, makerSig);
require(
outcomeReporter.getReportTime(order.marketHash) == 0,
"MARKET_NOT_TRADEABLE"
);
require(<FILL_ME>)
}
/// @notice Transfers a token using TokenTransferProxy transferFrom function.
/// @param token Address of token to transferFrom.
/// @param from Address transfering token.
/// @param to Address receiving token.
/// @param value Amount of token to transfer.
/// @return Success of token transfer.
function transferViaProxy(
address token,
address from,
address to,
uint256 value
)
internal
returns (bool)
{
}
/// @notice Updates the taker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
/// @param taker The taker of this order.
function updateTakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
/// @notice Updates the maker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
function updateMakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the maker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
function settleTransfersForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the taker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
/// @param taker The taker of this order.
function settleTransfersForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
}
| fills.orderHasSpace(order,takerAmount),"INSUFFICIENT_SPACE" | 326,561 | fills.orderHasSpace(order,takerAmount) |
"CANNOT_TRANSFER_TAKER_ESCROW" | pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
import "../../libraries/LibOrder.sol";
import "../../libraries/LibOrderAmounts.sol";
import "../../libraries/LibOutcome.sol";
import "../../interfaces/IEscrow.sol";
import "../../interfaces/IOutcomeReporter.sol";
import "../../interfaces/permissions/ISuperAdminRole.sol";
import "../../interfaces/trading/ITokenTransferProxy.sol";
import "../../interfaces/trading/IFills.sol";
import "../Initializable.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
/// @title BaseFillOrder
/// @author Julian Wilson <[email protected]>
/// @notice Manages the core internal functionality to fill orders and check their validity.
contract BaseFillOrder is Initializable {
using LibOrder for LibOrder.Order;
using SafeMath for uint256;
ITokenTransferProxy internal proxy;
IFills internal fills;
IEscrow internal escrow;
ISuperAdminRole internal superAdminRole;
IOutcomeReporter internal outcomeReporter;
event OrderFill(
address indexed maker,
bytes32 indexed marketHash,
address indexed taker,
uint256 newFilledAmount,
bytes32 orderHash,
bytes32 fillHash,
LibOrder.Order order,
LibOrderAmounts.OrderAmounts orderAmounts
);
constructor(ISuperAdminRole _superAdminRole) public Initializable() {
}
/// @notice Initializes this contract with reference to other contracts.
/// @param _fills The Fills contract.
/// @param _escrow The Escrow contract.
/// @param _tokenTransferProxy The TokenTransferProxy contract.
function initialize(
IFills _fills,
IEscrow _escrow,
ITokenTransferProxy _tokenTransferProxy,
IOutcomeReporter _outcomeReporter
)
external
notInitialized
onlySuperAdmin(msg.sender)
{
}
/// @notice Throws if the caller is not a super admin.
/// @param operator The caller of the method.
modifier onlySuperAdmin(address operator) {
}
/// @notice Intermediate function to fill a single order
/// @param order The order to be filled.
/// @param takerAmount The amount to fill the order by.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable.
function _fillSingleOrder(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for each maker and taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable in the case of a meta fill.
function updateOrderState(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for the maker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
function settleOrderForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
internal
{
}
/// @notice Intermediate function that settles the order for the taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker for this order.
function settleOrderForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
internal
{
}
/// @notice Checks that the order is valid given the taker and taker amount.
/// @param order The order to check.
/// @param takerAmount The amount the order will be filled by.
/// @param taker The taker who would fill this order.
/// @param makerSig The maker signature for this order.
function assertOrderValid(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes memory makerSig
)
internal
view
{
}
/// @notice Transfers a token using TokenTransferProxy transferFrom function.
/// @param token Address of token to transferFrom.
/// @param from Address transfering token.
/// @param to Address receiving token.
/// @param value Amount of token to transfer.
/// @return Success of token transfer.
function transferViaProxy(
address token,
address from,
address to,
uint256 value
)
internal
returns (bool)
{
}
/// @notice Updates the taker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
/// @param taker The taker of this order.
function updateTakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
/// @notice Updates the maker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
function updateMakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the maker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
function settleTransfersForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
require(<FILL_ME>)
}
/// @notice Settles base tokens (not buyer and seller tokens) for the taker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
/// @param taker The taker of this order.
function settleTransfersForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
}
| transferViaProxy(order.baseToken,order.maker,address(escrow),orderAmounts.takerAmount),"CANNOT_TRANSFER_TAKER_ESCROW" | 326,561 | transferViaProxy(order.baseToken,order.maker,address(escrow),orderAmounts.takerAmount) |
"CANNOT_TRANSFER_TAKER_ESCROW" | pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
import "../../libraries/LibOrder.sol";
import "../../libraries/LibOrderAmounts.sol";
import "../../libraries/LibOutcome.sol";
import "../../interfaces/IEscrow.sol";
import "../../interfaces/IOutcomeReporter.sol";
import "../../interfaces/permissions/ISuperAdminRole.sol";
import "../../interfaces/trading/ITokenTransferProxy.sol";
import "../../interfaces/trading/IFills.sol";
import "../Initializable.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
/// @title BaseFillOrder
/// @author Julian Wilson <[email protected]>
/// @notice Manages the core internal functionality to fill orders and check their validity.
contract BaseFillOrder is Initializable {
using LibOrder for LibOrder.Order;
using SafeMath for uint256;
ITokenTransferProxy internal proxy;
IFills internal fills;
IEscrow internal escrow;
ISuperAdminRole internal superAdminRole;
IOutcomeReporter internal outcomeReporter;
event OrderFill(
address indexed maker,
bytes32 indexed marketHash,
address indexed taker,
uint256 newFilledAmount,
bytes32 orderHash,
bytes32 fillHash,
LibOrder.Order order,
LibOrderAmounts.OrderAmounts orderAmounts
);
constructor(ISuperAdminRole _superAdminRole) public Initializable() {
}
/// @notice Initializes this contract with reference to other contracts.
/// @param _fills The Fills contract.
/// @param _escrow The Escrow contract.
/// @param _tokenTransferProxy The TokenTransferProxy contract.
function initialize(
IFills _fills,
IEscrow _escrow,
ITokenTransferProxy _tokenTransferProxy,
IOutcomeReporter _outcomeReporter
)
external
notInitialized
onlySuperAdmin(msg.sender)
{
}
/// @notice Throws if the caller is not a super admin.
/// @param operator The caller of the method.
modifier onlySuperAdmin(address operator) {
}
/// @notice Intermediate function to fill a single order
/// @param order The order to be filled.
/// @param takerAmount The amount to fill the order by.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable.
function _fillSingleOrder(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for each maker and taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker of this order.
/// @param fillHash The fill hash, if applicable in the case of a meta fill.
function updateOrderState(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker,
bytes32 fillHash
)
internal
{
}
/// @notice Intermediate function that settles the order for the maker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
function settleOrderForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
internal
{
}
/// @notice Intermediate function that settles the order for the taker.
/// @param order The order that is being filled.
/// @param orderAmounts The resulting order amounts given the taker amount.
/// @param taker The taker for this order.
function settleOrderForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
internal
{
}
/// @notice Checks that the order is valid given the taker and taker amount.
/// @param order The order to check.
/// @param takerAmount The amount the order will be filled by.
/// @param taker The taker who would fill this order.
/// @param makerSig The maker signature for this order.
function assertOrderValid(
LibOrder.Order memory order,
uint256 takerAmount,
address taker,
bytes memory makerSig
)
internal
view
{
}
/// @notice Transfers a token using TokenTransferProxy transferFrom function.
/// @param token Address of token to transferFrom.
/// @param from Address transfering token.
/// @param to Address receiving token.
/// @param value Amount of token to transfer.
/// @return Success of token transfer.
function transferViaProxy(
address token,
address from,
address to,
uint256 value
)
internal
returns (bool)
{
}
/// @notice Updates the taker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
/// @param taker The taker of this order.
function updateTakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
}
/// @notice Updates the maker's eligibility for if they win the bet or tie.
/// @param order The order that is being filled.
/// @param orderAmounts The order amounts for this order.
function updateMakerEligibility(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the maker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
function settleTransfersForMaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts
)
private
{
}
/// @notice Settles base tokens (not buyer and seller tokens) for the taker.
/// @param order The order to settle.
/// @param orderAmounts The resulting order amounts given the taker amount and parameters.
/// @param taker The taker of this order.
function settleTransfersForTaker(
LibOrder.Order memory order,
LibOrderAmounts.OrderAmounts memory orderAmounts,
address taker
)
private
{
require(<FILL_ME>)
}
}
| transferViaProxy(order.baseToken,taker,address(escrow),orderAmounts.takerEscrow),"CANNOT_TRANSFER_TAKER_ESCROW" | 326,561 | transferViaProxy(order.baseToken,taker,address(escrow),orderAmounts.takerEscrow) |
"IdolToken: mint request from unauthorized address" | // contracts/IdolToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The defaut value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overloaded;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
contract IdolToken is ERC20 {
uint256 public immutable deployTime;
address public immutable minter;
address public immutable owner;
mapping(address => uint256[]) private _mintTimeMap;
constructor(address _minter) ERC20("IDOL", "IDOL") {
}
function mintDaysLeft() public view returns (uint256) {
}
/**
* @dev one address can only mint 10 times per week
*/
function _canMintTo(address _address) private view returns (bool) {
}
function mintForCreateNFT(address _to, uint256 _amountInWei) external {
require(<FILL_ME>)
if (mintDaysLeft() > 0 && _canMintTo(_to)) {
uint256 _mintAmount = mintDaysLeft() * _amountInWei / 1000;
_mint(_to, _mintAmount);
//mint additional 10% to dapp creator
if (_to != owner) {
_mint(owner, _mintAmount / 10);
}
_mintTimeMap[_to].push(block.timestamp);
}
}
function mintForBuyNFT(address _to, uint256 _priceInWei) external {
}
function burn(uint256 amount) external {
}
}
| _msgSender()==minter,"IdolToken: mint request from unauthorized address" | 326,582 | _msgSender()==minter |
'Sent amount does not match outstanding' | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
// ----------------------------------------------------------------------------
// 'FBond' token contract
//
// Deployed to : 0x22d9e4f1e44b4f3581139affc6559a5e8831825e
// Symbol : FBond
// Name : FBond Token
// Total supply: 100
// Decimals : 18
//
// author: ffyring
// version: 20210504_1100
// ----------------------------------------------------------
library IterableMapping {
// Iterable mapping from address to uint;
struct Map {
address[] keys;
mapping(address => uint) values;
mapping(address => uint) indexOf;
mapping(address => bool) inserted;
}
function get(Map storage map, address key) public view returns (uint) {
}
function getOrDefault(Map storage map, address key, uint d) public view returns (uint) {
}
function getKeyAtIndex(Map storage map, uint index) public view returns (address) {
}
function size(Map storage map) public view returns (uint) {
}
function set(Map storage map, address key, uint val) public {
}
function remove(Map storage map, address key) public {
}
}
//----------------------------------------------------------------------------
// Safe maths
//----------------------------------------------------------------------------
contract SafeMath
{
function safeAdd(uint a, uint b) internal pure returns (uint c) {
}
function safeSub(uint a, uint b) internal pure returns (uint c) {
}
function safeMul(uint a, uint b) internal pure returns (uint c) {
}
function safeDiv(uint a, uint b) internal pure returns (uint c) {
}
}
//----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
//----------------------------------------------------------------------------
interface ERC20Interface
{
function totalSupply() external returns (uint);
function balanceOf(address tokenOwner) external returns (uint balance);
function allowance(address tokenOwner, address spender) external returns (uint remaining);
function transfer(address payable to, uint tokens) external returns (bool success);
function approve(address payable spender, uint tokens) external returns (bool success);
function transferFrom(address payable from, address payable to, uint tokens) external returns (bool success);
event Transfer(address payable indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens); }
// ----------------------------------------------------------------------------
// Contract function to receive approval and execute function in one call // // Borrowed from MiniMeToken
// ----------------------------------------------------------------------------
interface ApproveAndCallFallBack
{
function receiveApproval(address payable from, uint256 tokens, address token, bytes memory data) external; }
//----------------------------------------------------------------------------
// Owned contract
//----------------------------------------------------------------------------
contract Owned
{
address payable public owner;
address payable public newOwner;
event OwnershipTransferred(address payable indexed _from, address payable indexed _to);
constructor() payable
{
}
modifier onlyOwner
{
}
function transferOwnership(address payable _newOwner) public onlyOwner
{
}
function acceptOwnership() public
{
}
}
//----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers.
//
// The contract holds all issued tokens and gives proceeds to issuer when someone buys a // contract. In v2 the contract will give tokens to issuer as proof of the lending
// ----------------------------------------------------------------------------
contract FBondToken is ERC20Interface, Owned, SafeMath {
/*
The bond has a _totalSupply which is the issued amount. The issuer, who creates the bond
could perhaps be short it. Have to check a bit how to make it work
*/
using IterableMapping for IterableMapping.Map;
string public symbol;
string public name;
uint8 public decimals;
uint public issueDate;
uint public maturityDate;
address public issuer;
address public administrator;
// How many bonds per eth (other way around than usual nomenclature)
uint16 constant denomination = 1000;
// We issue 100 bonds, nominal value 1/denomination (1 finney, approx 23 kr) per bond
uint16 constant issuedAmount = 100;
uint16 private _totalSupply;
uint constant weiMultiplier = 1e18/denomination;
uint constant weiRateMultiplier = (weiMultiplier/100)*120; //20% interest
IterableMapping.Map private balances;
mapping(address => mapping(address => uint)) private allowed;
event Print(string msg, uint v);
//------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------
constructor() payable
{
}
//------------------------------------------------------------------------
// Total supply
//------------------------------------------------------------------------
function totalSupply() public view override returns (uint)
{
}
function noOfOwners() public view returns (uint)
{
}
//------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
//-----------------------------------------------------------------------
function balanceOf(address tokenOwner) public view override returns (uint balance)
{
}
//------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
//------------------------------------------------------------------------
function transfer(address payable to, uint tokens) public override returns (bool success)
{
}
//------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
//https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double-spend attack
// as this should be implemented in user interfaces
//------------------------------------------------------------------------
function approve(address payable spender, uint tokens) public override returns (bool success)
{
}
//------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
//------------------------------------------------------------------------
function transferFrom(address payable from, address payable to, uint tokens) public override returns (bool success)
{
}
//------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
//------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view override returns (uint remaining)
{
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------------------
function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success)
{
}
function transferTokens(address payable fromAddress, address payable toAddress, uint tokens) private returns (bool success)
{
}
// ------------------------------------------------------------------------
// Issuer can call bond at or after maturityDate.
// This is a three-step process: first deposit correct funds into contract and then repay holders. Optionally repay
// every other fund in contract
//
function callBondTransferFunds(uint repayAmnt) public payable returns (bool success)
{
/*
This is called by administrator to repay full amount. To make sure
we accidentally don't send wrong funds we must send exactly outstanding amount.
*/
// require(block.timestamp >= maturityDate, 'Cannot call before maturity.')
require(msg.sender == administrator, 'Only administrator can call bond');
require(msg.value == repayAmnt * 1e15, 'Did you mean to send this amount? Argument is in Finney');
require(<FILL_ME>)
require(msg.value <= msg.sender.balance, 'You have not enough funds to repay!'); //Not necessary but nice warning.
return true;
}
function callBondAndRepay() public payable returns (bool success)
{
}
function deposit(uint depositAmnt) public payable returns(bool success)
{
}
function withdraw_all() public payable returns (bool success)
{
}
function withdraw(uint f) public payable returns (bool success)
{
}
// ------------------------------------------------------------------------
// 1,000 FBond Tokens per 1 ETH
// ------------------------------------------------------------------------
fallback() external payable
{
}
receive() external payable
{
}
// ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success)
{
}
}
| msg.value==(issuedAmount-_totalSupply)*weiRateMultiplier,'Sent amount does not match outstanding' | 326,623 | msg.value==(issuedAmount-_totalSupply)*weiRateMultiplier |
'Contract has insufficient funds' | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
// ----------------------------------------------------------------------------
// 'FBond' token contract
//
// Deployed to : 0x22d9e4f1e44b4f3581139affc6559a5e8831825e
// Symbol : FBond
// Name : FBond Token
// Total supply: 100
// Decimals : 18
//
// author: ffyring
// version: 20210504_1100
// ----------------------------------------------------------
library IterableMapping {
// Iterable mapping from address to uint;
struct Map {
address[] keys;
mapping(address => uint) values;
mapping(address => uint) indexOf;
mapping(address => bool) inserted;
}
function get(Map storage map, address key) public view returns (uint) {
}
function getOrDefault(Map storage map, address key, uint d) public view returns (uint) {
}
function getKeyAtIndex(Map storage map, uint index) public view returns (address) {
}
function size(Map storage map) public view returns (uint) {
}
function set(Map storage map, address key, uint val) public {
}
function remove(Map storage map, address key) public {
}
}
//----------------------------------------------------------------------------
// Safe maths
//----------------------------------------------------------------------------
contract SafeMath
{
function safeAdd(uint a, uint b) internal pure returns (uint c) {
}
function safeSub(uint a, uint b) internal pure returns (uint c) {
}
function safeMul(uint a, uint b) internal pure returns (uint c) {
}
function safeDiv(uint a, uint b) internal pure returns (uint c) {
}
}
//----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
//----------------------------------------------------------------------------
interface ERC20Interface
{
function totalSupply() external returns (uint);
function balanceOf(address tokenOwner) external returns (uint balance);
function allowance(address tokenOwner, address spender) external returns (uint remaining);
function transfer(address payable to, uint tokens) external returns (bool success);
function approve(address payable spender, uint tokens) external returns (bool success);
function transferFrom(address payable from, address payable to, uint tokens) external returns (bool success);
event Transfer(address payable indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens); }
// ----------------------------------------------------------------------------
// Contract function to receive approval and execute function in one call // // Borrowed from MiniMeToken
// ----------------------------------------------------------------------------
interface ApproveAndCallFallBack
{
function receiveApproval(address payable from, uint256 tokens, address token, bytes memory data) external; }
//----------------------------------------------------------------------------
// Owned contract
//----------------------------------------------------------------------------
contract Owned
{
address payable public owner;
address payable public newOwner;
event OwnershipTransferred(address payable indexed _from, address payable indexed _to);
constructor() payable
{
}
modifier onlyOwner
{
}
function transferOwnership(address payable _newOwner) public onlyOwner
{
}
function acceptOwnership() public
{
}
}
//----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers.
//
// The contract holds all issued tokens and gives proceeds to issuer when someone buys a // contract. In v2 the contract will give tokens to issuer as proof of the lending
// ----------------------------------------------------------------------------
contract FBondToken is ERC20Interface, Owned, SafeMath {
/*
The bond has a _totalSupply which is the issued amount. The issuer, who creates the bond
could perhaps be short it. Have to check a bit how to make it work
*/
using IterableMapping for IterableMapping.Map;
string public symbol;
string public name;
uint8 public decimals;
uint public issueDate;
uint public maturityDate;
address public issuer;
address public administrator;
// How many bonds per eth (other way around than usual nomenclature)
uint16 constant denomination = 1000;
// We issue 100 bonds, nominal value 1/denomination (1 finney, approx 23 kr) per bond
uint16 constant issuedAmount = 100;
uint16 private _totalSupply;
uint constant weiMultiplier = 1e18/denomination;
uint constant weiRateMultiplier = (weiMultiplier/100)*120; //20% interest
IterableMapping.Map private balances;
mapping(address => mapping(address => uint)) private allowed;
event Print(string msg, uint v);
//------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------
constructor() payable
{
}
//------------------------------------------------------------------------
// Total supply
//------------------------------------------------------------------------
function totalSupply() public view override returns (uint)
{
}
function noOfOwners() public view returns (uint)
{
}
//------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
//-----------------------------------------------------------------------
function balanceOf(address tokenOwner) public view override returns (uint balance)
{
}
//------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
//------------------------------------------------------------------------
function transfer(address payable to, uint tokens) public override returns (bool success)
{
}
//------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
//https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double-spend attack
// as this should be implemented in user interfaces
//------------------------------------------------------------------------
function approve(address payable spender, uint tokens) public override returns (bool success)
{
}
//------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
//------------------------------------------------------------------------
function transferFrom(address payable from, address payable to, uint tokens) public override returns (bool success)
{
}
//------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
//------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view override returns (uint remaining)
{
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------------------
function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success)
{
}
function transferTokens(address payable fromAddress, address payable toAddress, uint tokens) private returns (bool success)
{
}
// ------------------------------------------------------------------------
// Issuer can call bond at or after maturityDate.
// This is a three-step process: first deposit correct funds into contract and then repay holders. Optionally repay
// every other fund in contract
//
function callBondTransferFunds(uint repayAmnt) public payable returns (bool success)
{
}
function callBondAndRepay() public payable returns (bool success)
{
/*
This is called by administrator to repay full amount. To make sure
we accidentally don't send wrong funds we must send exactly outstanding amount.
*/
// require(block.timestamp >= maturityDate, 'Cannot call before maturity.')
require(msg.sender == administrator, 'Only administrator can call bond');
require(<FILL_ME>)
for(uint i=0 ; i<balances.size(); i++) {
// Transfer back the bonds to the contract
address holder = balances.getKeyAtIndex(i);
if(holder != address(this))
{
uint amnt = balances.get(holder);
// Transfer back the bonds to the issuer
transferTokens(payable(holder), payable(issuer), amnt);
//Repay with interest
payable(holder).transfer(amnt * weiRateMultiplier);
}
}
return true;
}
function deposit(uint depositAmnt) public payable returns(bool success)
{
}
function withdraw_all() public payable returns (bool success)
{
}
function withdraw(uint f) public payable returns (bool success)
{
}
// ------------------------------------------------------------------------
// 1,000 FBond Tokens per 1 ETH
// ------------------------------------------------------------------------
fallback() external payable
{
}
receive() external payable
{
}
// ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success)
{
}
}
| issuer.balance>=(issuedAmount-_totalSupply)*weiRateMultiplier,'Contract has insufficient funds' | 326,623 | issuer.balance>=(issuedAmount-_totalSupply)*weiRateMultiplier |
"CALLER_IS_NOT_STAKER" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity 0.8.11;
interface ICryptoBearWatchClub {
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
}
pragma solidity 0.8.11;
contract Arkouda is ERC20, Ownable, IERC721Receiver {
ICryptoBearWatchClub public CryptoBearWatchClub;
enum TX_TYPE {
UNSTAKE,
CLAIM
}
bool public stakingLive;
uint256 public constant tier1Reward = 30 ether;
uint256 public constant tier2Reward = 9 ether;
uint256 public constant tier3Reward = 3 ether;
// Stores tier of a CBWC NFT.
// 0 represents tier 3
mapping(uint256 => uint256) public tokenIdTier;
// Stores token id staker address
mapping(uint256 => address) public tokenOwner;
// To store when was the last time user staked or claimed the reward of the token Id
mapping(address => mapping(uint256 => uint256)) public lastUpdate;
// To store addresses that can burn their Arkouda token
mapping(address => bool) public allowedAddresses;
event Staked(address indexed staker, uint256[] tokenIds, uint256 stakeTime);
event Unstaked(address indexed unstaker, uint256[] tokenIds);
event RewardsPaid(
address indexed claimer,
uint256[] tokenIds,
uint256 _tier1Rewards,
uint256 _tier2Rewards,
uint256 _tier3Rewards
);
constructor(ICryptoBearWatchClub _cryptoBearWatchClub)
ERC20("Arkouda", "$ark")
{
}
modifier isTokenOwner(uint256[] memory _tokenIds) {
for (uint256 i = 0; i < _tokenIds.length; i++) {
require(<FILL_ME>)
}
_;
}
modifier isStakingLive() {
}
modifier checkInputLength(uint256[] memory _tokenIds) {
}
// To start staking/ reward generation
function startStaking() external onlyOwner {
}
// To grant/revoke burn access
function setAllowedAddresses(address _address, bool _access)
external
onlyOwner
{
}
// Sets the tier of CBWC NFTs
function setCBWCNFTTier(uint256[] calldata _tokenIds, uint256 _tier)
external
onlyOwner
{
}
function onERC721Received(
address,
address,
uint256,
bytes memory
) external pure override returns (bytes4) {
}
function burn(uint256 amount) external {
}
// Stakes CBWC NFTs
function stakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
checkInputLength(_tokenIds)
{
}
// Unstakes CBWC NFTs
function unStakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
// To claim reward for staking CBWC NFTs
function claimRewards(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
function claimOrUnstake(uint256[] memory _tokenIds, TX_TYPE txType)
private
{
}
// Returns total pending rewards of all input token ids
function getTotalClaimable(uint256[] memory _tokenIds)
external
view
returns (uint256 totalRewards)
{
}
// Returns pending accumulated reward of the token id
function getPendingReward(uint256 _tokenId)
public
view
returns (uint256 reward)
{
}
// Returns pending accumulated reward of the token id along with token id tier
function getPendingRewardAndTier(uint256 _tokenId)
private
view
returns (uint256 rewards, uint256 tier)
{
}
}
| tokenOwner[_tokenIds[i]]==_msgSender(),"CALLER_IS_NOT_STAKER" | 326,724 | tokenOwner[_tokenIds[i]]==_msgSender() |
"STAKING_IS_ALREADY_LIVE" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity 0.8.11;
interface ICryptoBearWatchClub {
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
}
pragma solidity 0.8.11;
contract Arkouda is ERC20, Ownable, IERC721Receiver {
ICryptoBearWatchClub public CryptoBearWatchClub;
enum TX_TYPE {
UNSTAKE,
CLAIM
}
bool public stakingLive;
uint256 public constant tier1Reward = 30 ether;
uint256 public constant tier2Reward = 9 ether;
uint256 public constant tier3Reward = 3 ether;
// Stores tier of a CBWC NFT.
// 0 represents tier 3
mapping(uint256 => uint256) public tokenIdTier;
// Stores token id staker address
mapping(uint256 => address) public tokenOwner;
// To store when was the last time user staked or claimed the reward of the token Id
mapping(address => mapping(uint256 => uint256)) public lastUpdate;
// To store addresses that can burn their Arkouda token
mapping(address => bool) public allowedAddresses;
event Staked(address indexed staker, uint256[] tokenIds, uint256 stakeTime);
event Unstaked(address indexed unstaker, uint256[] tokenIds);
event RewardsPaid(
address indexed claimer,
uint256[] tokenIds,
uint256 _tier1Rewards,
uint256 _tier2Rewards,
uint256 _tier3Rewards
);
constructor(ICryptoBearWatchClub _cryptoBearWatchClub)
ERC20("Arkouda", "$ark")
{
}
modifier isTokenOwner(uint256[] memory _tokenIds) {
}
modifier isStakingLive() {
}
modifier checkInputLength(uint256[] memory _tokenIds) {
}
// To start staking/ reward generation
function startStaking() external onlyOwner {
require(<FILL_ME>)
stakingLive = true;
}
// To grant/revoke burn access
function setAllowedAddresses(address _address, bool _access)
external
onlyOwner
{
}
// Sets the tier of CBWC NFTs
function setCBWCNFTTier(uint256[] calldata _tokenIds, uint256 _tier)
external
onlyOwner
{
}
function onERC721Received(
address,
address,
uint256,
bytes memory
) external pure override returns (bytes4) {
}
function burn(uint256 amount) external {
}
// Stakes CBWC NFTs
function stakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
checkInputLength(_tokenIds)
{
}
// Unstakes CBWC NFTs
function unStakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
// To claim reward for staking CBWC NFTs
function claimRewards(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
function claimOrUnstake(uint256[] memory _tokenIds, TX_TYPE txType)
private
{
}
// Returns total pending rewards of all input token ids
function getTotalClaimable(uint256[] memory _tokenIds)
external
view
returns (uint256 totalRewards)
{
}
// Returns pending accumulated reward of the token id
function getPendingReward(uint256 _tokenId)
public
view
returns (uint256 reward)
{
}
// Returns pending accumulated reward of the token id along with token id tier
function getPendingRewardAndTier(uint256 _tokenId)
private
view
returns (uint256 rewards, uint256 tier)
{
}
}
| !stakingLive,"STAKING_IS_ALREADY_LIVE" | 326,724 | !stakingLive |
"TIER_ALREADY_SET" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity 0.8.11;
interface ICryptoBearWatchClub {
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
}
pragma solidity 0.8.11;
contract Arkouda is ERC20, Ownable, IERC721Receiver {
ICryptoBearWatchClub public CryptoBearWatchClub;
enum TX_TYPE {
UNSTAKE,
CLAIM
}
bool public stakingLive;
uint256 public constant tier1Reward = 30 ether;
uint256 public constant tier2Reward = 9 ether;
uint256 public constant tier3Reward = 3 ether;
// Stores tier of a CBWC NFT.
// 0 represents tier 3
mapping(uint256 => uint256) public tokenIdTier;
// Stores token id staker address
mapping(uint256 => address) public tokenOwner;
// To store when was the last time user staked or claimed the reward of the token Id
mapping(address => mapping(uint256 => uint256)) public lastUpdate;
// To store addresses that can burn their Arkouda token
mapping(address => bool) public allowedAddresses;
event Staked(address indexed staker, uint256[] tokenIds, uint256 stakeTime);
event Unstaked(address indexed unstaker, uint256[] tokenIds);
event RewardsPaid(
address indexed claimer,
uint256[] tokenIds,
uint256 _tier1Rewards,
uint256 _tier2Rewards,
uint256 _tier3Rewards
);
constructor(ICryptoBearWatchClub _cryptoBearWatchClub)
ERC20("Arkouda", "$ark")
{
}
modifier isTokenOwner(uint256[] memory _tokenIds) {
}
modifier isStakingLive() {
}
modifier checkInputLength(uint256[] memory _tokenIds) {
}
// To start staking/ reward generation
function startStaking() external onlyOwner {
}
// To grant/revoke burn access
function setAllowedAddresses(address _address, bool _access)
external
onlyOwner
{
}
// Sets the tier of CBWC NFTs
function setCBWCNFTTier(uint256[] calldata _tokenIds, uint256 _tier)
external
onlyOwner
{
require(_tier == 1 || _tier == 2, "INVALID_TIER");
for (uint256 i = 0; i < _tokenIds.length; i++) {
require(<FILL_ME>)
tokenIdTier[_tokenIds[i]] = _tier;
}
}
function onERC721Received(
address,
address,
uint256,
bytes memory
) external pure override returns (bytes4) {
}
function burn(uint256 amount) external {
}
// Stakes CBWC NFTs
function stakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
checkInputLength(_tokenIds)
{
}
// Unstakes CBWC NFTs
function unStakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
// To claim reward for staking CBWC NFTs
function claimRewards(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
function claimOrUnstake(uint256[] memory _tokenIds, TX_TYPE txType)
private
{
}
// Returns total pending rewards of all input token ids
function getTotalClaimable(uint256[] memory _tokenIds)
external
view
returns (uint256 totalRewards)
{
}
// Returns pending accumulated reward of the token id
function getPendingReward(uint256 _tokenId)
public
view
returns (uint256 reward)
{
}
// Returns pending accumulated reward of the token id along with token id tier
function getPendingRewardAndTier(uint256 _tokenId)
private
view
returns (uint256 rewards, uint256 tier)
{
}
}
| tokenIdTier[_tokenIds[i]]==0,"TIER_ALREADY_SET" | 326,724 | tokenIdTier[_tokenIds[i]]==0 |
"ADDRESS_DOES_NOT_HAVE_PERMISSION_TO_BURN" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity 0.8.11;
interface ICryptoBearWatchClub {
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
}
pragma solidity 0.8.11;
contract Arkouda is ERC20, Ownable, IERC721Receiver {
ICryptoBearWatchClub public CryptoBearWatchClub;
enum TX_TYPE {
UNSTAKE,
CLAIM
}
bool public stakingLive;
uint256 public constant tier1Reward = 30 ether;
uint256 public constant tier2Reward = 9 ether;
uint256 public constant tier3Reward = 3 ether;
// Stores tier of a CBWC NFT.
// 0 represents tier 3
mapping(uint256 => uint256) public tokenIdTier;
// Stores token id staker address
mapping(uint256 => address) public tokenOwner;
// To store when was the last time user staked or claimed the reward of the token Id
mapping(address => mapping(uint256 => uint256)) public lastUpdate;
// To store addresses that can burn their Arkouda token
mapping(address => bool) public allowedAddresses;
event Staked(address indexed staker, uint256[] tokenIds, uint256 stakeTime);
event Unstaked(address indexed unstaker, uint256[] tokenIds);
event RewardsPaid(
address indexed claimer,
uint256[] tokenIds,
uint256 _tier1Rewards,
uint256 _tier2Rewards,
uint256 _tier3Rewards
);
constructor(ICryptoBearWatchClub _cryptoBearWatchClub)
ERC20("Arkouda", "$ark")
{
}
modifier isTokenOwner(uint256[] memory _tokenIds) {
}
modifier isStakingLive() {
}
modifier checkInputLength(uint256[] memory _tokenIds) {
}
// To start staking/ reward generation
function startStaking() external onlyOwner {
}
// To grant/revoke burn access
function setAllowedAddresses(address _address, bool _access)
external
onlyOwner
{
}
// Sets the tier of CBWC NFTs
function setCBWCNFTTier(uint256[] calldata _tokenIds, uint256 _tier)
external
onlyOwner
{
}
function onERC721Received(
address,
address,
uint256,
bytes memory
) external pure override returns (bytes4) {
}
function burn(uint256 amount) external {
require(<FILL_ME>)
_burn(_msgSender(), amount);
}
// Stakes CBWC NFTs
function stakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
checkInputLength(_tokenIds)
{
}
// Unstakes CBWC NFTs
function unStakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
// To claim reward for staking CBWC NFTs
function claimRewards(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
function claimOrUnstake(uint256[] memory _tokenIds, TX_TYPE txType)
private
{
}
// Returns total pending rewards of all input token ids
function getTotalClaimable(uint256[] memory _tokenIds)
external
view
returns (uint256 totalRewards)
{
}
// Returns pending accumulated reward of the token id
function getPendingReward(uint256 _tokenId)
public
view
returns (uint256 reward)
{
}
// Returns pending accumulated reward of the token id along with token id tier
function getPendingRewardAndTier(uint256 _tokenId)
private
view
returns (uint256 rewards, uint256 tier)
{
}
}
| allowedAddresses[_msgSender()],"ADDRESS_DOES_NOT_HAVE_PERMISSION_TO_BURN" | 326,724 | allowedAddresses[_msgSender()] |
"CBWC_NFT_IS_NOT_YOURS" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity 0.8.11;
interface ICryptoBearWatchClub {
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
}
pragma solidity 0.8.11;
contract Arkouda is ERC20, Ownable, IERC721Receiver {
ICryptoBearWatchClub public CryptoBearWatchClub;
enum TX_TYPE {
UNSTAKE,
CLAIM
}
bool public stakingLive;
uint256 public constant tier1Reward = 30 ether;
uint256 public constant tier2Reward = 9 ether;
uint256 public constant tier3Reward = 3 ether;
// Stores tier of a CBWC NFT.
// 0 represents tier 3
mapping(uint256 => uint256) public tokenIdTier;
// Stores token id staker address
mapping(uint256 => address) public tokenOwner;
// To store when was the last time user staked or claimed the reward of the token Id
mapping(address => mapping(uint256 => uint256)) public lastUpdate;
// To store addresses that can burn their Arkouda token
mapping(address => bool) public allowedAddresses;
event Staked(address indexed staker, uint256[] tokenIds, uint256 stakeTime);
event Unstaked(address indexed unstaker, uint256[] tokenIds);
event RewardsPaid(
address indexed claimer,
uint256[] tokenIds,
uint256 _tier1Rewards,
uint256 _tier2Rewards,
uint256 _tier3Rewards
);
constructor(ICryptoBearWatchClub _cryptoBearWatchClub)
ERC20("Arkouda", "$ark")
{
}
modifier isTokenOwner(uint256[] memory _tokenIds) {
}
modifier isStakingLive() {
}
modifier checkInputLength(uint256[] memory _tokenIds) {
}
// To start staking/ reward generation
function startStaking() external onlyOwner {
}
// To grant/revoke burn access
function setAllowedAddresses(address _address, bool _access)
external
onlyOwner
{
}
// Sets the tier of CBWC NFTs
function setCBWCNFTTier(uint256[] calldata _tokenIds, uint256 _tier)
external
onlyOwner
{
}
function onERC721Received(
address,
address,
uint256,
bytes memory
) external pure override returns (bytes4) {
}
function burn(uint256 amount) external {
}
// Stakes CBWC NFTs
function stakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
checkInputLength(_tokenIds)
{
for (uint256 i = 0; i < _tokenIds.length; i++) {
require(<FILL_ME>)
// Transferring NFT from staker to the contract
CryptoBearWatchClub.safeTransferFrom(
_msgSender(),
address(this),
_tokenIds[i]
);
// Keeping track of token id staker address
tokenOwner[_tokenIds[i]] = _msgSender();
lastUpdate[_msgSender()][_tokenIds[i]] = block.timestamp;
}
emit Staked(_msgSender(), _tokenIds, block.timestamp);
}
// Unstakes CBWC NFTs
function unStakeCBWC(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
// To claim reward for staking CBWC NFTs
function claimRewards(uint256[] calldata _tokenIds)
external
isStakingLive
isTokenOwner(_tokenIds)
checkInputLength(_tokenIds)
{
}
function claimOrUnstake(uint256[] memory _tokenIds, TX_TYPE txType)
private
{
}
// Returns total pending rewards of all input token ids
function getTotalClaimable(uint256[] memory _tokenIds)
external
view
returns (uint256 totalRewards)
{
}
// Returns pending accumulated reward of the token id
function getPendingReward(uint256 _tokenId)
public
view
returns (uint256 reward)
{
}
// Returns pending accumulated reward of the token id along with token id tier
function getPendingRewardAndTier(uint256 _tokenId)
private
view
returns (uint256 rewards, uint256 tier)
{
}
}
| CryptoBearWatchClub.ownerOf(_tokenIds[i])==_msgSender(),"CBWC_NFT_IS_NOT_YOURS" | 326,724 | CryptoBearWatchClub.ownerOf(_tokenIds[i])==_msgSender() |
"The owner must be the one attempting the update" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
pragma solidity ^0.8.0;
contract Byoa is ERC721Enumerable, AccessControl, ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _byoaAppIds;
// Role for developers to be able to mint apps
bytes32 public constant DEVELOPER_ROLE = keccak256("DEVELOPER_ROLE");
bool private _requireDeveloperOnboarding = true;
// Need a type to hold multiple types of byoa
struct App {
uint256 id;
string name;
string description;
uint256 price;
string tokenURI;
address owner;
}
// Mapping AppIds to the App
mapping (uint256 => App) private apps;
mapping (uint256 => bool) private approvalsByAppId;
mapping (uint256 => uint256) private nftsToAppIds;
mapping (uint256 => mapping (string => string)) private tokenIdPreferencesMap;
mapping (uint256 => string[]) private tokenIdPreferenceKeys;
constructor() ERC721("Byoa V1", "BYOA_V1") {
}
function compareStrings(string memory a, string memory b) public pure returns (bool) {
}
function updatePreferences(uint256 _tokenID, string memory key, string memory value) public {
require(_exists(_tokenID), "Token ID must exist");
require(<FILL_ME>)
tokenIdPreferencesMap[_tokenID][key] = value;
string[] memory keys = tokenIdPreferenceKeys[_tokenID];
for (uint256 i = 0; i < keys.length; i ++) {
if (compareStrings(keys[i],key)) return;
}
tokenIdPreferenceKeys[_tokenID].push(key);
}
function getPreferencesKeys(uint256 _tokenId) public view returns (string[] memory) {
}
function getPreferenceByKey(uint256 _tokenId, string memory key) public view returns (string memory) {
}
function mint(uint256 _appId) public payable {
}
function getAppIdByTokenId(uint256 _tokenId) public view returns (uint256) {
}
function createApp(string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
}
function setApprovalByAppId(uint256 _appId, bool _appr) public {
}
function getApprovalByAppId(uint256 _appId) public view returns (bool) {
}
function updateApp(uint256 appId, string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
}
function getAppDetailsById(uint256 appId) public view returns (
string memory name,
string memory description,
string memory _tokenURI,
address owner,
uint256 price
) {
}
function setDeveloperOnboarding(bool _shouldOnboard) public {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function getAppIds() public view returns (uint256[] memory) {
}
function withdrawAll() public payable {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable, AccessControl) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| ownerOf(_tokenID)==msg.sender,"The owner must be the one attempting the update" | 326,848 | ownerOf(_tokenID)==msg.sender |
"App ID must exist" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
pragma solidity ^0.8.0;
contract Byoa is ERC721Enumerable, AccessControl, ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _byoaAppIds;
// Role for developers to be able to mint apps
bytes32 public constant DEVELOPER_ROLE = keccak256("DEVELOPER_ROLE");
bool private _requireDeveloperOnboarding = true;
// Need a type to hold multiple types of byoa
struct App {
uint256 id;
string name;
string description;
uint256 price;
string tokenURI;
address owner;
}
// Mapping AppIds to the App
mapping (uint256 => App) private apps;
mapping (uint256 => bool) private approvalsByAppId;
mapping (uint256 => uint256) private nftsToAppIds;
mapping (uint256 => mapping (string => string)) private tokenIdPreferencesMap;
mapping (uint256 => string[]) private tokenIdPreferenceKeys;
constructor() ERC721("Byoa V1", "BYOA_V1") {
}
function compareStrings(string memory a, string memory b) public pure returns (bool) {
}
function updatePreferences(uint256 _tokenID, string memory key, string memory value) public {
}
function getPreferencesKeys(uint256 _tokenId) public view returns (string[] memory) {
}
function getPreferenceByKey(uint256 _tokenId, string memory key) public view returns (string memory) {
}
function mint(uint256 _appId) public payable {
require(<FILL_ME>)
uint256 totalSupply = totalSupply();
// Mint and increase the tokenID
uint256 _tokenId = totalSupply + 1;
_safeMint(msg.sender, _tokenId);
require(_exists(_tokenId));
nftsToAppIds[_tokenId] = _appId;
// Set the tokenURI to the URI specified by the App
_setTokenURI(_tokenId, apps[_appId].tokenURI);
}
function getAppIdByTokenId(uint256 _tokenId) public view returns (uint256) {
}
function createApp(string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
}
function setApprovalByAppId(uint256 _appId, bool _appr) public {
}
function getApprovalByAppId(uint256 _appId) public view returns (bool) {
}
function updateApp(uint256 appId, string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
}
function getAppDetailsById(uint256 appId) public view returns (
string memory name,
string memory description,
string memory _tokenURI,
address owner,
uint256 price
) {
}
function setDeveloperOnboarding(bool _shouldOnboard) public {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function getAppIds() public view returns (uint256[] memory) {
}
function withdrawAll() public payable {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable, AccessControl) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| apps[_appId].id!=0,"App ID must exist" | 326,848 | apps[_appId].id!=0 |
"Must be a developer to create an app" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
pragma solidity ^0.8.0;
contract Byoa is ERC721Enumerable, AccessControl, ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _byoaAppIds;
// Role for developers to be able to mint apps
bytes32 public constant DEVELOPER_ROLE = keccak256("DEVELOPER_ROLE");
bool private _requireDeveloperOnboarding = true;
// Need a type to hold multiple types of byoa
struct App {
uint256 id;
string name;
string description;
uint256 price;
string tokenURI;
address owner;
}
// Mapping AppIds to the App
mapping (uint256 => App) private apps;
mapping (uint256 => bool) private approvalsByAppId;
mapping (uint256 => uint256) private nftsToAppIds;
mapping (uint256 => mapping (string => string)) private tokenIdPreferencesMap;
mapping (uint256 => string[]) private tokenIdPreferenceKeys;
constructor() ERC721("Byoa V1", "BYOA_V1") {
}
function compareStrings(string memory a, string memory b) public pure returns (bool) {
}
function updatePreferences(uint256 _tokenID, string memory key, string memory value) public {
}
function getPreferencesKeys(uint256 _tokenId) public view returns (string[] memory) {
}
function getPreferenceByKey(uint256 _tokenId, string memory key) public view returns (string memory) {
}
function mint(uint256 _appId) public payable {
}
function getAppIdByTokenId(uint256 _tokenId) public view returns (uint256) {
}
function createApp(string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
require(<FILL_ME>)
_byoaAppIds.increment();
uint256 _appId = _byoaAppIds.current();
approvalsByAppId[_appId] = true;
apps[_appId] = App({
id: _appId,
name: name,
description: description,
price: price,
tokenURI: _tokenURI,
owner: msg.sender
});
return _appId;
}
function setApprovalByAppId(uint256 _appId, bool _appr) public {
}
function getApprovalByAppId(uint256 _appId) public view returns (bool) {
}
function updateApp(uint256 appId, string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
}
function getAppDetailsById(uint256 appId) public view returns (
string memory name,
string memory description,
string memory _tokenURI,
address owner,
uint256 price
) {
}
function setDeveloperOnboarding(bool _shouldOnboard) public {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function getAppIds() public view returns (uint256[] memory) {
}
function withdrawAll() public payable {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable, AccessControl) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| hasRole(DEVELOPER_ROLE,msg.sender)||(_requireDeveloperOnboarding==false),"Must be a developer to create an app" | 326,848 | hasRole(DEVELOPER_ROLE,msg.sender)||(_requireDeveloperOnboarding==false) |
"Must be a developer to create an app" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
pragma solidity ^0.8.0;
contract Byoa is ERC721Enumerable, AccessControl, ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _byoaAppIds;
// Role for developers to be able to mint apps
bytes32 public constant DEVELOPER_ROLE = keccak256("DEVELOPER_ROLE");
bool private _requireDeveloperOnboarding = true;
// Need a type to hold multiple types of byoa
struct App {
uint256 id;
string name;
string description;
uint256 price;
string tokenURI;
address owner;
}
// Mapping AppIds to the App
mapping (uint256 => App) private apps;
mapping (uint256 => bool) private approvalsByAppId;
mapping (uint256 => uint256) private nftsToAppIds;
mapping (uint256 => mapping (string => string)) private tokenIdPreferencesMap;
mapping (uint256 => string[]) private tokenIdPreferenceKeys;
constructor() ERC721("Byoa V1", "BYOA_V1") {
}
function compareStrings(string memory a, string memory b) public pure returns (bool) {
}
function updatePreferences(uint256 _tokenID, string memory key, string memory value) public {
}
function getPreferencesKeys(uint256 _tokenId) public view returns (string[] memory) {
}
function getPreferenceByKey(uint256 _tokenId, string memory key) public view returns (string memory) {
}
function mint(uint256 _appId) public payable {
}
function getAppIdByTokenId(uint256 _tokenId) public view returns (uint256) {
}
function createApp(string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
}
function setApprovalByAppId(uint256 _appId, bool _appr) public {
}
function getApprovalByAppId(uint256 _appId) public view returns (bool) {
}
function updateApp(uint256 appId, string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
require(<FILL_ME>)
require(apps[appId].id != 0, "App ID must exist");
App memory app = apps[appId];
require(app.owner == msg.sender, "You must be the owner of this app");
apps[appId] = App({
id: appId,
name: name,
description: description,
price: price,
tokenURI: _tokenURI,
owner: msg.sender
});
return appId;
}
function getAppDetailsById(uint256 appId) public view returns (
string memory name,
string memory description,
string memory _tokenURI,
address owner,
uint256 price
) {
}
function setDeveloperOnboarding(bool _shouldOnboard) public {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function getAppIds() public view returns (uint256[] memory) {
}
function withdrawAll() public payable {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable, AccessControl) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| hasRole(DEVELOPER_ROLE,msg.sender),"Must be a developer to create an app" | 326,848 | hasRole(DEVELOPER_ROLE,msg.sender) |
"App ID must exist" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
pragma solidity ^0.8.0;
contract Byoa is ERC721Enumerable, AccessControl, ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _byoaAppIds;
// Role for developers to be able to mint apps
bytes32 public constant DEVELOPER_ROLE = keccak256("DEVELOPER_ROLE");
bool private _requireDeveloperOnboarding = true;
// Need a type to hold multiple types of byoa
struct App {
uint256 id;
string name;
string description;
uint256 price;
string tokenURI;
address owner;
}
// Mapping AppIds to the App
mapping (uint256 => App) private apps;
mapping (uint256 => bool) private approvalsByAppId;
mapping (uint256 => uint256) private nftsToAppIds;
mapping (uint256 => mapping (string => string)) private tokenIdPreferencesMap;
mapping (uint256 => string[]) private tokenIdPreferenceKeys;
constructor() ERC721("Byoa V1", "BYOA_V1") {
}
function compareStrings(string memory a, string memory b) public pure returns (bool) {
}
function updatePreferences(uint256 _tokenID, string memory key, string memory value) public {
}
function getPreferencesKeys(uint256 _tokenId) public view returns (string[] memory) {
}
function getPreferenceByKey(uint256 _tokenId, string memory key) public view returns (string memory) {
}
function mint(uint256 _appId) public payable {
}
function getAppIdByTokenId(uint256 _tokenId) public view returns (uint256) {
}
function createApp(string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
}
function setApprovalByAppId(uint256 _appId, bool _appr) public {
}
function getApprovalByAppId(uint256 _appId) public view returns (bool) {
}
function updateApp(uint256 appId, string memory name, string memory description, uint256 price, string memory _tokenURI) public returns (uint256) {
require(hasRole(DEVELOPER_ROLE, msg.sender), "Must be a developer to create an app");
require(<FILL_ME>)
App memory app = apps[appId];
require(app.owner == msg.sender, "You must be the owner of this app");
apps[appId] = App({
id: appId,
name: name,
description: description,
price: price,
tokenURI: _tokenURI,
owner: msg.sender
});
return appId;
}
function getAppDetailsById(uint256 appId) public view returns (
string memory name,
string memory description,
string memory _tokenURI,
address owner,
uint256 price
) {
}
function setDeveloperOnboarding(bool _shouldOnboard) public {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function getAppIds() public view returns (uint256[] memory) {
}
function withdrawAll() public payable {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable, AccessControl) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| apps[appId].id!=0,"App ID must exist" | 326,848 | apps[appId].id!=0 |
"Insufficient funds provided" | pragma solidity ^0.8.7;
// IMPORTS //
/**
* @dev ERC721 token standard
*/
/**
* @dev Modifier 'onlyOwner' becomes available where owner is the contract deployer
*/
/**
* @dev Verification of Merkle trees
*/
/**
* @dev Generates words etc
*/
// LIBRARIES //
/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
}
}
// CONTRACT //
contract Lootlang is ERC721, Ownable, Gen {
// VARIABLES //
uint public enabled;
uint internal mints;
uint internal claims;
uint internal nextTokenId;
uint public contractBalance;
string internal contractURIstring;
uint public freezeBlock;
uint internal freezeBlockChanges;
bytes32 internal root;
constructor() Ownable() ERC721('Lootlang', 'LANG') {
}
// EVENTS //
event Shuffled(uint tokenId);
// ONLY OWNER FUNCTIONS //
/**
* @dev Set the root for Merkle Proof
*/
function setRoot(bytes32 _newRoot) external onlyOwner {
}
/**
* @dev Set the new block number to freeze shuffling. Can only be called once.
*/
function setFreezeBlock(uint _newFreezeBlockNumber) external onlyOwner {
}
/**
* @dev Withdraw '_amount' of Ether to address '_to'. Only contract owner can call.
* @param _to - address Ether will be sent to
* @param _amount - amount of Ether, in Wei, to be withdrawn
*/
function withdrawFunds(address payable _to, uint _amount) external onlyOwner {
}
/**
* @dev activates/deactivates the minting functionality - only the contract owner can call
* @param _enabled where 1 = enabled and 0 = not
*/
function setEnable(uint _enabled) external onlyOwner {
}
/**
* @dev Set the contract's URI
* @param _contractURIstring - web address containing data read by OpenSea
*/
function setContractURI(string memory _contractURIstring) external onlyOwner {
}
// USER FUNCTIONS //
/**
* @dev Mint an ERC721 token.
*/
function mint() external payable {
require(enabled == 1, "Minting is yet to be enabled");
require(nextTokenId <= 10000 && mints <= 9700, "All NFTs have been minted");
require(<FILL_ME>) // 0.02 eth (cost of minting an NFT) // SET MINT PRICE
mints++;
contractBalance += msg.value;
sharedMintCode();
}
/**
* @dev Claim and mint an ERC721 token.
*/
function claim(bytes32[] memory proof) external {
}
/**
* @dev Shared code used by both 'mint()' and 'claim()' functions.
*/
function sharedMintCode() internal {
}
/**
* @dev Shuffles up to 8 words. Set input params as 1 to shuffle word, and 0 to leave it.
* E.g. shuffle(243,1,0,0,0,0,0,0,1) shuffles the 1st and 8th word of token 243.
*/
function shuffle(uint _tokenId, uint one, uint two, uint three, uint four, uint five, uint six, uint seven, uint eight) external {
}
// VIEW FUNCTIONS //
/**
* @dev View total number of minted tokens
*/
function totalSupply() external view returns(uint) {
}
/**
* @dev View the contract URI.
*/
function contractURI() public view returns (string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format word lengths for .json file output
*/
function getMetaText(string memory word) internal pure returns(string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format words for .json file output
*/
function getMetaWord(string memory word) internal pure returns(string memory) {
}
/**
* @dev Creates seed passed in to 'generateWord()' function for seeding randomness
*/
function totalSeedGen(uint tokenId, uint wordNum) internal view returns(uint) {
}
/**
* @dev View tokenURI of 'tokenId'.
*/
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| msg.value>=(2*10**16),"Insufficient funds provided" | 326,860 | msg.value>=(2*10**16) |
"Already claimed" | pragma solidity ^0.8.7;
// IMPORTS //
/**
* @dev ERC721 token standard
*/
/**
* @dev Modifier 'onlyOwner' becomes available where owner is the contract deployer
*/
/**
* @dev Verification of Merkle trees
*/
/**
* @dev Generates words etc
*/
// LIBRARIES //
/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
}
}
// CONTRACT //
contract Lootlang is ERC721, Ownable, Gen {
// VARIABLES //
uint public enabled;
uint internal mints;
uint internal claims;
uint internal nextTokenId;
uint public contractBalance;
string internal contractURIstring;
uint public freezeBlock;
uint internal freezeBlockChanges;
bytes32 internal root;
constructor() Ownable() ERC721('Lootlang', 'LANG') {
}
// EVENTS //
event Shuffled(uint tokenId);
// ONLY OWNER FUNCTIONS //
/**
* @dev Set the root for Merkle Proof
*/
function setRoot(bytes32 _newRoot) external onlyOwner {
}
/**
* @dev Set the new block number to freeze shuffling. Can only be called once.
*/
function setFreezeBlock(uint _newFreezeBlockNumber) external onlyOwner {
}
/**
* @dev Withdraw '_amount' of Ether to address '_to'. Only contract owner can call.
* @param _to - address Ether will be sent to
* @param _amount - amount of Ether, in Wei, to be withdrawn
*/
function withdrawFunds(address payable _to, uint _amount) external onlyOwner {
}
/**
* @dev activates/deactivates the minting functionality - only the contract owner can call
* @param _enabled where 1 = enabled and 0 = not
*/
function setEnable(uint _enabled) external onlyOwner {
}
/**
* @dev Set the contract's URI
* @param _contractURIstring - web address containing data read by OpenSea
*/
function setContractURI(string memory _contractURIstring) external onlyOwner {
}
// USER FUNCTIONS //
/**
* @dev Mint an ERC721 token.
*/
function mint() external payable {
}
/**
* @dev Claim and mint an ERC721 token.
*/
function claim(bytes32[] memory proof) external {
require(enabled == 1, "Minting is yet to be enabled");
require(<FILL_ME>)
require(nextTokenId <= 10000 && claims <= 300, "All NFTs have been minted");
require(MerkleProof.verify(proof, root, keccak256(abi.encodePacked(msg.sender))) == true, "Not on pre-approved claim list");
claims++;
hasClaimed[msg.sender] = true;
sharedMintCode();
}
/**
* @dev Shared code used by both 'mint()' and 'claim()' functions.
*/
function sharedMintCode() internal {
}
/**
* @dev Shuffles up to 8 words. Set input params as 1 to shuffle word, and 0 to leave it.
* E.g. shuffle(243,1,0,0,0,0,0,0,1) shuffles the 1st and 8th word of token 243.
*/
function shuffle(uint _tokenId, uint one, uint two, uint three, uint four, uint five, uint six, uint seven, uint eight) external {
}
// VIEW FUNCTIONS //
/**
* @dev View total number of minted tokens
*/
function totalSupply() external view returns(uint) {
}
/**
* @dev View the contract URI.
*/
function contractURI() public view returns (string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format word lengths for .json file output
*/
function getMetaText(string memory word) internal pure returns(string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format words for .json file output
*/
function getMetaWord(string memory word) internal pure returns(string memory) {
}
/**
* @dev Creates seed passed in to 'generateWord()' function for seeding randomness
*/
function totalSeedGen(uint tokenId, uint wordNum) internal view returns(uint) {
}
/**
* @dev View tokenURI of 'tokenId'.
*/
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| hasClaimed[msg.sender]==false,"Already claimed" | 326,860 | hasClaimed[msg.sender]==false |
"Not on pre-approved claim list" | pragma solidity ^0.8.7;
// IMPORTS //
/**
* @dev ERC721 token standard
*/
/**
* @dev Modifier 'onlyOwner' becomes available where owner is the contract deployer
*/
/**
* @dev Verification of Merkle trees
*/
/**
* @dev Generates words etc
*/
// LIBRARIES //
/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
}
}
// CONTRACT //
contract Lootlang is ERC721, Ownable, Gen {
// VARIABLES //
uint public enabled;
uint internal mints;
uint internal claims;
uint internal nextTokenId;
uint public contractBalance;
string internal contractURIstring;
uint public freezeBlock;
uint internal freezeBlockChanges;
bytes32 internal root;
constructor() Ownable() ERC721('Lootlang', 'LANG') {
}
// EVENTS //
event Shuffled(uint tokenId);
// ONLY OWNER FUNCTIONS //
/**
* @dev Set the root for Merkle Proof
*/
function setRoot(bytes32 _newRoot) external onlyOwner {
}
/**
* @dev Set the new block number to freeze shuffling. Can only be called once.
*/
function setFreezeBlock(uint _newFreezeBlockNumber) external onlyOwner {
}
/**
* @dev Withdraw '_amount' of Ether to address '_to'. Only contract owner can call.
* @param _to - address Ether will be sent to
* @param _amount - amount of Ether, in Wei, to be withdrawn
*/
function withdrawFunds(address payable _to, uint _amount) external onlyOwner {
}
/**
* @dev activates/deactivates the minting functionality - only the contract owner can call
* @param _enabled where 1 = enabled and 0 = not
*/
function setEnable(uint _enabled) external onlyOwner {
}
/**
* @dev Set the contract's URI
* @param _contractURIstring - web address containing data read by OpenSea
*/
function setContractURI(string memory _contractURIstring) external onlyOwner {
}
// USER FUNCTIONS //
/**
* @dev Mint an ERC721 token.
*/
function mint() external payable {
}
/**
* @dev Claim and mint an ERC721 token.
*/
function claim(bytes32[] memory proof) external {
require(enabled == 1, "Minting is yet to be enabled");
require(hasClaimed[msg.sender] == false, "Already claimed");
require(nextTokenId <= 10000 && claims <= 300, "All NFTs have been minted");
require(<FILL_ME>)
claims++;
hasClaimed[msg.sender] = true;
sharedMintCode();
}
/**
* @dev Shared code used by both 'mint()' and 'claim()' functions.
*/
function sharedMintCode() internal {
}
/**
* @dev Shuffles up to 8 words. Set input params as 1 to shuffle word, and 0 to leave it.
* E.g. shuffle(243,1,0,0,0,0,0,0,1) shuffles the 1st and 8th word of token 243.
*/
function shuffle(uint _tokenId, uint one, uint two, uint three, uint four, uint five, uint six, uint seven, uint eight) external {
}
// VIEW FUNCTIONS //
/**
* @dev View total number of minted tokens
*/
function totalSupply() external view returns(uint) {
}
/**
* @dev View the contract URI.
*/
function contractURI() public view returns (string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format word lengths for .json file output
*/
function getMetaText(string memory word) internal pure returns(string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format words for .json file output
*/
function getMetaWord(string memory word) internal pure returns(string memory) {
}
/**
* @dev Creates seed passed in to 'generateWord()' function for seeding randomness
*/
function totalSeedGen(uint tokenId, uint wordNum) internal view returns(uint) {
}
/**
* @dev View tokenURI of 'tokenId'.
*/
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| MerkleProof.verify(proof,root,keccak256(abi.encodePacked(msg.sender)))==true,"Not on pre-approved claim list" | 326,860 | MerkleProof.verify(proof,root,keccak256(abi.encodePacked(msg.sender)))==true |
"Shuffled max amount already" | pragma solidity ^0.8.7;
// IMPORTS //
/**
* @dev ERC721 token standard
*/
/**
* @dev Modifier 'onlyOwner' becomes available where owner is the contract deployer
*/
/**
* @dev Verification of Merkle trees
*/
/**
* @dev Generates words etc
*/
// LIBRARIES //
/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
}
}
// CONTRACT //
contract Lootlang is ERC721, Ownable, Gen {
// VARIABLES //
uint public enabled;
uint internal mints;
uint internal claims;
uint internal nextTokenId;
uint public contractBalance;
string internal contractURIstring;
uint public freezeBlock;
uint internal freezeBlockChanges;
bytes32 internal root;
constructor() Ownable() ERC721('Lootlang', 'LANG') {
}
// EVENTS //
event Shuffled(uint tokenId);
// ONLY OWNER FUNCTIONS //
/**
* @dev Set the root for Merkle Proof
*/
function setRoot(bytes32 _newRoot) external onlyOwner {
}
/**
* @dev Set the new block number to freeze shuffling. Can only be called once.
*/
function setFreezeBlock(uint _newFreezeBlockNumber) external onlyOwner {
}
/**
* @dev Withdraw '_amount' of Ether to address '_to'. Only contract owner can call.
* @param _to - address Ether will be sent to
* @param _amount - amount of Ether, in Wei, to be withdrawn
*/
function withdrawFunds(address payable _to, uint _amount) external onlyOwner {
}
/**
* @dev activates/deactivates the minting functionality - only the contract owner can call
* @param _enabled where 1 = enabled and 0 = not
*/
function setEnable(uint _enabled) external onlyOwner {
}
/**
* @dev Set the contract's URI
* @param _contractURIstring - web address containing data read by OpenSea
*/
function setContractURI(string memory _contractURIstring) external onlyOwner {
}
// USER FUNCTIONS //
/**
* @dev Mint an ERC721 token.
*/
function mint() external payable {
}
/**
* @dev Claim and mint an ERC721 token.
*/
function claim(bytes32[] memory proof) external {
}
/**
* @dev Shared code used by both 'mint()' and 'claim()' functions.
*/
function sharedMintCode() internal {
}
/**
* @dev Shuffles up to 8 words. Set input params as 1 to shuffle word, and 0 to leave it.
* E.g. shuffle(243,1,0,0,0,0,0,0,1) shuffles the 1st and 8th word of token 243.
*/
function shuffle(uint _tokenId, uint one, uint two, uint three, uint four, uint five, uint six, uint seven, uint eight) external {
require(ownerOf(_tokenId) == msg.sender, "Must be NFT owner");
require(<FILL_ME>)
require(block.number < freezeBlock, "Shuffling has been frozen!");
require((one+two+three+four+five+six+seven+eight) > 0, "No words selected to be shuffled");
uint randomish = uint(keccak256(abi.encodePacked(block.number)))%1000000;
uint[8] memory indexesToChange = [one, two, three, four, five, six, seven, eight];
for (uint i=0; i<8; i++) {
if (indexesToChange[i] > 0) {
tokenIdToShuffleShift[_tokenId][i] += randomish;
}
}
shuffleCount[_tokenId]++;
emit Shuffled(_tokenId);
}
// VIEW FUNCTIONS //
/**
* @dev View total number of minted tokens
*/
function totalSupply() external view returns(uint) {
}
/**
* @dev View the contract URI.
*/
function contractURI() public view returns (string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format word lengths for .json file output
*/
function getMetaText(string memory word) internal pure returns(string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format words for .json file output
*/
function getMetaWord(string memory word) internal pure returns(string memory) {
}
/**
* @dev Creates seed passed in to 'generateWord()' function for seeding randomness
*/
function totalSeedGen(uint tokenId, uint wordNum) internal view returns(uint) {
}
/**
* @dev View tokenURI of 'tokenId'.
*/
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| shuffleCount[_tokenId]<5,"Shuffled max amount already" | 326,860 | shuffleCount[_tokenId]<5 |
"No words selected to be shuffled" | pragma solidity ^0.8.7;
// IMPORTS //
/**
* @dev ERC721 token standard
*/
/**
* @dev Modifier 'onlyOwner' becomes available where owner is the contract deployer
*/
/**
* @dev Verification of Merkle trees
*/
/**
* @dev Generates words etc
*/
// LIBRARIES //
/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
}
}
// CONTRACT //
contract Lootlang is ERC721, Ownable, Gen {
// VARIABLES //
uint public enabled;
uint internal mints;
uint internal claims;
uint internal nextTokenId;
uint public contractBalance;
string internal contractURIstring;
uint public freezeBlock;
uint internal freezeBlockChanges;
bytes32 internal root;
constructor() Ownable() ERC721('Lootlang', 'LANG') {
}
// EVENTS //
event Shuffled(uint tokenId);
// ONLY OWNER FUNCTIONS //
/**
* @dev Set the root for Merkle Proof
*/
function setRoot(bytes32 _newRoot) external onlyOwner {
}
/**
* @dev Set the new block number to freeze shuffling. Can only be called once.
*/
function setFreezeBlock(uint _newFreezeBlockNumber) external onlyOwner {
}
/**
* @dev Withdraw '_amount' of Ether to address '_to'. Only contract owner can call.
* @param _to - address Ether will be sent to
* @param _amount - amount of Ether, in Wei, to be withdrawn
*/
function withdrawFunds(address payable _to, uint _amount) external onlyOwner {
}
/**
* @dev activates/deactivates the minting functionality - only the contract owner can call
* @param _enabled where 1 = enabled and 0 = not
*/
function setEnable(uint _enabled) external onlyOwner {
}
/**
* @dev Set the contract's URI
* @param _contractURIstring - web address containing data read by OpenSea
*/
function setContractURI(string memory _contractURIstring) external onlyOwner {
}
// USER FUNCTIONS //
/**
* @dev Mint an ERC721 token.
*/
function mint() external payable {
}
/**
* @dev Claim and mint an ERC721 token.
*/
function claim(bytes32[] memory proof) external {
}
/**
* @dev Shared code used by both 'mint()' and 'claim()' functions.
*/
function sharedMintCode() internal {
}
/**
* @dev Shuffles up to 8 words. Set input params as 1 to shuffle word, and 0 to leave it.
* E.g. shuffle(243,1,0,0,0,0,0,0,1) shuffles the 1st and 8th word of token 243.
*/
function shuffle(uint _tokenId, uint one, uint two, uint three, uint four, uint five, uint six, uint seven, uint eight) external {
require(ownerOf(_tokenId) == msg.sender, "Must be NFT owner");
require(shuffleCount[_tokenId] < 5, "Shuffled max amount already");
require(block.number < freezeBlock, "Shuffling has been frozen!");
require(<FILL_ME>)
uint randomish = uint(keccak256(abi.encodePacked(block.number)))%1000000;
uint[8] memory indexesToChange = [one, two, three, four, five, six, seven, eight];
for (uint i=0; i<8; i++) {
if (indexesToChange[i] > 0) {
tokenIdToShuffleShift[_tokenId][i] += randomish;
}
}
shuffleCount[_tokenId]++;
emit Shuffled(_tokenId);
}
// VIEW FUNCTIONS //
/**
* @dev View total number of minted tokens
*/
function totalSupply() external view returns(uint) {
}
/**
* @dev View the contract URI.
*/
function contractURI() public view returns (string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format word lengths for .json file output
*/
function getMetaText(string memory word) internal pure returns(string memory) {
}
/**
* @dev Internal function used by function 'tokenURI()' to format words for .json file output
*/
function getMetaWord(string memory word) internal pure returns(string memory) {
}
/**
* @dev Creates seed passed in to 'generateWord()' function for seeding randomness
*/
function totalSeedGen(uint tokenId, uint wordNum) internal view returns(uint) {
}
/**
* @dev View tokenURI of 'tokenId'.
*/
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| (one+two+three+four+five+six+seven+eight)>0,"No words selected to be shuffled" | 326,860 | (one+two+three+four+five+six+seven+eight)>0 |
"AF_IC" | /**
* Copyright 2017–2019, LaborX PTY
* Licensed under the AGPL Version 3 license.
*/
pragma solidity ^0.4.25;
contract FeeApplicable is Object {
uint constant MAX_FEE = 100; // 100 = 1%
uint constant FEE_PRECISION = 10000; // Fee calculation: value * (fee / FEE_PRECISION)
address private _serviceFeeAddress;
uint16 private _serviceFee;
modifier onlyFeeAdmin {
require(<FILL_ME>) // AF_IC == applicable fee invalid caller
_;
}
function getServiceFeeInfo() public view returns (address, uint16, uint) {
}
function setServiceFee(uint16 _feeValue) external onlyFeeAdmin returns (uint) {
}
function setServiceFeeAddress(address _feeReceiver) external onlyFeeAdmin returns (uint) {
}
function _isFeeAdmin(address _account) internal view returns (bool);
}
| _isFeeAdmin(msg.sender),"AF_IC" | 326,869 | _isFeeAdmin(msg.sender) |
null | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
/**
* @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.
*
* _Available since v2.4.0._
*/
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.
*
* _Available since v2.4.0._
*/
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.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
interface INEC {
function burningEnabled() external returns(bool);
function controller() external returns(address);
function enableBurning(bool _burningEnabled) external;
function burnAndRetrieve(uint256 _tokensToBurn) external returns (bool success);
function totalPledgedFees() external view returns (uint);
function totalSupply() external view returns (uint);
function destroyTokens(address _owner, uint _amount
) external returns (bool);
function generateTokens(address _owner, uint _amount
) external returns (bool);
function changeController(address _newController) external;
function balanceOf(address owner) external returns(uint256);
function transfer(address owner, uint amount) external returns(bool);
}
contract TokenController {
function proxyPayment(address _owner) public payable returns(bool);
function onTransfer(address _from, address _to, uint _amount) public returns(bool);
function onApprove(address _owner, address _spender, uint _amount) public
returns(bool);
function onBurn(address payable _owner, uint _amount) public returns(bool);
}
contract NectarController is TokenController, Ownable {
using SafeMath for uint256;
INEC public tokenContract; // The new token for this Campaign
/// @dev There are several checks to make sure the parameters are acceptable
/// @param _tokenAddress Address of the token contract this contract controls
constructor (
address _tokenAddress
) public {
}
/////////////////
// TokenController interface
/////////////////
/// @notice `proxyPayment()` allows the caller to send ether to the Campaign
/// but does not create tokens. This functions the same as the fallback function.
/// @param _owner Does not do anything, but preserved because of MiniMe standard function.
function proxyPayment(address _owner) public payable returns(bool) {
}
/// @notice Notifies the controller about a transfer.
/// Transfers can only happen to whitelisted addresses
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer
function onTransfer(address _from, address _to, uint _amount) public returns(bool) {
}
/// @notice Notifies the controller about an approval, for this Campaign all
/// approvals are allowed by default and no extra notifications are needed
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize the approval
function onApprove(address _owner, address _spender, uint _amount) public
returns(bool)
{
}
/// @notice Notifies the controller about a burn attempt. Initially all burns are disabled.
/// Upgraded Controllers in the future will allow token holders to claim the pledged ETH
/// @param _owner The address that calls `burn()`
/// @param _tokensToBurn The amount in the `burn()` call
/// @return False if the controller does not authorize the approval
function onBurn(address payable _owner, uint _tokensToBurn) public
returns(bool)
{
// This plugin can only be called by the token contract
require(msg.sender == address(tokenContract));
require(<FILL_ME>)
return true;
}
/// @notice `onlyOwner` can upgrade the controller contract
/// @param _newControllerAddress The address that will have the token control logic
function upgradeController(address _newControllerAddress) public onlyOwner {
}
/// @dev enableBurning - Allows the owner to activate burning on the underlying token contract
function enableBurning(bool _burningEnabled) public onlyOwner{
}
//////////
// Safety Methods
//////////
/// @notice This method can be used by the owner to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
function claimTokens(address _token) public onlyOwner {
}
/// @dev evacuateToVault - This is only used to evacuate remaining to ether from this contract to the vault address
function claimEther() public onlyOwner{
}
////////////////
// Events
////////////////
event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount);
event UpgradedController (address newAddress);
}
| tokenContract.destroyTokens(_owner,_tokensToBurn) | 326,903 | tokenContract.destroyTokens(_owner,_tokensToBurn) |
"The game is drawing, try again later." | pragma solidity 0.5.8;
/*
* Lottery 5 of 36 (Weekly) v0.0.4
*/
contract SmartLotto {
// CONSTANTS //////////////////////////////////////////////////////////////////////////////////////////////////////
uint private constant TICKET_PRICE = 0.01 ether;
uint8 private constant REQ_NUMBERS = 5;
uint8 private constant MAX_NUMBER = 36;
uint8 private constant MIN_WIN_MATCH = 2;
uint8 private constant ARR_SIZE = REQ_NUMBERS - MIN_WIN_MATCH + 1;
uint8 private constant DRAW_DOW = 2;
uint private constant DRAW_HOUR = 16 hours;
uint private constant BEF_PERIOD = 60 minutes;
uint private constant AFT_PERIOD = 60 minutes;
uint8 private constant PERCENT_FUND_PR = 20;
uint8[ARR_SIZE] private PERCENT_FUNDS = [20, 30, 35, 15];
// Controll addresses
address private constant CONTROL = 0x203bF6B46508eD917c085F50F194F36b0a62EB02;
address payable private constant PR = 0xCD66911b6f38FaAF5BFeE427b3Ceb7D18Dd09F78;
address payable private constant ADMIN_JACKPOT = 0x531d3Bd0400Ae601f26B335EfbD787415Aa5CB81;
uint private constant ACTIVITY_PERIOD = 20 weeks;
uint private constant POOL_SIZE = 50;
// STRUCTURES /////////////////////////////////////////////////////////////////////////////////////////////////////
struct Member {
address payable addr;
uint8[REQ_NUMBERS] numbers;
uint8 matchNumbers;
uint prize;
}
struct Game {
uint membersCounter;
uint winnersCounter;
uint8[REQ_NUMBERS] winNumbers;
uint totalFund;
uint[ARR_SIZE] funds;
uint[ARR_SIZE] winners;
uint8 status;
mapping(uint => Member) members;
mapping(uint => uint) winTickets;
}
// VARIABLES //////////////////////////////////////////////////////////////////////////////////////////////////////
uint8 private contractStatus = 1;
uint private gameNum = 1;
mapping(uint => Game) private games;
uint private firstActivityTime = 0;
uint private lastActivityTime = 0;
uint private adminJackpotAmount = 0;
uint private poolCounter = 0;
uint private controlPhase = 0;
// EVENTS /////////////////////////////////////////////////////////////////////////////////////////////////////////
// _action: 0 - New game, 1 - Change status (Drawing), 2 - Jackpot change
event GameChanged(uint _gameNum, uint8 _action);
event MemberChanged(uint _gameNum, uint _member, uint _prize);
// API ////////////////////////////////////////////////////////////////////////////////////////////////////////////
// For any status
function getGameInfo(uint gamenum) public view returns
(uint _gamenum, uint _membersCounter, uint _totalFund, uint8 _status) {
}
// For any status
function getGameFunds(uint gamenum) public view returns (uint[ARR_SIZE] memory _funds) {
}
// For status > 0
function getGameWinNumbers(uint gamenum) public view returns (uint8[REQ_NUMBERS] memory _winNumbers) {
}
// For status == 2
function getGameWinners(uint gamenum) public view returns (uint[ARR_SIZE] memory _winners) {
}
function getMemberInfo(uint gamenum, uint member) public view returns
(address _addr, uint _prize, uint8[REQ_NUMBERS] memory _numbers) {
}
// FUNCTIONS //////////////////////////////////////////////////////////////////////////////////////////////////////
// ENTRY POINT
function() external payable {
// Check contract status
require(contractStatus == 1, "Contract closed.");
// CONTROL
if (msg.sender == CONTROL) {
doControl();
return;
}
// For admin & user game status must be 0
require(<FILL_ME>)
// ADMIN JACKPOT
if (msg.sender == ADMIN_JACKPOT) {
doAdminJackpot();
return;
}
// USER
uint8 weekday = getWeekday(now);
uint nowMinute = getDayMinute(now);
bool isDrawTime = (weekday == DRAW_DOW && (nowMinute > (DRAW_HOUR - BEF_PERIOD) / 60) && (nowMinute < (DRAW_HOUR + AFT_PERIOD) / 60));
require(!isDrawTime, "The game is drawing, try again later.");
require(msg.value == TICKET_PRICE, "Value must be '0.01' for play.");
doUser();
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Admin Jackpot process
///////////////////////////////////////////////////////////////////////////////////////////////////////
function doAdminJackpot() private {
}
// Return admin jackpot after ACTIVITY PERIOD
function returnAdminJackpot() private {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Control process
///////////////////////////////////////////////////////////////////////////////////////////////////////
function doControl() private {
}
function doCalculate() private {
}
function doPayout() private {
}
// Check contract activity
function checkContractActivity() private {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// User process
///////////////////////////////////////////////////////////////////////////////////////////////////////
function doUser() private {
}
// Ticket process
function doTicket() private {
}
// UTILS //////////////////////////////////////////////////////////////////////////////////////////////////////////
// Get timestamp minute of day
function getDayMinute(uint timestamp) private pure returns (uint) {
}
// Get timestamp day of week
function getWeekday(uint timestamp) private pure returns (uint8) {
}
// Generate random number
function random(uint8 num) internal view returns (uint8) {
}
// Generate winning numbers
function generateNumbers() private view returns (uint8[REQ_NUMBERS] memory numbers) {
}
// Sort array of number function
function sortNumbers(uint8[REQ_NUMBERS] memory arrNumbers) private pure returns (uint8[REQ_NUMBERS] memory) {
}
// Find match numbers function
function findMatch(uint8[REQ_NUMBERS] memory arr1, uint8[REQ_NUMBERS] memory arr2) private pure returns (uint8) {
}
// Parse and check msg.DATA function
function parseCheckData() private pure returns (bool, uint8[REQ_NUMBERS] memory) {
}
// Calculate game funds
function calcGameFunds() private view returns (uint[ARR_SIZE] memory funds) {
}
}
| games[gameNum].status==0,"The game is drawing, try again later." | 326,925 | games[gameNum].status==0 |
"The game is drawing, try again later." | pragma solidity 0.5.8;
/*
* Lottery 5 of 36 (Weekly) v0.0.4
*/
contract SmartLotto {
// CONSTANTS //////////////////////////////////////////////////////////////////////////////////////////////////////
uint private constant TICKET_PRICE = 0.01 ether;
uint8 private constant REQ_NUMBERS = 5;
uint8 private constant MAX_NUMBER = 36;
uint8 private constant MIN_WIN_MATCH = 2;
uint8 private constant ARR_SIZE = REQ_NUMBERS - MIN_WIN_MATCH + 1;
uint8 private constant DRAW_DOW = 2;
uint private constant DRAW_HOUR = 16 hours;
uint private constant BEF_PERIOD = 60 minutes;
uint private constant AFT_PERIOD = 60 minutes;
uint8 private constant PERCENT_FUND_PR = 20;
uint8[ARR_SIZE] private PERCENT_FUNDS = [20, 30, 35, 15];
// Controll addresses
address private constant CONTROL = 0x203bF6B46508eD917c085F50F194F36b0a62EB02;
address payable private constant PR = 0xCD66911b6f38FaAF5BFeE427b3Ceb7D18Dd09F78;
address payable private constant ADMIN_JACKPOT = 0x531d3Bd0400Ae601f26B335EfbD787415Aa5CB81;
uint private constant ACTIVITY_PERIOD = 20 weeks;
uint private constant POOL_SIZE = 50;
// STRUCTURES /////////////////////////////////////////////////////////////////////////////////////////////////////
struct Member {
address payable addr;
uint8[REQ_NUMBERS] numbers;
uint8 matchNumbers;
uint prize;
}
struct Game {
uint membersCounter;
uint winnersCounter;
uint8[REQ_NUMBERS] winNumbers;
uint totalFund;
uint[ARR_SIZE] funds;
uint[ARR_SIZE] winners;
uint8 status;
mapping(uint => Member) members;
mapping(uint => uint) winTickets;
}
// VARIABLES //////////////////////////////////////////////////////////////////////////////////////////////////////
uint8 private contractStatus = 1;
uint private gameNum = 1;
mapping(uint => Game) private games;
uint private firstActivityTime = 0;
uint private lastActivityTime = 0;
uint private adminJackpotAmount = 0;
uint private poolCounter = 0;
uint private controlPhase = 0;
// EVENTS /////////////////////////////////////////////////////////////////////////////////////////////////////////
// _action: 0 - New game, 1 - Change status (Drawing), 2 - Jackpot change
event GameChanged(uint _gameNum, uint8 _action);
event MemberChanged(uint _gameNum, uint _member, uint _prize);
// API ////////////////////////////////////////////////////////////////////////////////////////////////////////////
// For any status
function getGameInfo(uint gamenum) public view returns
(uint _gamenum, uint _membersCounter, uint _totalFund, uint8 _status) {
}
// For any status
function getGameFunds(uint gamenum) public view returns (uint[ARR_SIZE] memory _funds) {
}
// For status > 0
function getGameWinNumbers(uint gamenum) public view returns (uint8[REQ_NUMBERS] memory _winNumbers) {
}
// For status == 2
function getGameWinners(uint gamenum) public view returns (uint[ARR_SIZE] memory _winners) {
}
function getMemberInfo(uint gamenum, uint member) public view returns
(address _addr, uint _prize, uint8[REQ_NUMBERS] memory _numbers) {
}
// FUNCTIONS //////////////////////////////////////////////////////////////////////////////////////////////////////
// ENTRY POINT
function() external payable {
// Check contract status
require(contractStatus == 1, "Contract closed.");
// CONTROL
if (msg.sender == CONTROL) {
doControl();
return;
}
// For admin & user game status must be 0
require(games[gameNum].status == 0, "The game is drawing, try again later.");
// ADMIN JACKPOT
if (msg.sender == ADMIN_JACKPOT) {
doAdminJackpot();
return;
}
// USER
uint8 weekday = getWeekday(now);
uint nowMinute = getDayMinute(now);
bool isDrawTime = (weekday == DRAW_DOW && (nowMinute > (DRAW_HOUR - BEF_PERIOD) / 60) && (nowMinute < (DRAW_HOUR + AFT_PERIOD) / 60));
require(<FILL_ME>)
require(msg.value == TICKET_PRICE, "Value must be '0.01' for play.");
doUser();
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Admin Jackpot process
///////////////////////////////////////////////////////////////////////////////////////////////////////
function doAdminJackpot() private {
}
// Return admin jackpot after ACTIVITY PERIOD
function returnAdminJackpot() private {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Control process
///////////////////////////////////////////////////////////////////////////////////////////////////////
function doControl() private {
}
function doCalculate() private {
}
function doPayout() private {
}
// Check contract activity
function checkContractActivity() private {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// User process
///////////////////////////////////////////////////////////////////////////////////////////////////////
function doUser() private {
}
// Ticket process
function doTicket() private {
}
// UTILS //////////////////////////////////////////////////////////////////////////////////////////////////////////
// Get timestamp minute of day
function getDayMinute(uint timestamp) private pure returns (uint) {
}
// Get timestamp day of week
function getWeekday(uint timestamp) private pure returns (uint8) {
}
// Generate random number
function random(uint8 num) internal view returns (uint8) {
}
// Generate winning numbers
function generateNumbers() private view returns (uint8[REQ_NUMBERS] memory numbers) {
}
// Sort array of number function
function sortNumbers(uint8[REQ_NUMBERS] memory arrNumbers) private pure returns (uint8[REQ_NUMBERS] memory) {
}
// Find match numbers function
function findMatch(uint8[REQ_NUMBERS] memory arr1, uint8[REQ_NUMBERS] memory arr2) private pure returns (uint8) {
}
// Parse and check msg.DATA function
function parseCheckData() private pure returns (bool, uint8[REQ_NUMBERS] memory) {
}
// Calculate game funds
function calcGameFunds() private view returns (uint[ARR_SIZE] memory funds) {
}
}
| !isDrawTime,"The game is drawing, try again later." | 326,925 | !isDrawTime |
"Exceeds max mints for presale." | pragma solidity >=0.8.4;
/**
$$\ $$\ $$\ $$\ $$\ $$\
$$$\ $$$ | $$ | $$$\ $$$ | \__|
$$$$\ $$$$ | $$$$$$\ $$$$$$\ $$$$$$\ $$$$\ $$$$ | $$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\
$$\$$\$$ $$ |$$ __$$\\_$$ _| \____$$\ $$\$$\$$ $$ | \____$$\ $$ __$$\ $$ | \____$$\ $$ _____|$$ _____|
$$ \$$$ $$ |$$$$$$$$ | $$ | $$$$$$$ | $$ \$$$ $$ | $$$$$$$ |$$ | $$ |$$ | $$$$$$$ |$$ / \$$$$$$\
$$ |\$ /$$ |$$ ____| $$ |$$\ $$ __$$ | $$ |\$ /$$ |$$ __$$ |$$ | $$ |$$ |$$ __$$ |$$ | \____$$\
$$ | \_/ $$ |\$$$$$$$\ \$$$$ |\$$$$$$$ | $$ | \_/ $$ |\$$$$$$$ |$$ | $$ |$$ |\$$$$$$$ |\$$$$$$$\ $$$$$$$ |
\__| \__| \_______| \____/ \_______| \__| \__| \_______|\__| \__|\__| \_______| \_______|\_______/
by HLT
*/
contract MetaManiacs is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
bytes32 public merkleRoot;
address private _proxyRegistryAddress; // For OpenSea WhiteListing
address public withdrawAddress = 0xa0b3A364084A106b25a8b5132F0c00657F81bc82;
uint256 public immutable maxSupply = 10000;
uint256 public cost = 0.16 ether; // 160000000000000000 Wei
uint256 public preCost = 0.12 ether; // 120000000000000000 Wei
uint256 public maxMintAmountPerTx = 10;
uint256 public maxPerPresaleAddress = 3;
uint256 public reserveCount;
uint256 public reserveLimit = 100;
bool public paused;
bool public revealed;
bool public presale;
string private _uriPrefix;
string public uriSuffix;
string public uriHidden;
mapping(address => uint256) private _presaleClaimed;
constructor(
bytes32 _merkleRoot,
address proxyRegistryAddress,
string memory _uriHidden
) ERC721("Meta Maniacs", "MEMA") {
}
/**
* MINT FUNCTIONS
*/
// PRESALE
function mintPresale(
address account,
uint256 _mintAmount,
bytes32[] calldata merkleProof
) public payable mintCompliance(_mintAmount) {
// Verify the merkle proof.
bytes32 node = keccak256(
abi.encodePacked(account, maxPerPresaleAddress)
);
require(
MerkleProof.verify(merkleProof, merkleRoot, node),
"Invalid whitelist proof."
);
require(presale, "No presale minting currently.");
require(msg.value >= preCost * _mintAmount, "Insufficient funds.");
require(<FILL_ME>)
_mintLoop(account, _mintAmount);
_presaleClaimed[account] += _mintAmount;
}
// PUBLIC SALE
function mint(uint256 _mintAmount)
public
payable
mintCompliance(_mintAmount)
{
}
// MINT COMPLIANCE
modifier mintCompliance(uint256 _mintAmount) {
}
// MINT LOOP
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
// OWNER MINT
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount)
onlyOwner
{
}
/**
* GETTERS
*/
// GET TOKEN URI
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
// GET BASE URI (INTERNAL)
function _baseURI() internal view virtual override returns (string memory) {
}
// GET URI PREFIX
function getUriPrefix() public view onlyOwner returns (string memory) {
}
// GET OS PROXY ADDY
function getProxyRegistryAddress() public view onlyOwner returns (address) {
}
// GET SUPPLY
function totalSupply() public view returns (uint256) {
}
// RETURNS TOKEN IDS OF A WALLET ADDRESS
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
/**
* SETTERS
*/
// WL
// SET WL ROOT
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
// URIs
// SET UNREVEALED URI
function setUriHidden(string memory _uriHidden) public onlyOwner {
}
// SET URI PREFIX
function setUriPrefix(string memory uriPrefixNew) public onlyOwner {
}
// SET URI SUFFIX
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
// SET COST
function setCost(uint256 _cost) public onlyOwner {
}
// SET PRESALE COST
function setPreCost(uint256 _cost) public onlyOwner {
}
// SET RESERVE LIMIT
function setReserveLimit(uint256 _newLimit) public onlyOwner {
}
// SET MAX TOKENS PER ADDRESS FOR PRESALE
function setMaxPerPresaleAddress(uint256 _maxPerPresaleAddress)
public
onlyOwner
{
}
// SET TOKENS PER MINT TX
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx)
public
onlyOwner
{
}
// SET PAUSED
function setPaused(bool _state) public onlyOwner {
}
// SET PRESALE
function setPresale(bool _state) public onlyOwner {
}
// SET REVEALED
function setRevealed(bool _state) public onlyOwner {
}
// SET WITHDRAW ADDRESS
function setWithdrawAddress(address _withdrawAddress) public onlyOwner {
}
/**
* OPENSEA TRADING WHITELISTING
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
// SET OS WL ADDY
function setProxyRegistryAddress(address proxyRegistryAddress)
external
onlyOwner
{
}
// OVERRIDE
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
// WITHDRAW
function withdraw() public onlyOwner {
}
}
// For OpenSea WhiteListing
contract OwnableDelegateProxy {
}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| _presaleClaimed[account]+_mintAmount<=maxPerPresaleAddress,"Exceeds max mints for presale." | 326,999 | _presaleClaimed[account]+_mintAmount<=maxPerPresaleAddress |
"Exceeds max of 50 reserved." | pragma solidity >=0.8.4;
/**
$$\ $$\ $$\ $$\ $$\ $$\
$$$\ $$$ | $$ | $$$\ $$$ | \__|
$$$$\ $$$$ | $$$$$$\ $$$$$$\ $$$$$$\ $$$$\ $$$$ | $$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\
$$\$$\$$ $$ |$$ __$$\\_$$ _| \____$$\ $$\$$\$$ $$ | \____$$\ $$ __$$\ $$ | \____$$\ $$ _____|$$ _____|
$$ \$$$ $$ |$$$$$$$$ | $$ | $$$$$$$ | $$ \$$$ $$ | $$$$$$$ |$$ | $$ |$$ | $$$$$$$ |$$ / \$$$$$$\
$$ |\$ /$$ |$$ ____| $$ |$$\ $$ __$$ | $$ |\$ /$$ |$$ __$$ |$$ | $$ |$$ |$$ __$$ |$$ | \____$$\
$$ | \_/ $$ |\$$$$$$$\ \$$$$ |\$$$$$$$ | $$ | \_/ $$ |\$$$$$$$ |$$ | $$ |$$ |\$$$$$$$ |\$$$$$$$\ $$$$$$$ |
\__| \__| \_______| \____/ \_______| \__| \__| \_______|\__| \__|\__| \_______| \_______|\_______/
by HLT
*/
contract MetaManiacs is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
bytes32 public merkleRoot;
address private _proxyRegistryAddress; // For OpenSea WhiteListing
address public withdrawAddress = 0xa0b3A364084A106b25a8b5132F0c00657F81bc82;
uint256 public immutable maxSupply = 10000;
uint256 public cost = 0.16 ether; // 160000000000000000 Wei
uint256 public preCost = 0.12 ether; // 120000000000000000 Wei
uint256 public maxMintAmountPerTx = 10;
uint256 public maxPerPresaleAddress = 3;
uint256 public reserveCount;
uint256 public reserveLimit = 100;
bool public paused;
bool public revealed;
bool public presale;
string private _uriPrefix;
string public uriSuffix;
string public uriHidden;
mapping(address => uint256) private _presaleClaimed;
constructor(
bytes32 _merkleRoot,
address proxyRegistryAddress,
string memory _uriHidden
) ERC721("Meta Maniacs", "MEMA") {
}
/**
* MINT FUNCTIONS
*/
// PRESALE
function mintPresale(
address account,
uint256 _mintAmount,
bytes32[] calldata merkleProof
) public payable mintCompliance(_mintAmount) {
}
// PUBLIC SALE
function mint(uint256 _mintAmount)
public
payable
mintCompliance(_mintAmount)
{
}
// MINT COMPLIANCE
modifier mintCompliance(uint256 _mintAmount) {
}
// MINT LOOP
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
// OWNER MINT
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount)
onlyOwner
{
// Reserve limited implemented here. Set @ 50.
require(<FILL_ME>)
_mintLoop(_receiver, _mintAmount);
reserveCount += _mintAmount;
}
/**
* GETTERS
*/
// GET TOKEN URI
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
// GET BASE URI (INTERNAL)
function _baseURI() internal view virtual override returns (string memory) {
}
// GET URI PREFIX
function getUriPrefix() public view onlyOwner returns (string memory) {
}
// GET OS PROXY ADDY
function getProxyRegistryAddress() public view onlyOwner returns (address) {
}
// GET SUPPLY
function totalSupply() public view returns (uint256) {
}
// RETURNS TOKEN IDS OF A WALLET ADDRESS
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
/**
* SETTERS
*/
// WL
// SET WL ROOT
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
// URIs
// SET UNREVEALED URI
function setUriHidden(string memory _uriHidden) public onlyOwner {
}
// SET URI PREFIX
function setUriPrefix(string memory uriPrefixNew) public onlyOwner {
}
// SET URI SUFFIX
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
// SET COST
function setCost(uint256 _cost) public onlyOwner {
}
// SET PRESALE COST
function setPreCost(uint256 _cost) public onlyOwner {
}
// SET RESERVE LIMIT
function setReserveLimit(uint256 _newLimit) public onlyOwner {
}
// SET MAX TOKENS PER ADDRESS FOR PRESALE
function setMaxPerPresaleAddress(uint256 _maxPerPresaleAddress)
public
onlyOwner
{
}
// SET TOKENS PER MINT TX
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx)
public
onlyOwner
{
}
// SET PAUSED
function setPaused(bool _state) public onlyOwner {
}
// SET PRESALE
function setPresale(bool _state) public onlyOwner {
}
// SET REVEALED
function setRevealed(bool _state) public onlyOwner {
}
// SET WITHDRAW ADDRESS
function setWithdrawAddress(address _withdrawAddress) public onlyOwner {
}
/**
* OPENSEA TRADING WHITELISTING
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
// SET OS WL ADDY
function setProxyRegistryAddress(address proxyRegistryAddress)
external
onlyOwner
{
}
// OVERRIDE
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
// WITHDRAW
function withdraw() public onlyOwner {
}
}
// For OpenSea WhiteListing
contract OwnableDelegateProxy {
}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| reserveCount+_mintAmount<=reserveLimit,"Exceeds max of 50 reserved." | 326,999 | reserveCount+_mintAmount<=reserveLimit |
"start block already set" | pragma solidity 0.7.6;
contract ProxyCoin is ERC20Burnable, Ownable {
using SafeMath for uint256;
uint256 public perBlockSupply = 2391000 * 1e18;
uint256 public lastMintBlock;
uint256 public mintDuration = 210000;
address public treasuryWallet;
uint256 public mintCycle;
uint256 public mintCycleCap = 20;
bool public startBlockSet;
event MintDurationChanged(uint256 oldValue, uint256 newValue);
event MintCycleCapChanged(uint256 oldValue, uint256 newValue);
constructor (address _treasuryWallet, uint256 _lastMintBlock) ERC20("Proxy", "PRXY") {
}
function setStartBlock(uint256 _lastMintBlock) external onlyOwner {
require(<FILL_ME>)
lastMintBlock = _lastMintBlock;
startBlockSet = true;
}
function startMinting() external onlyOwner {
}
function mint(address addr, uint256 amount) public virtual onlyOwner {
}
function changeMintCycleCap(uint256 _mintCycleCap) external virtual onlyOwner {
}
function changeMintDuration(uint256 _mintDuration) external virtual onlyOwner {
}
function getBlockDifference() public view returns(uint256) {
}
function getMintingStatus() public view returns(bool) {
}
function mintingFinished() public view returns(bool) {
}
}
| !startBlockSet,"start block already set" | 327,075 | !startBlockSet |
"Err: Minting Finished" | pragma solidity 0.7.6;
contract ProxyCoin is ERC20Burnable, Ownable {
using SafeMath for uint256;
uint256 public perBlockSupply = 2391000 * 1e18;
uint256 public lastMintBlock;
uint256 public mintDuration = 210000;
address public treasuryWallet;
uint256 public mintCycle;
uint256 public mintCycleCap = 20;
bool public startBlockSet;
event MintDurationChanged(uint256 oldValue, uint256 newValue);
event MintCycleCapChanged(uint256 oldValue, uint256 newValue);
constructor (address _treasuryWallet, uint256 _lastMintBlock) ERC20("Proxy", "PRXY") {
}
function setStartBlock(uint256 _lastMintBlock) external onlyOwner {
}
function startMinting() external onlyOwner {
require(<FILL_ME>)
require(getMintingStatus(), "Err: Minting not allowed");
lastMintBlock = block.number;
perBlockSupply = (perBlockSupply * 9).div(10);
_mint(treasuryWallet, perBlockSupply);
}
function mint(address addr, uint256 amount) public virtual onlyOwner {
}
function changeMintCycleCap(uint256 _mintCycleCap) external virtual onlyOwner {
}
function changeMintDuration(uint256 _mintDuration) external virtual onlyOwner {
}
function getBlockDifference() public view returns(uint256) {
}
function getMintingStatus() public view returns(bool) {
}
function mintingFinished() public view returns(bool) {
}
}
| !mintingFinished(),"Err: Minting Finished" | 327,075 | !mintingFinished() |
"Err: Minting not allowed" | pragma solidity 0.7.6;
contract ProxyCoin is ERC20Burnable, Ownable {
using SafeMath for uint256;
uint256 public perBlockSupply = 2391000 * 1e18;
uint256 public lastMintBlock;
uint256 public mintDuration = 210000;
address public treasuryWallet;
uint256 public mintCycle;
uint256 public mintCycleCap = 20;
bool public startBlockSet;
event MintDurationChanged(uint256 oldValue, uint256 newValue);
event MintCycleCapChanged(uint256 oldValue, uint256 newValue);
constructor (address _treasuryWallet, uint256 _lastMintBlock) ERC20("Proxy", "PRXY") {
}
function setStartBlock(uint256 _lastMintBlock) external onlyOwner {
}
function startMinting() external onlyOwner {
require(!mintingFinished(), "Err: Minting Finished");
require(<FILL_ME>)
lastMintBlock = block.number;
perBlockSupply = (perBlockSupply * 9).div(10);
_mint(treasuryWallet, perBlockSupply);
}
function mint(address addr, uint256 amount) public virtual onlyOwner {
}
function changeMintCycleCap(uint256 _mintCycleCap) external virtual onlyOwner {
}
function changeMintDuration(uint256 _mintDuration) external virtual onlyOwner {
}
function getBlockDifference() public view returns(uint256) {
}
function getMintingStatus() public view returns(bool) {
}
function mintingFinished() public view returns(bool) {
}
}
| getMintingStatus(),"Err: Minting not allowed" | 327,075 | getMintingStatus() |
"INVALID_ADDRESS" | // SPDX-License-Identifier: BUSDL-1.1
pragma solidity 0.6.11;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/EnumerableSet.sol";
import {IAssetAllocation, INameIdentifier} from "contracts/common/Imports.sol";
import {IZap, ISwap} from "contracts/lpaccount/Imports.sol";
/**
* @notice Stores a set of addresses that can be looked up by name
* @notice Addresses can be added or removed dynamically
* @notice Useful for keeping track of unique deployed contracts
* @dev Each address must be a contract with a `NAME` constant for lookup
*/
// solhint-disable ordering
library NamedAddressSet {
using EnumerableSet for EnumerableSet.AddressSet;
struct Set {
EnumerableSet.AddressSet _namedAddresses;
mapping(string => INameIdentifier) _nameLookup;
}
struct AssetAllocationSet {
Set _inner;
}
struct ZapSet {
Set _inner;
}
struct SwapSet {
Set _inner;
}
function _add(Set storage set, INameIdentifier namedAddress) private {
require(<FILL_ME>)
require(
!set._namedAddresses.contains(address(namedAddress)),
"DUPLICATE_ADDRESS"
);
string memory name = namedAddress.NAME();
require(bytes(name).length != 0, "INVALID_NAME");
require(address(set._nameLookup[name]) == address(0), "DUPLICATE_NAME");
set._namedAddresses.add(address(namedAddress));
set._nameLookup[name] = namedAddress;
}
function _remove(Set storage set, string memory name) private {
}
function _contains(Set storage set, INameIdentifier namedAddress)
private
view
returns (bool)
{
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index)
private
view
returns (INameIdentifier)
{
}
function _get(Set storage set, string memory name)
private
view
returns (INameIdentifier)
{
}
function _names(Set storage set) private view returns (string[] memory) {
}
function add(
AssetAllocationSet storage set,
IAssetAllocation assetAllocation
) internal {
}
function remove(AssetAllocationSet storage set, string memory name)
internal
{
}
function contains(
AssetAllocationSet storage set,
IAssetAllocation assetAllocation
) internal view returns (bool) {
}
function length(AssetAllocationSet storage set)
internal
view
returns (uint256)
{
}
function at(AssetAllocationSet storage set, uint256 index)
internal
view
returns (IAssetAllocation)
{
}
function get(AssetAllocationSet storage set, string memory name)
internal
view
returns (IAssetAllocation)
{
}
function names(AssetAllocationSet storage set)
internal
view
returns (string[] memory)
{
}
function add(ZapSet storage set, IZap zap) internal {
}
function remove(ZapSet storage set, string memory name) internal {
}
function contains(ZapSet storage set, IZap zap)
internal
view
returns (bool)
{
}
function length(ZapSet storage set) internal view returns (uint256) {
}
function at(ZapSet storage set, uint256 index)
internal
view
returns (IZap)
{
}
function get(ZapSet storage set, string memory name)
internal
view
returns (IZap)
{
}
function names(ZapSet storage set) internal view returns (string[] memory) {
}
function add(SwapSet storage set, ISwap swap) internal {
}
function remove(SwapSet storage set, string memory name) internal {
}
function contains(SwapSet storage set, ISwap swap)
internal
view
returns (bool)
{
}
function length(SwapSet storage set) internal view returns (uint256) {
}
function at(SwapSet storage set, uint256 index)
internal
view
returns (ISwap)
{
}
function get(SwapSet storage set, string memory name)
internal
view
returns (ISwap)
{
}
function names(SwapSet storage set)
internal
view
returns (string[] memory)
{
}
}
// solhint-enable ordering
| Address.isContract(address(namedAddress)),"INVALID_ADDRESS" | 327,315 | Address.isContract(address(namedAddress)) |
"DUPLICATE_ADDRESS" | // SPDX-License-Identifier: BUSDL-1.1
pragma solidity 0.6.11;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/EnumerableSet.sol";
import {IAssetAllocation, INameIdentifier} from "contracts/common/Imports.sol";
import {IZap, ISwap} from "contracts/lpaccount/Imports.sol";
/**
* @notice Stores a set of addresses that can be looked up by name
* @notice Addresses can be added or removed dynamically
* @notice Useful for keeping track of unique deployed contracts
* @dev Each address must be a contract with a `NAME` constant for lookup
*/
// solhint-disable ordering
library NamedAddressSet {
using EnumerableSet for EnumerableSet.AddressSet;
struct Set {
EnumerableSet.AddressSet _namedAddresses;
mapping(string => INameIdentifier) _nameLookup;
}
struct AssetAllocationSet {
Set _inner;
}
struct ZapSet {
Set _inner;
}
struct SwapSet {
Set _inner;
}
function _add(Set storage set, INameIdentifier namedAddress) private {
require(Address.isContract(address(namedAddress)), "INVALID_ADDRESS");
require(<FILL_ME>)
string memory name = namedAddress.NAME();
require(bytes(name).length != 0, "INVALID_NAME");
require(address(set._nameLookup[name]) == address(0), "DUPLICATE_NAME");
set._namedAddresses.add(address(namedAddress));
set._nameLookup[name] = namedAddress;
}
function _remove(Set storage set, string memory name) private {
}
function _contains(Set storage set, INameIdentifier namedAddress)
private
view
returns (bool)
{
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index)
private
view
returns (INameIdentifier)
{
}
function _get(Set storage set, string memory name)
private
view
returns (INameIdentifier)
{
}
function _names(Set storage set) private view returns (string[] memory) {
}
function add(
AssetAllocationSet storage set,
IAssetAllocation assetAllocation
) internal {
}
function remove(AssetAllocationSet storage set, string memory name)
internal
{
}
function contains(
AssetAllocationSet storage set,
IAssetAllocation assetAllocation
) internal view returns (bool) {
}
function length(AssetAllocationSet storage set)
internal
view
returns (uint256)
{
}
function at(AssetAllocationSet storage set, uint256 index)
internal
view
returns (IAssetAllocation)
{
}
function get(AssetAllocationSet storage set, string memory name)
internal
view
returns (IAssetAllocation)
{
}
function names(AssetAllocationSet storage set)
internal
view
returns (string[] memory)
{
}
function add(ZapSet storage set, IZap zap) internal {
}
function remove(ZapSet storage set, string memory name) internal {
}
function contains(ZapSet storage set, IZap zap)
internal
view
returns (bool)
{
}
function length(ZapSet storage set) internal view returns (uint256) {
}
function at(ZapSet storage set, uint256 index)
internal
view
returns (IZap)
{
}
function get(ZapSet storage set, string memory name)
internal
view
returns (IZap)
{
}
function names(ZapSet storage set) internal view returns (string[] memory) {
}
function add(SwapSet storage set, ISwap swap) internal {
}
function remove(SwapSet storage set, string memory name) internal {
}
function contains(SwapSet storage set, ISwap swap)
internal
view
returns (bool)
{
}
function length(SwapSet storage set) internal view returns (uint256) {
}
function at(SwapSet storage set, uint256 index)
internal
view
returns (ISwap)
{
}
function get(SwapSet storage set, string memory name)
internal
view
returns (ISwap)
{
}
function names(SwapSet storage set)
internal
view
returns (string[] memory)
{
}
}
// solhint-enable ordering
| !set._namedAddresses.contains(address(namedAddress)),"DUPLICATE_ADDRESS" | 327,315 | !set._namedAddresses.contains(address(namedAddress)) |
"DUPLICATE_NAME" | // SPDX-License-Identifier: BUSDL-1.1
pragma solidity 0.6.11;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/EnumerableSet.sol";
import {IAssetAllocation, INameIdentifier} from "contracts/common/Imports.sol";
import {IZap, ISwap} from "contracts/lpaccount/Imports.sol";
/**
* @notice Stores a set of addresses that can be looked up by name
* @notice Addresses can be added or removed dynamically
* @notice Useful for keeping track of unique deployed contracts
* @dev Each address must be a contract with a `NAME` constant for lookup
*/
// solhint-disable ordering
library NamedAddressSet {
using EnumerableSet for EnumerableSet.AddressSet;
struct Set {
EnumerableSet.AddressSet _namedAddresses;
mapping(string => INameIdentifier) _nameLookup;
}
struct AssetAllocationSet {
Set _inner;
}
struct ZapSet {
Set _inner;
}
struct SwapSet {
Set _inner;
}
function _add(Set storage set, INameIdentifier namedAddress) private {
require(Address.isContract(address(namedAddress)), "INVALID_ADDRESS");
require(
!set._namedAddresses.contains(address(namedAddress)),
"DUPLICATE_ADDRESS"
);
string memory name = namedAddress.NAME();
require(bytes(name).length != 0, "INVALID_NAME");
require(<FILL_ME>)
set._namedAddresses.add(address(namedAddress));
set._nameLookup[name] = namedAddress;
}
function _remove(Set storage set, string memory name) private {
}
function _contains(Set storage set, INameIdentifier namedAddress)
private
view
returns (bool)
{
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index)
private
view
returns (INameIdentifier)
{
}
function _get(Set storage set, string memory name)
private
view
returns (INameIdentifier)
{
}
function _names(Set storage set) private view returns (string[] memory) {
}
function add(
AssetAllocationSet storage set,
IAssetAllocation assetAllocation
) internal {
}
function remove(AssetAllocationSet storage set, string memory name)
internal
{
}
function contains(
AssetAllocationSet storage set,
IAssetAllocation assetAllocation
) internal view returns (bool) {
}
function length(AssetAllocationSet storage set)
internal
view
returns (uint256)
{
}
function at(AssetAllocationSet storage set, uint256 index)
internal
view
returns (IAssetAllocation)
{
}
function get(AssetAllocationSet storage set, string memory name)
internal
view
returns (IAssetAllocation)
{
}
function names(AssetAllocationSet storage set)
internal
view
returns (string[] memory)
{
}
function add(ZapSet storage set, IZap zap) internal {
}
function remove(ZapSet storage set, string memory name) internal {
}
function contains(ZapSet storage set, IZap zap)
internal
view
returns (bool)
{
}
function length(ZapSet storage set) internal view returns (uint256) {
}
function at(ZapSet storage set, uint256 index)
internal
view
returns (IZap)
{
}
function get(ZapSet storage set, string memory name)
internal
view
returns (IZap)
{
}
function names(ZapSet storage set) internal view returns (string[] memory) {
}
function add(SwapSet storage set, ISwap swap) internal {
}
function remove(SwapSet storage set, string memory name) internal {
}
function contains(SwapSet storage set, ISwap swap)
internal
view
returns (bool)
{
}
function length(SwapSet storage set) internal view returns (uint256) {
}
function at(SwapSet storage set, uint256 index)
internal
view
returns (ISwap)
{
}
function get(SwapSet storage set, string memory name)
internal
view
returns (ISwap)
{
}
function names(SwapSet storage set)
internal
view
returns (string[] memory)
{
}
}
// solhint-enable ordering
| address(set._nameLookup[name])==address(0),"DUPLICATE_NAME" | 327,315 | address(set._nameLookup[name])==address(0) |
null | pragma solidity ^0.4.21;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
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 c) {
}
}
/**
* @title Owned Interface
* @dev Owned is interface for owner contract
*/
contract Owned {
constructor() public { }
address owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/**
* @title InitialMoneyTokenIMT Interface
* @dev InitialMoneyTokenIMT is a token ERC20 contract for MoneyTokenIMT (MoneyTokenIMT.com)
*/
contract IMoneyTokenIMTInterface is Owned {
/** total amount of tokens **/
uint256 public totalSupply;
/**
* @param _owner The address from which the balance will be retrieved
* @return The balance
**/
function balanceOf(address _owner) public view returns (uint256 balance);
/** @notice send `_value` token to `_to` from `msg.sender`
* @param _to The address of the recipient
* @param _value The amount of token to be transferred
* @return Whether the transfer was successful or not
**/
function transfer(address _to, uint256 _value) public returns (bool success);
/**
* @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value The amount of token to be transferred
* @return Whether the transfer was successful or not
**/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/**
* @notice `msg.sender` approves `_spender` to spend `_value` tokens
* @param _spender The address of the account able to transfer the tokens
* @param _value The amount of tokens to be approved for transfer
* @return Whether the approval was successful or not
**/
function approve(address _spender, uint256 _value) public returns (bool success);
/** @param _owner The address of the account owning tokens
* @param _spender The address of the account able to transfer the tokens
* @return Amount of remaining tokens allowed to spent
**/
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
// solhint-disable-next-line no-simple-event-func-name
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/**
* @title InitialMoneyTokenIMT
* @dev InitialMoneyTokenIMT is a token ERC20 contract for MoneyTokenIMT (MoneyTokenIMT.com)
*/
contract InitialMoneyTokenIMT is IMoneyTokenIMTInterface {
using SafeMath for uint256;
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
//specific events
event Burn(address indexed burner, uint256 value);
string public name; //Initial Money Token
uint8 public decimals; //18
string public symbol; //IMT
constructor (
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) public {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function burn(uint256 _value) public onlyOwner returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
/**
* Specific functins for contract
**/
//resend any tokens
function transferAnyERC20Token(address tokenAddress, uint256 tokens) public onlyOwner returns (bool success){
}
/**
* internal functions
**/
//burn function
function _burn(address _who, uint256 _value) internal returns (bool success) {
}
function _transfer(address _from, address _to, uint256 _value) internal returns (bool success) {
}
function _transferFrom(address _who, address _from, address _to, uint256 _value) internal returns (bool success) {
uint256 allow = allowed[_from][_who];
require(<FILL_ME>)
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
allowed[_from][_who] = allowed[_from][_who].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
}
| balances[_from]>=_value&&allow>=_value | 327,481 | balances[_from]>=_value&&allow>=_value |
"Vesting: not enough time" | pragma solidity ^0.6.12;
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract SATVesting is Ownable {
using SafeMath for uint256;
using Address for address;
IERC20 _token;
bool public paused;
mapping (address => uint256) public _amounts;
mapping (address => uint256) public _balances;
mapping (address => uint256) public _cliffs;
mapping (address => uint256) public _lasts;
mapping (address => uint256) public _lastClaim;
event Claim(address indexed account, uint256 timestamp, uint256 amount);
constructor(address _tokenAdd) public {
}
function vestedTokens(address account) public view returns (uint256) {
}
function addVesters(address [] memory owners, uint256 [] memory amounts, uint256 [] memory cliffs, uint256 [] memory durations) external onlyOwner() {
}
function emergencyPause(bool _state) external onlyOwner() {
}
function emergencyWithdraw() external onlyOwner() {
}
function claimVestedTokens() external notPaused {
require(<FILL_ME>)
uint256 vested = vestedTokens(_msgSender());
require(vested > 0 && _balances[_msgSender()] > 0, "Vesting: No vested tokens");
_lastClaim[_msgSender()] = now;
if (_balances[_msgSender()] < vested) {
vested = _balances[_msgSender()];
}
_balances[_msgSender()] = _balances[_msgSender()].sub(vested);
_token.transfer(_msgSender(), vested);
emit Claim(_msgSender(),now,vested);
}
modifier notPaused() {
}
}
| _lastClaim[_msgSender()]<now,"Vesting: not enough time" | 327,583 | _lastClaim[_msgSender()]<now |
null | pragma solidity ^0.4.18;
// ----------------------------------------------------------------------------
// SencTokenSale - SENC Token Sale Contract
//
// Copyright (c) 2018 InfoCorp Technologies Pte Ltd.
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// The SENC token is an ERC20 token that:
// 1. Token is paused by default and is only allowed to be unpaused once the
// Vesting contract is activated.
// 2. Tokens are created on demand up to TOTALSUPPLY or until minting is
// disabled.
// 3. Token can airdropped to a group of recipients as long as the contract
// has sufficient balance.
// ----------------------------------------------------------------------------
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function pause() onlyOwner whenNotPaused public {
}
function unpause() onlyOwner whenPaused public {
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
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 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 OperatableBasic {
function setPrimaryOperator (address addr) public;
function setSecondaryOperator (address addr) public;
function isPrimaryOperator(address addr) public view returns (bool);
function isSecondaryOperator(address addr) public view returns (bool);
}
contract Operatable is Ownable, OperatableBasic {
address public primaryOperator;
address public secondaryOperator;
modifier canOperate() {
}
function Operatable() public {
}
function setPrimaryOperator (address addr) public onlyOwner {
}
function setSecondaryOperator (address addr) public onlyOwner {
}
function isPrimaryOperator(address addr) public view returns (bool) {
}
function isSecondaryOperator(address addr) public view returns (bool) {
}
}
contract Salvageable is Operatable {
// Salvage other tokens that are accidentally sent into this token
function emergencyERC20Drain(ERC20 oddToken, uint amount) public canOperate {
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SencTokenConfig {
string public constant NAME = "Cultural sports ecology chain";
string public constant SYMBOL = "CSC";
uint8 public constant DECIMALS = 18;
uint public constant DECIMALSFACTOR = 10 ** uint(DECIMALS);
uint public constant TOTALSUPPLY = 990000000 * DECIMALSFACTOR;
}
contract SencToken is PausableToken, SencTokenConfig, Salvageable {
using SafeMath for uint;
string public name = NAME;
string public symbol = SYMBOL;
uint8 public decimals = DECIMALS;
bool public mintingFinished = false;
event Mint(address indexed to, uint amount);
event MintFinished();
modifier canMint() {
}
function SencToken() public {
}
function pause() onlyOwner public {
}
function unpause() onlyOwner public {
}
function mint(address _to, uint _amount) onlyOwner canMint public returns (bool) {
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 canMint public returns (bool) {
}
// Airdrop tokens from bounty wallet to contributors as long as there are enough balance
function airdrop(address bountyWallet, address[] dests, uint[] values) public onlyOwner returns (uint) {
}
}
| totalSupply_.add(_amount)<=TOTALSUPPLY | 327,673 | totalSupply_.add(_amount)<=TOTALSUPPLY |
"ERR_ALLOWED_ADDRESS_ONLY" | // SPDX-License-Identifier: No License (None)
pragma solidity ^0.6.9;
import "./SafeMath.sol";
import "./Ownable.sol";
import "./provableAPI_0.6.sol";
interface IGateway {
function validatorCallback(uint256 requestId, address tokenForeign, address user, uint256 balanceForeign) external returns(bool);
}
interface ICompanyOracle {
function getBalance(uint256 network, address token, address user) external returns(uint256);
}
contract Validator is Ownable, usingProvable {
using SafeMath for uint256;
struct Request {
uint32 network;
uint32 approves;
address sender;
address tokenForeign;
address user;
uint256 balanceForeign;
}
Request[] public requests;
mapping(address => bool) public isAllowedAddress;
uint32 public approves_required = 1;
address public companyOracle;
mapping (uint256 => uint256) public companyOracleRequests; // companyOracleRequest ID => requestId
mapping (bytes32 => uint256) public provableOracleRequests; // provableOracleRequests ID => requestId
uint256 public customGasPrice;
uint256 public gasLimit = 80000;
constructor () public {
}
function setApproves_required(uint32 n) external onlyOwner returns(bool) {
}
function setCompanyOracle(address _addr) external onlyOwner returns(bool) {
}
function changeAllowedAddress(address _which,bool _bool) external onlyOwner returns(bool){
}
function checkBalance(uint256 network, address tokenForeign, address user) external returns(uint256 requestId) {
require(<FILL_ME>)
requestId = requests.length;
requests.push(Request(uint32(network),0,msg.sender,tokenForeign,user,0));
//uint256 myId = ICompanyOracle(companyOracle).getBalance(network, tokenForeign, user);
//companyOracleRequests[myId] = requestId;
_provable_request(requestId, network, tokenForeign, user);
}
function oracleCallback(uint256 requestId, uint256 balance) external returns(bool) {
}
function _oracleResponse(uint256 requestId, uint256 balance) internal {
}
function setCustomGasPrice(uint amount) external returns (bool) {
}
function setGasLimit(uint amount) external returns (bool) {
}
function withdraw(uint amount) external returns (bool) {
}
receive() external payable {}
function __callback(bytes32 myid, string memory result) public override {
}
function _provable_request(uint256 requestId, uint256 network, address tokenForeign, address user) internal {
}
// Converts address to hex string
function _address2hex(address addr) internal pure returns (string memory) {
}
}
| isAllowedAddress[msg.sender],"ERR_ALLOWED_ADDRESS_ONLY" | 327,721 | isAllowedAddress[msg.sender] |
"Insufficient balance" | // SPDX-License-Identifier: No License (None)
pragma solidity ^0.6.9;
import "./SafeMath.sol";
import "./Ownable.sol";
import "./provableAPI_0.6.sol";
interface IGateway {
function validatorCallback(uint256 requestId, address tokenForeign, address user, uint256 balanceForeign) external returns(bool);
}
interface ICompanyOracle {
function getBalance(uint256 network, address token, address user) external returns(uint256);
}
contract Validator is Ownable, usingProvable {
using SafeMath for uint256;
struct Request {
uint32 network;
uint32 approves;
address sender;
address tokenForeign;
address user;
uint256 balanceForeign;
}
Request[] public requests;
mapping(address => bool) public isAllowedAddress;
uint32 public approves_required = 1;
address public companyOracle;
mapping (uint256 => uint256) public companyOracleRequests; // companyOracleRequest ID => requestId
mapping (bytes32 => uint256) public provableOracleRequests; // provableOracleRequests ID => requestId
uint256 public customGasPrice;
uint256 public gasLimit = 80000;
constructor () public {
}
function setApproves_required(uint32 n) external onlyOwner returns(bool) {
}
function setCompanyOracle(address _addr) external onlyOwner returns(bool) {
}
function changeAllowedAddress(address _which,bool _bool) external onlyOwner returns(bool){
}
function checkBalance(uint256 network, address tokenForeign, address user) external returns(uint256 requestId) {
}
function oracleCallback(uint256 requestId, uint256 balance) external returns(bool) {
}
function _oracleResponse(uint256 requestId, uint256 balance) internal {
}
function setCustomGasPrice(uint amount) external returns (bool) {
}
function setGasLimit(uint amount) external returns (bool) {
}
function withdraw(uint amount) external returns (bool) {
}
receive() external payable {}
function __callback(bytes32 myid, string memory result) public override {
}
function _provable_request(uint256 requestId, uint256 network, address tokenForeign, address user) internal {
require(<FILL_ME>)
//string memory a = "json(https://api-testnet.bscscan.com/api?module=account&action=tokenbalance&contractaddress=0x";
string memory a = "json(https://api.bscscan.com/api?module=account&action=tokenbalance&contractaddress=0x";
string memory b = "&address=0x";
string memory c = "&tag=latest).result";
string memory s = strConcat(a,_address2hex(tokenForeign),b,_address2hex(user),c);
bytes32 myid = provable_query("URL", s, gasLimit);
provableOracleRequests[myid] = requestId;
}
// Converts address to hex string
function _address2hex(address addr) internal pure returns (string memory) {
}
}
| provable_getPrice("URL")<=address(this).balance,"Insufficient balance" | 327,721 | provable_getPrice("URL")<=address(this).balance |
null | pragma solidity ^0.4.24;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
* @notice https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
*/
library SafeMath {
/**
* SafeMath mul function
* @dev function for safe multiply, throws on overflow.
**/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* SafeMath div funciotn
* @dev function for safe devide, throws on overflow.
**/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* SafeMath sub function
* @dev function for safe subtraction, throws on overflow.
**/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* SafeMath add function
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title 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 Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
}
/**
* @title Pausable token
* @dev StandardToken modified with pausable transfers.
**/
contract CucunToken is StandardToken, Ownable {
string public name;// = "Cucu Token";
string public symbol;// = "CUCU";
uint256 public decimals;// = 8;
uint256 public initial_supply;// = 100000000000;// 1000 억
uint lastActionId = 0;
bool public isPauseOn = false;
modifier ifNotPaused(){
require(<FILL_ME>)
_;
}
function _doPause(uint act) public{
}
function _doUnpause(uint act) public{
}
/**
* @dev Transfer tokens when not paused
**/
function transfer(address _to, uint256 _value) public ifNotPaused returns (bool) {
}
/**
* @dev transferFrom function to tansfer tokens when token is not paused
**/
function transferFrom(address _from, address _to, uint256 _value) public ifNotPaused returns (bool) {
}
/**
* @dev approve spender when not paused
**/
function approve(address _spender, uint256 _value) public ifNotPaused returns (bool) {
}
/**
* @dev increaseApproval of spender when not paused
**/
function increaseApproval(address _spender, uint _addedValue) public ifNotPaused returns (bool success) {
}
/**
* @dev decreaseApproval of spender when not paused
**/
function decreaseApproval(address _spender, uint _subtractedValue) public ifNotPaused returns (bool success) {
}
// Mint more tokens
function _mint(uint mint_amt) public onlyOwner{
}
/**
* Pausable Token Constructor
* @dev Create and issue tokens to msg.sender.
*/
constructor() public {
}
}
| !isPauseOn||msg.sender==owner | 327,807 | !isPauseOn||msg.sender==owner |
"Supply limit reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title ERC721TradableNumis
* ERC721TradableNumis - ERC721 contract that whitelists a trading address, and has minting functionality.
*/
abstract contract ERC721TradableNumis is ContextMixin, ERC721Enumerable, NativeMetaTransaction, Ownable {
using SafeMath for uint256;
address proxyRegistryAddress;
uint256 internal _currentTokenId;
uint256 public constant maximumPieces = 900;
event Unveiled(uint256 tokenId, address receiver);
constructor(
string memory _name,
string memory _symbol,
address _proxyRegistryAddress
) ERC721(_name, _symbol) {
}
function remaining() public view returns (uint256 _remaining) {
}
/**
* @dev Mints a token to an address with a tokenURI.
* @param _to address of the future owner of the token
*/
function mintTo(address _to) internal {
require(<FILL_ME>)
uint256 newTokenId = _getNextTokenId();
_mint(_to, newTokenId);
_incrementTokenId();
emit Unveiled(newTokenId, _to);
}
/**
* @dev calculates the next token ID based on value of _currentTokenId
* @return uint256 for the next token ID
*/
function _getNextTokenId() private view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenId
*/
function _incrementTokenId() private {
}
function baseTokenURI() virtual public view returns (string memory);
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override
public
view
returns (bool)
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender()
internal
override
view
returns (address sender)
{
}
}
| remaining()>0,"Supply limit reached" | 327,882 | remaining()>0 |
"Can-not-transfer" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC20.sol";
import "./ERC20Capped.sol";
import "./ERC20Burnable.sol";
import "./Ownable.sol";
contract DSCVR is ERC20, ERC20Capped, ERC20Burnable, Ownable {
uint256 public constant HARD_CAP = 100_000 * (10 ** 18); // 100k tokens
bool allowTransfer;
mapping (address => bool) public whiteListTransfer;
modifier isUnlocked() {
require(<FILL_ME>)
_;
}
/**
* @dev Constructor function of DSCVR Token
* @dev set name, symbol and decimal of token
* @dev mint hardcap to deployer
*/
constructor() public
ERC20("DSCVR", "DSCVR")
ERC20Capped(HARD_CAP) {
}
/**
* @dev Admin whitelist/un-whitelist transfer
* @dev to allow address transfer
* @dev token before allowTransferOn
*/
function adminWhiteList(address _whitelistAddr, bool _whiteList) public onlyOwner returns (bool) {
}
/**
* @dev Admin can set allowTransfer to allow user transfer token normally
*/
function adminUnlockTransfer() public onlyOwner returns (bool) {
}
function transfer(address to, uint amount) public isUnlocked override(ERC20) returns (bool) {
}
function transferFrom(address from, address to, uint amount) public isUnlocked override(ERC20) returns (bool) {
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped) {
}
}
| allowTransfer||whiteListTransfer[msg.sender],"Can-not-transfer" | 327,891 | allowTransfer||whiteListTransfer[msg.sender] |
"Already-allowed" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC20.sol";
import "./ERC20Capped.sol";
import "./ERC20Burnable.sol";
import "./Ownable.sol";
contract DSCVR is ERC20, ERC20Capped, ERC20Burnable, Ownable {
uint256 public constant HARD_CAP = 100_000 * (10 ** 18); // 100k tokens
bool allowTransfer;
mapping (address => bool) public whiteListTransfer;
modifier isUnlocked() {
}
/**
* @dev Constructor function of DSCVR Token
* @dev set name, symbol and decimal of token
* @dev mint hardcap to deployer
*/
constructor() public
ERC20("DSCVR", "DSCVR")
ERC20Capped(HARD_CAP) {
}
/**
* @dev Admin whitelist/un-whitelist transfer
* @dev to allow address transfer
* @dev token before allowTransferOn
*/
function adminWhiteList(address _whitelistAddr, bool _whiteList) public onlyOwner returns (bool) {
}
/**
* @dev Admin can set allowTransfer to allow user transfer token normally
*/
function adminUnlockTransfer() public onlyOwner returns (bool) {
require(<FILL_ME>)
allowTransfer = true;
return true;
}
function transfer(address to, uint amount) public isUnlocked override(ERC20) returns (bool) {
}
function transferFrom(address from, address to, uint amount) public isUnlocked override(ERC20) returns (bool) {
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped) {
}
}
| !allowTransfer,"Already-allowed" | 327,891 | !allowTransfer |
null | contract InsightsNetwork3 is InsightsNetwork2Base {
function importBalanceOf(address account) public onlyOwner canMint returns (bool) {
require(<FILL_ME>)
InsightsNetwork2Base source = InsightsNetwork2Base(predecessor);
uint256 amount = source.balanceOf(account);
require(amount > 0);
imported[account] = true;
for (uint index = 0; amount > 0; index++) {
uint256 mintAmount = source.lockedBalances(account, index);
uint256 unlockTime = source.unlockTimes(account, index);
Import(account, mintAmount, unlockTime);
assert(mintUnlockTime(account, mintAmount, unlockTime));
amount -= mintAmount;
}
return true;
}
function predecessorDeactivated(address _predecessor) internal onlyOwner returns (bool) {
}
}
| !imported[account] | 327,911 | !imported[account] |
null | pragma solidity 0.5.16;
contract Event {
using SafeMath for uint256;
bytes5 constant public version = "2.2.1";
uint8 constant private CLAPS_PER_ATTENDEE = 100;
uint8 constant private MAX_ATTENDEES = 50;
uint8 constant private ATTENDEE_UNREGISTERED = 0;
uint8 constant private ATTENDEE_REGISTERED = 1;
uint8 constant private ATTENDEE_CLAPPED = 2;
bool distributionMade;
uint64 public fee;
uint32 public end;
address payable[] private attendees;
mapping(address => uint8) public states;
mapping(address => uint256) public claps;
uint256 public totalClaps;
event Distribution (uint256 totalReward);
event Transfer (address indexed attendee, uint256 reward);
constructor (uint64 _fee, uint32 _end) public {
}
function getAttendees () external view returns (address payable[] memory) {
}
function register (address payable _attendee, uint256 _fee) internal {
require(_fee == fee);
require(<FILL_ME>)
require(attendees.length < MAX_ATTENDEES);
require(block.timestamp < end);
states[_attendee] = ATTENDEE_REGISTERED;
attendees.push(_attendee);
claps[_attendee] = 1;
totalClaps += 1;
}
function register () external payable {
}
function clap (
address _clapper,
address[] memory _attendees,
uint256[] memory _claps
) internal {
}
function clap (address[] calldata _attendees, uint256[] calldata _claps)
external {
}
function distribute () external {
}
}
| states[_attendee]==ATTENDEE_UNREGISTERED | 327,919 | states[_attendee]==ATTENDEE_UNREGISTERED |
null | pragma solidity 0.5.16;
contract Event {
using SafeMath for uint256;
bytes5 constant public version = "2.2.1";
uint8 constant private CLAPS_PER_ATTENDEE = 100;
uint8 constant private MAX_ATTENDEES = 50;
uint8 constant private ATTENDEE_UNREGISTERED = 0;
uint8 constant private ATTENDEE_REGISTERED = 1;
uint8 constant private ATTENDEE_CLAPPED = 2;
bool distributionMade;
uint64 public fee;
uint32 public end;
address payable[] private attendees;
mapping(address => uint8) public states;
mapping(address => uint256) public claps;
uint256 public totalClaps;
event Distribution (uint256 totalReward);
event Transfer (address indexed attendee, uint256 reward);
constructor (uint64 _fee, uint32 _end) public {
}
function getAttendees () external view returns (address payable[] memory) {
}
function register (address payable _attendee, uint256 _fee) internal {
}
function register () external payable {
}
function clap (
address _clapper,
address[] memory _attendees,
uint256[] memory _claps
) internal {
require(distributionMade == false);
require(<FILL_ME>)
require(_attendees.length == _claps.length);
states[_clapper] = ATTENDEE_CLAPPED;
uint256 givenClaps;
for (uint256 i; i < _attendees.length; i = i.add(1)) {
givenClaps = givenClaps.add(_claps[i]);
if (_attendees[i] == _clapper) continue;
if (states[_attendees[i]] == ATTENDEE_UNREGISTERED) continue;
claps[_attendees[i]] = claps[_attendees[i]].add(_claps[i]);
}
require(givenClaps <= CLAPS_PER_ATTENDEE);
totalClaps = totalClaps.add(givenClaps);
}
function clap (address[] calldata _attendees, uint256[] calldata _claps)
external {
}
function distribute () external {
}
}
| states[_clapper]==ATTENDEE_REGISTERED | 327,919 | states[_clapper]==ATTENDEE_REGISTERED |
null | /**
*Submitted for verification at Etherscan.io on 2019-10-30
*/
/**
* ____ __ __ __ __
* / __ / \.\/./ \.\/./
* / /__ //\\ //\\
* \___ / /_/ \_\ /_/ \_\
*
*
*
* https://cxx.global/
* https://cxx.global/exchange
*
*
* ====================================*
* No guarantees are given.
* Please be careful and doublecheck when interacting with the contract
*
*/
pragma solidity ^0.4.20;
contract CxxMain {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
}
// only people with profits
modifier onlyStronghands() {
}
modifier checkExchangeOpen(uint256 _amountOfEthereum){
if( exchangeClosed ){
require(<FILL_ME>)
isInHelloCXX_[msg.sender] = false;
helloCount = SafeMath.sub(helloCount,1);
if(helloCount == 0){
exchangeClosed = false;
}
}
_;
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "CXX Token";
string public symbol = "CXX";
uint8 constant public decimals = 18;
uint8 constant internal buyFee_ = 3;//33%
uint8 constant internal sellFee_ = 3;//33%
uint8 constant internal transferFee_ = 10;
uint8 constant internal roiFee_ = 3; //3%
uint8 constant internal roiRate_ = 50; //2%
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
uint256 internal tokenSupply_ = 0;
uint256 internal helloCount = 0;
uint256 internal profitPerShare_;
uint256 public stakingRequirement = 50 ether;
uint256 public totalTradingVolume = 0;
uint256 public totalDividends = 0;
uint256 public roiPool = 0;
uint256 public checkinCount = 0;
address internal devAddress_;
/*================================
= DATASETS =
================================*/
struct ReferralData {
address affFrom;
uint256 tierInvest1Sum;
uint256 tierInvest2Sum;
uint256 tierInvest3Sum;
uint256 affCount1Sum; //3 level
uint256 affCount2Sum;
uint256 affCount3Sum;
}
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => bool) internal isInHelloCXX_;
mapping(address => ReferralData) public referralData;
bool public exchangeClosed = true;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
function CxxToken()
public
{
}
function dailyCheckin()
public
{
}
function distributedRoi() public {
}
/**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
/**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyStronghands()
public
{
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyStronghands()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlyBagholders()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlyBagholders()
public
returns(bool)
{
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
function disableInitialStage()
public
{
}
function setStakingRequirement(uint256 _amountOfTokens)
public
{
}
function helloCXX(address _address, bool _status,uint8 _count)
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance()
public
view
returns(uint)
{
}
function isOwner()
public
view
returns(bool)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
*/
function myDividends(bool _includeReferralBonus)
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
function roiDistribution(uint256 _incomingEthereum, address _referredBy) internal returns (uint256) {
}
/**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(uint256 _incomingEthereum, address _referredBy)
checkExchangeOpen(_incomingEthereum)
internal
returns(uint256)
{
}
function registerUser(address _msgSender, address _affFrom)
internal
{
}
function distributeReferral(address _msgSender, uint256 _allaff,uint256 _incomingEthereum)
internal
{
}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
//This is where all your gas goes, sorry
//Not sorry, you probably only paid 1 gwei
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
| isInHelloCXX_[msg.sender] | 328,050 | isInHelloCXX_[msg.sender] |
null | pragma solidity ^0.4.23;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title ERC20 interface (only needed methods)
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 {
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/**
* @title QWoodDAOTokenSale
* @dev The QWoodDAOTokenSale contract receive ether and other foreign tokens and exchange them to set tokens.
*/
contract QWoodDAOTokenSale is Pausable {
using SafeMath for uint256;
// Represents data of foreign token which can be exchange to token
struct ReceivedToken {
// name of foreign token
string name;
// number of token units a buyer gets per foreign token unit
uint256 rate;
// amount of raised foreign tokens
uint256 raised;
}
// The token being sold
ERC20 public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei.
// The rate is the conversion between wei and the smallest and indivisible token unit.
// So, if you are using a rate of 1 with a ERC20 token with 3 decimals called TOK
// 1 wei will give you 1 unit, or 0.001 TOK.
uint256 public rate;
// Amount of wei raised
uint256 public weiRaised;
// Map from token address to token data
mapping (address => ReceivedToken) public receivedTokens;
/**
* 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
);
/**
* Event for token purchase for token logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value foreign tokens units paid for purchase
* @param amount amount of tokens purchased
*/
event TokenForTokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint256 value,
uint256 amount
);
/**
* Event for change rate logging
* @param newRate new number of token units a buyer gets per wei
*/
event ChangeRate(uint256 newRate);
/**
* Event for add received token logging
* @param tokenAddress address of added foreign token
* @param name name of added token
* @param rate number of token units a buyer gets per added foreign token unit
*/
event AddReceivedToken(
address indexed tokenAddress,
string name,
uint256 rate
);
/**
* Event for remove received token logging
* @param tokenAddress address of removed foreign token
*/
event RemoveReceivedToken(address indexed tokenAddress);
/**
* Event for set new received token rate logging
* @param tokenAddress address of foreign token
* @param newRate new number of token units a buyer gets per added foreign token unit
*/
event SetReceivedTokenRate(
address indexed tokenAddress,
uint256 newRate
);
/**
* Event for send excess ether logging
* @param beneficiary who gets excess ether
* @param value excess weis
*/
event SendEtherExcess(
address indexed beneficiary,
uint256 value
);
/**
* Event for send tokens excess logging
* @param beneficiary who gets tokens excess
* @param value excess token units
*/
event SendTokensExcess(
address indexed beneficiary,
uint256 value
);
/**
* Event for logging received tokens from approveAndCall function
* @param from who send tokens
* @param amount amount of received purchased
* @param tokenAddress address of token contract
* @param extraData data attached to payment
*/
event ReceivedTokens(
address indexed from,
uint256 amount,
address indexed tokenAddress,
bytes extraData
);
/**
* @param _rate Number of token units a buyer gets per wei
* @param _wallet Address where collected funds will be forwarded to
* @param _token Address of the token being sold
*/
constructor (
uint256 _rate,
address _wallet,
ERC20 _token
)
public
{
}
// -----------------------------------------
// External interface
// -----------------------------------------
/**
* @dev fallback function ***DO NOT OVERRIDE***
*/
function () whenNotPaused external payable {
}
/**
* @dev low level token purchase ***DO NOT OVERRIDE***
* @param _beneficiary Address performing the token purchase
*/
function buyTokens(address _beneficiary) whenNotPaused public payable {
}
/**
* @dev Sets new rate.
* @param _newRate New number of token units a buyer gets per wei
*/
function setRate(uint256 _newRate) onlyOwner external {
}
/**
* @dev Set new wallet address.
* @param _newWallet New address where collected funds will be forwarded to
*/
function setWallet(address _newWallet) onlyOwner external {
}
/**
* @dev Set new token address.
* @param _newToken New address of the token being sold
*/
function setToken(ERC20 _newToken) onlyOwner external {
}
/**
* @dev Withdraws any tokens from this contract to wallet.
* @param _tokenContract The address of the foreign token
*/
function withdrawTokens(ERC20 _tokenContract) onlyOwner external {
}
/**
* @dev Withdraws all ether from this contract to wallet.
*/
function withdraw() onlyOwner external {
}
/**
* @dev Adds received foreign token.
* @param _tokenAddress Address of the foreign token being added
* @param _tokenName Name of the foreign token
* @param _tokenRate Number of token units a buyer gets per foreign token unit
*/
function addReceivedToken(
ERC20 _tokenAddress,
string _tokenName,
uint256 _tokenRate
)
onlyOwner
external
{
}
/**
* @dev Removes received foreign token.
* @param _tokenAddress Address of the foreign token being removed
*/
function removeReceivedToken(ERC20 _tokenAddress) onlyOwner external {
}
/**
* @dev Sets new rate for received foreign token.
* @param _tokenAddress Address of the foreign token
* @param _newTokenRate New number of token units a buyer gets per foreign token unit
*/
function setReceivedTokenRate(
ERC20 _tokenAddress,
uint256 _newTokenRate
)
onlyOwner
external
{
require(_tokenAddress != address(0));
require(<FILL_ME>)
require(_newTokenRate > 0);
receivedTokens[_tokenAddress].rate = _newTokenRate;
emit SetReceivedTokenRate(
_tokenAddress,
_newTokenRate
);
}
/**
* @dev Receives approved foreign tokens and exchange them to tokens.
* @param _from Address of foreign tokens sender
* @param _amount Amount of the foreign tokens
* @param _tokenAddress Address of the foreign token contract
* @param _extraData Data attached to payment
*/
function receiveApproval(
address _from,
uint256 _amount,
address _tokenAddress,
bytes _extraData
)
whenNotPaused external
{
}
/**
* @dev Deposits foreign token and exchange them to tokens.
* @param _tokenAddress Address of the foreign token
* @param _amount Amount of the foreign tokens
*/
function depositToken(
ERC20 _tokenAddress,
uint256 _amount
)
whenNotPaused external
{
}
// -----------------------------------------
// Internal interface
// -----------------------------------------
/**
* @dev Exchanges foreign tokens to self token. Low-level exchange method.
* @param _tokenAddress Address of the foreign token contract
* @param _sender Sender address
* @param _amount Number of tokens for exchange
*/
function _exchangeTokens(
ERC20 _tokenAddress,
address _sender,
uint256 _amount
)
internal
{
}
/**
* @dev Source of tokens.
* @param _beneficiary Address performing the token purchase
* @param _tokenAmount Number of tokens to be emitted
*/
function _deliverTokens(
address _beneficiary,
uint256 _tokenAmount
)
internal
{
}
/**
* @dev Executed when a purchase has been validated and is ready to be executed. Not necessarily emits/sends tokens.
* @param _beneficiary Address receiving the tokens
* @param _tokenAmount Number of tokens to be purchased
*/
function _processPurchase(
address _beneficiary,
uint256 _tokenAmount
)
internal
{
}
/**
* @dev Override to extend the way in which ether or foreign token unit is converted to tokens.
* @param _tokenAddress Address of foreign token or 0 if ether to tokens
* @param _amount Value in wei or foreign token units to be converted into tokens
* @return Number of tokens that can be purchased with the specified _amount (wei or foreign token units)
*/
function _getTokenAmount(address _tokenAddress, uint256 _amount)
internal view returns (uint256)
{
}
/**
* @dev Get wei or foreign tokens amount. Inverse _getTokenAmount method.
*/
function _inverseGetTokenAmount(address _tokenAddress, uint256 _tokenAmount)
internal view returns (uint256)
{
}
}
| receivedTokens[_tokenAddress].rate>0 | 328,077 | receivedTokens[_tokenAddress].rate>0 |
null | pragma solidity ^0.4.23;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title ERC20 interface (only needed methods)
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 {
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/**
* @title QWoodDAOTokenSale
* @dev The QWoodDAOTokenSale contract receive ether and other foreign tokens and exchange them to set tokens.
*/
contract QWoodDAOTokenSale is Pausable {
using SafeMath for uint256;
// Represents data of foreign token which can be exchange to token
struct ReceivedToken {
// name of foreign token
string name;
// number of token units a buyer gets per foreign token unit
uint256 rate;
// amount of raised foreign tokens
uint256 raised;
}
// The token being sold
ERC20 public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei.
// The rate is the conversion between wei and the smallest and indivisible token unit.
// So, if you are using a rate of 1 with a ERC20 token with 3 decimals called TOK
// 1 wei will give you 1 unit, or 0.001 TOK.
uint256 public rate;
// Amount of wei raised
uint256 public weiRaised;
// Map from token address to token data
mapping (address => ReceivedToken) public receivedTokens;
/**
* 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
);
/**
* Event for token purchase for token logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value foreign tokens units paid for purchase
* @param amount amount of tokens purchased
*/
event TokenForTokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint256 value,
uint256 amount
);
/**
* Event for change rate logging
* @param newRate new number of token units a buyer gets per wei
*/
event ChangeRate(uint256 newRate);
/**
* Event for add received token logging
* @param tokenAddress address of added foreign token
* @param name name of added token
* @param rate number of token units a buyer gets per added foreign token unit
*/
event AddReceivedToken(
address indexed tokenAddress,
string name,
uint256 rate
);
/**
* Event for remove received token logging
* @param tokenAddress address of removed foreign token
*/
event RemoveReceivedToken(address indexed tokenAddress);
/**
* Event for set new received token rate logging
* @param tokenAddress address of foreign token
* @param newRate new number of token units a buyer gets per added foreign token unit
*/
event SetReceivedTokenRate(
address indexed tokenAddress,
uint256 newRate
);
/**
* Event for send excess ether logging
* @param beneficiary who gets excess ether
* @param value excess weis
*/
event SendEtherExcess(
address indexed beneficiary,
uint256 value
);
/**
* Event for send tokens excess logging
* @param beneficiary who gets tokens excess
* @param value excess token units
*/
event SendTokensExcess(
address indexed beneficiary,
uint256 value
);
/**
* Event for logging received tokens from approveAndCall function
* @param from who send tokens
* @param amount amount of received purchased
* @param tokenAddress address of token contract
* @param extraData data attached to payment
*/
event ReceivedTokens(
address indexed from,
uint256 amount,
address indexed tokenAddress,
bytes extraData
);
/**
* @param _rate Number of token units a buyer gets per wei
* @param _wallet Address where collected funds will be forwarded to
* @param _token Address of the token being sold
*/
constructor (
uint256 _rate,
address _wallet,
ERC20 _token
)
public
{
}
// -----------------------------------------
// External interface
// -----------------------------------------
/**
* @dev fallback function ***DO NOT OVERRIDE***
*/
function () whenNotPaused external payable {
}
/**
* @dev low level token purchase ***DO NOT OVERRIDE***
* @param _beneficiary Address performing the token purchase
*/
function buyTokens(address _beneficiary) whenNotPaused public payable {
}
/**
* @dev Sets new rate.
* @param _newRate New number of token units a buyer gets per wei
*/
function setRate(uint256 _newRate) onlyOwner external {
}
/**
* @dev Set new wallet address.
* @param _newWallet New address where collected funds will be forwarded to
*/
function setWallet(address _newWallet) onlyOwner external {
}
/**
* @dev Set new token address.
* @param _newToken New address of the token being sold
*/
function setToken(ERC20 _newToken) onlyOwner external {
}
/**
* @dev Withdraws any tokens from this contract to wallet.
* @param _tokenContract The address of the foreign token
*/
function withdrawTokens(ERC20 _tokenContract) onlyOwner external {
}
/**
* @dev Withdraws all ether from this contract to wallet.
*/
function withdraw() onlyOwner external {
}
/**
* @dev Adds received foreign token.
* @param _tokenAddress Address of the foreign token being added
* @param _tokenName Name of the foreign token
* @param _tokenRate Number of token units a buyer gets per foreign token unit
*/
function addReceivedToken(
ERC20 _tokenAddress,
string _tokenName,
uint256 _tokenRate
)
onlyOwner
external
{
}
/**
* @dev Removes received foreign token.
* @param _tokenAddress Address of the foreign token being removed
*/
function removeReceivedToken(ERC20 _tokenAddress) onlyOwner external {
}
/**
* @dev Sets new rate for received foreign token.
* @param _tokenAddress Address of the foreign token
* @param _newTokenRate New number of token units a buyer gets per foreign token unit
*/
function setReceivedTokenRate(
ERC20 _tokenAddress,
uint256 _newTokenRate
)
onlyOwner
external
{
}
/**
* @dev Receives approved foreign tokens and exchange them to tokens.
* @param _from Address of foreign tokens sender
* @param _amount Amount of the foreign tokens
* @param _tokenAddress Address of the foreign token contract
* @param _extraData Data attached to payment
*/
function receiveApproval(
address _from,
uint256 _amount,
address _tokenAddress,
bytes _extraData
)
whenNotPaused external
{
}
/**
* @dev Deposits foreign token and exchange them to tokens.
* @param _tokenAddress Address of the foreign token
* @param _amount Amount of the foreign tokens
*/
function depositToken(
ERC20 _tokenAddress,
uint256 _amount
)
whenNotPaused external
{
}
// -----------------------------------------
// Internal interface
// -----------------------------------------
/**
* @dev Exchanges foreign tokens to self token. Low-level exchange method.
* @param _tokenAddress Address of the foreign token contract
* @param _sender Sender address
* @param _amount Number of tokens for exchange
*/
function _exchangeTokens(
ERC20 _tokenAddress,
address _sender,
uint256 _amount
)
internal
{
uint256 foreignTokenAmount = _amount;
require(<FILL_ME>)
uint256 tokenBalance = token.balanceOf(address(this));
require(tokenBalance > 0);
uint256 tokens = _getTokenAmount(_tokenAddress, foreignTokenAmount);
if (tokens > tokenBalance) {
tokens = tokenBalance;
foreignTokenAmount = _inverseGetTokenAmount(_tokenAddress, tokens);
uint256 senderForeignTokenExcess = _amount.sub(foreignTokenAmount);
_tokenAddress.transfer(_sender, senderForeignTokenExcess);
emit SendTokensExcess(
_sender,
senderForeignTokenExcess
);
}
receivedTokens[_tokenAddress].raised = receivedTokens[_tokenAddress].raised.add(foreignTokenAmount);
_processPurchase(_sender, tokens);
emit TokenForTokenPurchase(
_sender,
_sender,
foreignTokenAmount,
tokens
);
}
/**
* @dev Source of tokens.
* @param _beneficiary Address performing the token purchase
* @param _tokenAmount Number of tokens to be emitted
*/
function _deliverTokens(
address _beneficiary,
uint256 _tokenAmount
)
internal
{
}
/**
* @dev Executed when a purchase has been validated and is ready to be executed. Not necessarily emits/sends tokens.
* @param _beneficiary Address receiving the tokens
* @param _tokenAmount Number of tokens to be purchased
*/
function _processPurchase(
address _beneficiary,
uint256 _tokenAmount
)
internal
{
}
/**
* @dev Override to extend the way in which ether or foreign token unit is converted to tokens.
* @param _tokenAddress Address of foreign token or 0 if ether to tokens
* @param _amount Value in wei or foreign token units to be converted into tokens
* @return Number of tokens that can be purchased with the specified _amount (wei or foreign token units)
*/
function _getTokenAmount(address _tokenAddress, uint256 _amount)
internal view returns (uint256)
{
}
/**
* @dev Get wei or foreign tokens amount. Inverse _getTokenAmount method.
*/
function _inverseGetTokenAmount(address _tokenAddress, uint256 _tokenAmount)
internal view returns (uint256)
{
}
}
| _tokenAddress.transferFrom(_sender,address(this),foreignTokenAmount) | 328,077 | _tokenAddress.transferFrom(_sender,address(this),foreignTokenAmount) |
null | pragma solidity ^0.4.16;
contract MyEtherTeller {
//Author: Nidscom.io
//Date: 23 March 2018
//Version: MyEtherTeller v1.0 MainNet
address public owner;
//Each buyer address consist of an array of EscrowStruct
//Used to store buyer's transactions and for buyers to interact with his transactions. (Such as releasing funds to seller)
struct EscrowStruct
{
address buyer; //Person who is making payment
address seller; //Person who will receive funds
address escrow_agent; //Escrow agent to resolve disputes, if any
uint escrow_fee; //Fee charged by escrow
uint amount; //Amount of Ether (in Wei) seller will receive after fees
bool escrow_intervention; //Buyer or Seller can call for Escrow intervention
bool release_approval; //Buyer or Escrow(if escrow_intervention is true) can approve release of funds to seller
bool refund_approval; //Seller or Escrow(if escrow_intervention is true) can approve refund of funds to buyer
bytes32 notes; //Notes for Seller
}
struct TransactionStruct
{
//Links to transaction from buyer
address buyer; //Person who is making payment
uint buyer_nounce; //Nounce of buyer transaction
}
//Database of Buyers. Each buyer then contain an array of his transactions
mapping(address => EscrowStruct[]) public buyerDatabase;
//Database of Seller and Escrow Agent
mapping(address => TransactionStruct[]) public sellerDatabase;
mapping(address => TransactionStruct[]) public escrowDatabase;
//Every address have a Funds bank. All refunds, sales and escrow comissions are sent to this bank. Address owner can withdraw them at any time.
mapping(address => uint) public Funds;
mapping(address => uint) public escrowFee;
//Run once the moment contract is created. Set contract creator
function MyEtherTeller() {
}
function() payable
{
}
function setEscrowFee(uint fee) {
}
function getEscrowFee(address escrowAddress) constant returns (uint) {
}
function newEscrow(address sellerAddress, address escrowAddress, bytes32 notes) payable returns (bool) {
}
//switcher 0 for Buyer, 1 for Seller, 2 for Escrow
function getNumTransactions(address inputAddress, uint switcher) constant returns (uint)
{
}
//switcher 0 for Buyer, 1 for Seller, 2 for Escrow
function getSpecificTransaction(address inputAddress, uint switcher, uint ID) constant returns (address, address, address, uint, bytes32, uint, bytes32)
{
}
function buyerHistory(address buyerAddress, uint startID, uint numToLoad) constant returns (address[], address[],uint[], bytes32[]){
}
function SellerHistory(address inputAddress, uint startID , uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){
}
function escrowHistory(address inputAddress, uint startID, uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){
}
function checkStatus(address buyerAddress, uint nounce) constant returns (bytes32){
}
//When transaction is complete, buyer will release funds to seller
//Even if EscrowEscalation is raised, buyer can still approve fund release at any time
function buyerFundRelease(uint ID)
{
}
//Seller can refund the buyer at any time
function sellerRefund(uint ID)
{
address buyerAddress = sellerDatabase[msg.sender][ID].buyer;
uint buyerID = sellerDatabase[msg.sender][ID].buyer_nounce;
require(<FILL_ME>)
address escrow_agent = buyerDatabase[buyerAddress][buyerID].escrow_agent;
uint escrow_fee = buyerDatabase[buyerAddress][buyerID].escrow_fee;
uint amount = buyerDatabase[buyerAddress][buyerID].amount;
//Once approved, buyer can invoke WithdrawFunds to claim his refund
buyerDatabase[buyerAddress][buyerID].refund_approval = true;
Funds[buyerAddress] += amount;
Funds[escrow_agent] += escrow_fee;
}
//Either buyer or seller can raise escalation with escrow agent.
//Once escalation is activated, escrow agent can release funds to seller OR make a full refund to buyer
//Switcher = 0 for Buyer, Switcher = 1 for Seller
function EscrowEscalation(uint switcher, uint ID)
{
}
//ID is the transaction ID from Escrow's history.
//Decision = 0 is for refunding Buyer. Decision = 1 is for releasing funds to Seller
function escrowDecision(uint ID, uint Decision)
{
}
function WithdrawFunds()
{
}
function CheckBalance(address fromAddress) constant returns (uint){
}
}
| buyerDatabase[buyerAddress][buyerID].release_approval==false&&buyerDatabase[buyerAddress][buyerID].refund_approval==false | 328,164 | buyerDatabase[buyerAddress][buyerID].release_approval==false&&buyerDatabase[buyerAddress][buyerID].refund_approval==false |
null | pragma solidity ^0.4.16;
contract MyEtherTeller {
//Author: Nidscom.io
//Date: 23 March 2018
//Version: MyEtherTeller v1.0 MainNet
address public owner;
//Each buyer address consist of an array of EscrowStruct
//Used to store buyer's transactions and for buyers to interact with his transactions. (Such as releasing funds to seller)
struct EscrowStruct
{
address buyer; //Person who is making payment
address seller; //Person who will receive funds
address escrow_agent; //Escrow agent to resolve disputes, if any
uint escrow_fee; //Fee charged by escrow
uint amount; //Amount of Ether (in Wei) seller will receive after fees
bool escrow_intervention; //Buyer or Seller can call for Escrow intervention
bool release_approval; //Buyer or Escrow(if escrow_intervention is true) can approve release of funds to seller
bool refund_approval; //Seller or Escrow(if escrow_intervention is true) can approve refund of funds to buyer
bytes32 notes; //Notes for Seller
}
struct TransactionStruct
{
//Links to transaction from buyer
address buyer; //Person who is making payment
uint buyer_nounce; //Nounce of buyer transaction
}
//Database of Buyers. Each buyer then contain an array of his transactions
mapping(address => EscrowStruct[]) public buyerDatabase;
//Database of Seller and Escrow Agent
mapping(address => TransactionStruct[]) public sellerDatabase;
mapping(address => TransactionStruct[]) public escrowDatabase;
//Every address have a Funds bank. All refunds, sales and escrow comissions are sent to this bank. Address owner can withdraw them at any time.
mapping(address => uint) public Funds;
mapping(address => uint) public escrowFee;
//Run once the moment contract is created. Set contract creator
function MyEtherTeller() {
}
function() payable
{
}
function setEscrowFee(uint fee) {
}
function getEscrowFee(address escrowAddress) constant returns (uint) {
}
function newEscrow(address sellerAddress, address escrowAddress, bytes32 notes) payable returns (bool) {
}
//switcher 0 for Buyer, 1 for Seller, 2 for Escrow
function getNumTransactions(address inputAddress, uint switcher) constant returns (uint)
{
}
//switcher 0 for Buyer, 1 for Seller, 2 for Escrow
function getSpecificTransaction(address inputAddress, uint switcher, uint ID) constant returns (address, address, address, uint, bytes32, uint, bytes32)
{
}
function buyerHistory(address buyerAddress, uint startID, uint numToLoad) constant returns (address[], address[],uint[], bytes32[]){
}
function SellerHistory(address inputAddress, uint startID , uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){
}
function escrowHistory(address inputAddress, uint startID, uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){
}
function checkStatus(address buyerAddress, uint nounce) constant returns (bytes32){
}
//When transaction is complete, buyer will release funds to seller
//Even if EscrowEscalation is raised, buyer can still approve fund release at any time
function buyerFundRelease(uint ID)
{
}
//Seller can refund the buyer at any time
function sellerRefund(uint ID)
{
}
//Either buyer or seller can raise escalation with escrow agent.
//Once escalation is activated, escrow agent can release funds to seller OR make a full refund to buyer
//Switcher = 0 for Buyer, Switcher = 1 for Seller
function EscrowEscalation(uint switcher, uint ID)
{
//To activate EscrowEscalation
//1) Buyer must not have approved fund release.
//2) Seller must not have approved a refund.
//3) EscrowEscalation is being activated for the first time
//There is no difference whether the buyer or seller activates EscrowEscalation.
address buyerAddress;
uint buyerID; //transaction ID of in buyer's history
if (switcher == 0) // Buyer
{
buyerAddress = msg.sender;
buyerID = ID;
} else if (switcher == 1) //Seller
{
buyerAddress = sellerDatabase[msg.sender][ID].buyer;
buyerID = sellerDatabase[msg.sender][ID].buyer_nounce;
}
require(<FILL_ME>)
//Activate the ability for Escrow Agent to intervent in this transaction
buyerDatabase[buyerAddress][buyerID].escrow_intervention = true;
}
//ID is the transaction ID from Escrow's history.
//Decision = 0 is for refunding Buyer. Decision = 1 is for releasing funds to Seller
function escrowDecision(uint ID, uint Decision)
{
}
function WithdrawFunds()
{
}
function CheckBalance(address fromAddress) constant returns (uint){
}
}
| buyerDatabase[buyerAddress][buyerID].escrow_intervention==false&&buyerDatabase[buyerAddress][buyerID].release_approval==false&&buyerDatabase[buyerAddress][buyerID].refund_approval==false | 328,164 | buyerDatabase[buyerAddress][buyerID].escrow_intervention==false&&buyerDatabase[buyerAddress][buyerID].release_approval==false&&buyerDatabase[buyerAddress][buyerID].refund_approval==false |
null | pragma solidity ^0.4.16;
contract MyEtherTeller {
//Author: Nidscom.io
//Date: 23 March 2018
//Version: MyEtherTeller v1.0 MainNet
address public owner;
//Each buyer address consist of an array of EscrowStruct
//Used to store buyer's transactions and for buyers to interact with his transactions. (Such as releasing funds to seller)
struct EscrowStruct
{
address buyer; //Person who is making payment
address seller; //Person who will receive funds
address escrow_agent; //Escrow agent to resolve disputes, if any
uint escrow_fee; //Fee charged by escrow
uint amount; //Amount of Ether (in Wei) seller will receive after fees
bool escrow_intervention; //Buyer or Seller can call for Escrow intervention
bool release_approval; //Buyer or Escrow(if escrow_intervention is true) can approve release of funds to seller
bool refund_approval; //Seller or Escrow(if escrow_intervention is true) can approve refund of funds to buyer
bytes32 notes; //Notes for Seller
}
struct TransactionStruct
{
//Links to transaction from buyer
address buyer; //Person who is making payment
uint buyer_nounce; //Nounce of buyer transaction
}
//Database of Buyers. Each buyer then contain an array of his transactions
mapping(address => EscrowStruct[]) public buyerDatabase;
//Database of Seller and Escrow Agent
mapping(address => TransactionStruct[]) public sellerDatabase;
mapping(address => TransactionStruct[]) public escrowDatabase;
//Every address have a Funds bank. All refunds, sales and escrow comissions are sent to this bank. Address owner can withdraw them at any time.
mapping(address => uint) public Funds;
mapping(address => uint) public escrowFee;
//Run once the moment contract is created. Set contract creator
function MyEtherTeller() {
}
function() payable
{
}
function setEscrowFee(uint fee) {
}
function getEscrowFee(address escrowAddress) constant returns (uint) {
}
function newEscrow(address sellerAddress, address escrowAddress, bytes32 notes) payable returns (bool) {
}
//switcher 0 for Buyer, 1 for Seller, 2 for Escrow
function getNumTransactions(address inputAddress, uint switcher) constant returns (uint)
{
}
//switcher 0 for Buyer, 1 for Seller, 2 for Escrow
function getSpecificTransaction(address inputAddress, uint switcher, uint ID) constant returns (address, address, address, uint, bytes32, uint, bytes32)
{
}
function buyerHistory(address buyerAddress, uint startID, uint numToLoad) constant returns (address[], address[],uint[], bytes32[]){
}
function SellerHistory(address inputAddress, uint startID , uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){
}
function escrowHistory(address inputAddress, uint startID, uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){
}
function checkStatus(address buyerAddress, uint nounce) constant returns (bytes32){
}
//When transaction is complete, buyer will release funds to seller
//Even if EscrowEscalation is raised, buyer can still approve fund release at any time
function buyerFundRelease(uint ID)
{
}
//Seller can refund the buyer at any time
function sellerRefund(uint ID)
{
}
//Either buyer or seller can raise escalation with escrow agent.
//Once escalation is activated, escrow agent can release funds to seller OR make a full refund to buyer
//Switcher = 0 for Buyer, Switcher = 1 for Seller
function EscrowEscalation(uint switcher, uint ID)
{
}
//ID is the transaction ID from Escrow's history.
//Decision = 0 is for refunding Buyer. Decision = 1 is for releasing funds to Seller
function escrowDecision(uint ID, uint Decision)
{
//Escrow can only make the decision IF
//1) Buyer has not yet approved fund release to seller
//2) Seller has not yet approved a refund to buyer
//3) Escrow Agent has not yet approved fund release to seller AND not approved refund to buyer
//4) Escalation Escalation is activated
address buyerAddress = escrowDatabase[msg.sender][ID].buyer;
uint buyerID = escrowDatabase[msg.sender][ID].buyer_nounce;
require(<FILL_ME>)
uint escrow_fee = buyerDatabase[buyerAddress][buyerID].escrow_fee;
uint amount = buyerDatabase[buyerAddress][buyerID].amount;
if (Decision == 0) //Refund Buyer
{
buyerDatabase[buyerAddress][buyerID].refund_approval = true;
Funds[buyerAddress] += amount;
Funds[msg.sender] += escrow_fee;
} else if (Decision == 1) //Release funds to Seller
{
buyerDatabase[buyerAddress][buyerID].release_approval = true;
Funds[buyerDatabase[buyerAddress][buyerID].seller] += amount;
Funds[msg.sender] += escrow_fee;
}
}
function WithdrawFunds()
{
}
function CheckBalance(address fromAddress) constant returns (uint){
}
}
| buyerDatabase[buyerAddress][buyerID].release_approval==false&&buyerDatabase[buyerAddress][buyerID].escrow_intervention==true&&buyerDatabase[buyerAddress][buyerID].refund_approval==false | 328,164 | buyerDatabase[buyerAddress][buyerID].release_approval==false&&buyerDatabase[buyerAddress][buyerID].escrow_intervention==true&&buyerDatabase[buyerAddress][buyerID].refund_approval==false |
"Not granted" | pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
contract Vesting is Ownable {
using SafeMath for uint256;
struct VestingStruct{
uint256 starttime;
uint256 period;
uint256 release_periods;
uint256 amount;
uint256 withdrawn;
uint256 group_id;
bool is_revoked;
}
struct GroupVestingStruct{
string name;
uint256 amount;
uint256 withdrawn;
}
mapping(address=>VestingStruct) vestings;
mapping(uint256=>address) users;
uint256 users_counter;
mapping(uint256=>GroupVestingStruct) groups;
uint256 groups_counter;
//uint256 seconds_in_day = 60*60*24;
uint256 seconds_in_day = 60*60*24;
bool _initialized=false;
bool _initialized2=false;
IERC20 token;
uint256 _initialized3=0;
event Granted(address indexed account, uint256 amount, uint256 starttime, uint256 period, uint256 release_periods, uint256 group_id);
event Revoked(address indexed account);
event ChangeVesting(address indexed account, uint256 amount, uint256 period, uint256 release_periods);
event ChangeVestingTime(address indexed account, uint256 start_time);
event ChangeVestingGroup(address indexed account, uint256 group_id);
event Withdraw(address indexed account, uint256 amount);
function initialize() public{
}
function isInitialized() public view returns(bool){
}
function isInitialized2() public view returns(bool){
}
function isInitialized3() public view returns(uint256){
}
function setToken(address token_address) public onlyOwner returns(bool){
}
function getToken() public view returns(address){
}
function usersCounter() public view returns(uint256){
}
function groupsCounter() public view returns(uint256){
}
function addGroup(string memory name) public onlyOwner returns(bool){
}
function renameGroup(uint256 group_id, string memory name ) public onlyOwner returns(bool){
}
function getGroup(uint256 group_id) public view returns(GroupVestingStruct memory){
}
function getGroupName(uint256 group_id) public view returns(string memory){
}
function getGroupAmount(uint256 group_id) public view returns(uint256){
}
function getGroupWithdrawn(uint256 group_id) public view returns(uint256){
}
function getVesting(address account) public view returns(VestingStruct memory){
}
function changeGroup(address account, uint256 new_group_id) public onlyOwner returns(bool){
require(<FILL_ME>)
uint256 granted = vestings[account].amount;
uint256 withdrawn = vestings[account].withdrawn;
uint256 prev_group_id = vestings[account].group_id;
groups[new_group_id].amount = groups[new_group_id].amount.add(granted);
groups[new_group_id].withdrawn = groups[new_group_id].withdrawn.add(withdrawn);
groups[prev_group_id].amount = groups[prev_group_id].amount.sub(granted);
groups[prev_group_id].withdrawn = groups[prev_group_id].withdrawn.sub(withdrawn);
vestings[account].group_id = new_group_id;
emit ChangeVestingGroup(account, new_group_id);
}
function isGranted(address account) public view returns(bool){
}
function _grant(address account, uint256 amount, uint256 start_time, uint256 period, uint256 release_periods, uint256 group_id) internal returns(bool){
}
function grant(address account, uint256 amount, uint256 period, uint256 release_periods, uint256 group_id, uint256 start_time) public onlyOwner returns (bool){
}
function _revoke(address account) internal returns (bool){
}
function revoke(address account) public onlyOwner returns (bool){
}
function change(address account, uint256 period, uint256 release_periods, uint256 amount) public onlyOwner returns (bool){
}
function changeStartTime(address account, uint256 start_time) public onlyOwner returns(bool){
}
function getUserAddress(uint256 user_id) public view returns (address){
}
function getCurrentPeriod(address account) public view returns (uint256) {
}
function getAmount(address account) public view returns (uint256) {
}
function getReleasePeriods(address account) public view returns (uint256) {
}
function getPeriod(address account) public view returns (uint256) {
}
function getWithdrawn(address account) public view returns (uint256) {
}
function getRevoked(address account) public view returns (bool) {
}
function getStartTime(address account) public view returns (uint256) {
}
function getGroupId(address account) public view returns (uint256) {
}
function getAvailable(address account) public view returns (uint256) {
}
function withdraw() public returns(bool){
}
function reclaimEther(address payable _to) public onlyOwner returns(bool) {
}
function reclaimToken(IERC20 _token, address _to) public onlyOwner returns(bool) {
}
function transferToken(address _to, uint256 _amount ) public onlyOwner returns(bool){
}
}
| isGranted(account),"Not granted" | 328,245 | isGranted(account) |
"Already granted" | pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
contract Vesting is Ownable {
using SafeMath for uint256;
struct VestingStruct{
uint256 starttime;
uint256 period;
uint256 release_periods;
uint256 amount;
uint256 withdrawn;
uint256 group_id;
bool is_revoked;
}
struct GroupVestingStruct{
string name;
uint256 amount;
uint256 withdrawn;
}
mapping(address=>VestingStruct) vestings;
mapping(uint256=>address) users;
uint256 users_counter;
mapping(uint256=>GroupVestingStruct) groups;
uint256 groups_counter;
//uint256 seconds_in_day = 60*60*24;
uint256 seconds_in_day = 60*60*24;
bool _initialized=false;
bool _initialized2=false;
IERC20 token;
uint256 _initialized3=0;
event Granted(address indexed account, uint256 amount, uint256 starttime, uint256 period, uint256 release_periods, uint256 group_id);
event Revoked(address indexed account);
event ChangeVesting(address indexed account, uint256 amount, uint256 period, uint256 release_periods);
event ChangeVestingTime(address indexed account, uint256 start_time);
event ChangeVestingGroup(address indexed account, uint256 group_id);
event Withdraw(address indexed account, uint256 amount);
function initialize() public{
}
function isInitialized() public view returns(bool){
}
function isInitialized2() public view returns(bool){
}
function isInitialized3() public view returns(uint256){
}
function setToken(address token_address) public onlyOwner returns(bool){
}
function getToken() public view returns(address){
}
function usersCounter() public view returns(uint256){
}
function groupsCounter() public view returns(uint256){
}
function addGroup(string memory name) public onlyOwner returns(bool){
}
function renameGroup(uint256 group_id, string memory name ) public onlyOwner returns(bool){
}
function getGroup(uint256 group_id) public view returns(GroupVestingStruct memory){
}
function getGroupName(uint256 group_id) public view returns(string memory){
}
function getGroupAmount(uint256 group_id) public view returns(uint256){
}
function getGroupWithdrawn(uint256 group_id) public view returns(uint256){
}
function getVesting(address account) public view returns(VestingStruct memory){
}
function changeGroup(address account, uint256 new_group_id) public onlyOwner returns(bool){
}
function isGranted(address account) public view returns(bool){
}
function _grant(address account, uint256 amount, uint256 start_time, uint256 period, uint256 release_periods, uint256 group_id) internal returns(bool){
}
function grant(address account, uint256 amount, uint256 period, uint256 release_periods, uint256 group_id, uint256 start_time) public onlyOwner returns (bool){
require(<FILL_ME>)
uint256 vesting_start_time = start_time;
if(vesting_start_time == 0 ){
vesting_start_time = now;
}
_grant(account, amount, vesting_start_time, period, release_periods, group_id);
emit Granted(account, amount, vesting_start_time, period, release_periods, group_id);
}
function _revoke(address account) internal returns (bool){
}
function revoke(address account) public onlyOwner returns (bool){
}
function change(address account, uint256 period, uint256 release_periods, uint256 amount) public onlyOwner returns (bool){
}
function changeStartTime(address account, uint256 start_time) public onlyOwner returns(bool){
}
function getUserAddress(uint256 user_id) public view returns (address){
}
function getCurrentPeriod(address account) public view returns (uint256) {
}
function getAmount(address account) public view returns (uint256) {
}
function getReleasePeriods(address account) public view returns (uint256) {
}
function getPeriod(address account) public view returns (uint256) {
}
function getWithdrawn(address account) public view returns (uint256) {
}
function getRevoked(address account) public view returns (bool) {
}
function getStartTime(address account) public view returns (uint256) {
}
function getGroupId(address account) public view returns (uint256) {
}
function getAvailable(address account) public view returns (uint256) {
}
function withdraw() public returns(bool){
}
function reclaimEther(address payable _to) public onlyOwner returns(bool) {
}
function reclaimToken(IERC20 _token, address _to) public onlyOwner returns(bool) {
}
function transferToken(address _to, uint256 _amount ) public onlyOwner returns(bool){
}
}
| !isGranted(account),"Already granted" | 328,245 | !isGranted(account) |
null | pragma solidity ^0.4.19;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title VestedToken
* @dev The VestedToken contract implements ERC20 standard basics function and
* - vesting for an address
* - token tradability delay
*/
contract VestedToken {
using SafeMath for uint256;
// Vested wallet address
address public vestedAddress;
// Vesting time
uint private constant VESTING_DELAY = 1 years;
// Token will be tradable TOKEN_TRADABLE_DELAY after
uint private constant TOKEN_TRADABLE_DELAY = 12 days;
// True if aside tokens have already been minted after second round
bool public asideTokensHaveBeenMinted = false;
// When aside tokens have been minted ?
uint public asideTokensMintDate;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
modifier transferAllowed { require(<FILL_ME>) _; }
// Get the balance from an address
function balanceOf(address _owner) public constant returns (uint256) { }
// transfer ERC20 function
function transfer(address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// transferFrom ERC20 function
function transferFrom(address _from, address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// approve ERC20 function
function approve(address _spender, uint256 _value) public returns (bool success) {
}
// allowance ERC20 function
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
function privateTransfer (address _to, uint256 _value) private returns (bool success) {
}
// Events ERC20
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/**
* @title WhitelistsRegistration
* @dev This is an extension to add 2 levels whitelists to the crowdsale
*/
contract WhitelistsRegistration is Ownable {
// List of whitelisted addresses for KYC under 10 ETH
mapping(address => bool) silverWhiteList;
// List of whitelisted addresses for KYC over 10 ETH
mapping(address => bool) goldWhiteList;
// Different stage from the ICO
enum WhiteListState {
// This address is not whitelisted
None,
// this address is on the silver whitelist
Silver,
// this address is on the gold whitelist
Gold
}
address public whiteLister;
event SilverWhitelist(address indexed _address, bool _isRegistered);
event GoldWhitelist(address indexed _address, bool _isRegistered);
event SetWhitelister(address indexed newWhiteLister);
/**
* @dev Throws if called by any account other than the owner or the whitelister.
*/
modifier onlyOwnerOrWhiteLister() {
}
// Return registration status of an specified address
function checkRegistrationStatus(address _address) public constant returns (WhiteListState) {
}
// Change registration status for an address in the whitelist for KYC under 10 ETH
function changeRegistrationStatusForSilverWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for an address in the whitelist for KYC over 10 ETH
function changeRegistrationStatusForGoldWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC under 10 ETH
function massChangeRegistrationStatusForSilverWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC over 10 ETH
function massChangeRegistrationStatusForGoldWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
/**
* @dev Allows the current owner or whiteLister to transfer control of the whitelist to a newWhitelister.
* @param _newWhiteLister The address to transfer whitelist to.
*/
function setWhitelister(address _newWhiteLister) public onlyOwnerOrWhiteLister {
}
}
/**
* @title BCDToken
* @dev The BCDT crowdsale
*/
contract BCDToken is VestedToken, WhitelistsRegistration {
string public constant name = "Blockchain Certified Data Token";
string public constant symbol = "BCDT";
uint public constant decimals = 18;
// Maximum contribution in ETH for silver whitelist
uint private constant MAX_ETHER_FOR_SILVER_WHITELIST = 10 ether;
// ETH/BCDT rate
uint public rateETH_BCDT = 13000;
// Soft cap, if not reached contributors can withdraw their ethers
uint public softCap = 1800 ether;
// Cap in ether of presale
uint public presaleCap = 1800 ether;
// Cap in ether of Round 1 (presale cap + 1800 ETH)
uint public round1Cap = 3600 ether;
// BCD Reserve/Community Wallets
address public reserveAddress;
address public communityAddress;
// Different stage from the ICO
enum State {
// ICO isn't started yet, initial state
Init,
// Presale has started
PresaleRunning,
// Presale has ended
PresaleFinished,
// Round 1 has started
Round1Running,
// Round 1 has ended
Round1Finished,
// Round 2 has started
Round2Running,
// Round 2 has ended
Round2Finished
}
// Initial state is Init
State public currentState = State.Init;
// BCDT total supply
uint256 public totalSupply = MAX_TOTAL_BCDT_TO_SELL;
// How much tokens have been sold
uint256 public tokensSold;
// Amount of ETH raised during ICO
uint256 private etherRaisedDuringICO;
// Maximum total of BCDT Token sold during ITS
uint private constant MAX_TOTAL_BCDT_TO_SELL = 100000000 * 1 ether;
// Token allocation per mille for reserve/community/founders
uint private constant RESERVE_ALLOCATION_PER_MILLE_RATIO = 200;
uint private constant COMMUNITY_ALLOCATION_PER_MILLE_RATIO = 103;
uint private constant FOUNDERS_ALLOCATION_PER_MILLE_RATIO = 30;
// List of contributors/contribution in ETH
mapping(address => uint256) contributors;
// Use to allow function call only if currentState is the one specified
modifier inStateInit()
{
}
modifier inStateRound2Finished()
{
}
// Event call when aside tokens are minted
event AsideTokensHaveBeenAllocated(address indexed to, uint256 amount);
// Event call when a contributor withdraw his ethers
event Withdraw(address indexed to, uint256 amount);
// Event call when ICO state change
event StateChanged(uint256 timestamp, State currentState);
// Constructor
function BCDToken() public {
}
function() public payable {
}
// Allow contributors to withdraw after the end of the ICO if the softcap hasn't been reached
function withdraw() public inStateRound2Finished {
}
// At the end of the sale, mint the aside tokens for the reserve, community and founders
function mintAsideTokens() public onlyOwner inStateRound2Finished {
}
function setTokenAsideAddresses(address _reserveAddress, address _communityAddress, address _founderAddress) public onlyOwner {
}
function updateCapsAndRate(uint _presaleCapInETH, uint _round1CapInETH, uint _softCapInETH, uint _rateETH_BCDT) public onlyOwner inStateInit {
}
function getRemainingEthersForCurrentRound() public constant returns (uint) {
}
function getBCDTRateForCurrentRound() public constant returns (uint) {
}
function setState(State _newState) public onlyOwner {
}
function privateSetState(State _newState) private {
}
function getEndedStateForCurrentRound() private constant returns (State) {
}
function setAllocation(address _to, uint _ratio) private onlyOwner returns (uint256) {
}
}
| asideTokensHaveBeenMinted&&now>asideTokensMintDate+TOKEN_TRADABLE_DELAY | 328,290 | asideTokensHaveBeenMinted&&now>asideTokensMintDate+TOKEN_TRADABLE_DELAY |
null | pragma solidity ^0.4.19;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title VestedToken
* @dev The VestedToken contract implements ERC20 standard basics function and
* - vesting for an address
* - token tradability delay
*/
contract VestedToken {
using SafeMath for uint256;
// Vested wallet address
address public vestedAddress;
// Vesting time
uint private constant VESTING_DELAY = 1 years;
// Token will be tradable TOKEN_TRADABLE_DELAY after
uint private constant TOKEN_TRADABLE_DELAY = 12 days;
// True if aside tokens have already been minted after second round
bool public asideTokensHaveBeenMinted = false;
// When aside tokens have been minted ?
uint public asideTokensMintDate;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
modifier transferAllowed { }
// Get the balance from an address
function balanceOf(address _owner) public constant returns (uint256) { }
// transfer ERC20 function
function transfer(address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// transferFrom ERC20 function
function transferFrom(address _from, address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// approve ERC20 function
function approve(address _spender, uint256 _value) public returns (bool success) {
}
// allowance ERC20 function
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
function privateTransfer (address _to, uint256 _value) private returns (bool success) {
}
// Events ERC20
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/**
* @title WhitelistsRegistration
* @dev This is an extension to add 2 levels whitelists to the crowdsale
*/
contract WhitelistsRegistration is Ownable {
// List of whitelisted addresses for KYC under 10 ETH
mapping(address => bool) silverWhiteList;
// List of whitelisted addresses for KYC over 10 ETH
mapping(address => bool) goldWhiteList;
// Different stage from the ICO
enum WhiteListState {
// This address is not whitelisted
None,
// this address is on the silver whitelist
Silver,
// this address is on the gold whitelist
Gold
}
address public whiteLister;
event SilverWhitelist(address indexed _address, bool _isRegistered);
event GoldWhitelist(address indexed _address, bool _isRegistered);
event SetWhitelister(address indexed newWhiteLister);
/**
* @dev Throws if called by any account other than the owner or the whitelister.
*/
modifier onlyOwnerOrWhiteLister() {
require(<FILL_ME>)
_;
}
// Return registration status of an specified address
function checkRegistrationStatus(address _address) public constant returns (WhiteListState) {
}
// Change registration status for an address in the whitelist for KYC under 10 ETH
function changeRegistrationStatusForSilverWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for an address in the whitelist for KYC over 10 ETH
function changeRegistrationStatusForGoldWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC under 10 ETH
function massChangeRegistrationStatusForSilverWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC over 10 ETH
function massChangeRegistrationStatusForGoldWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
/**
* @dev Allows the current owner or whiteLister to transfer control of the whitelist to a newWhitelister.
* @param _newWhiteLister The address to transfer whitelist to.
*/
function setWhitelister(address _newWhiteLister) public onlyOwnerOrWhiteLister {
}
}
/**
* @title BCDToken
* @dev The BCDT crowdsale
*/
contract BCDToken is VestedToken, WhitelistsRegistration {
string public constant name = "Blockchain Certified Data Token";
string public constant symbol = "BCDT";
uint public constant decimals = 18;
// Maximum contribution in ETH for silver whitelist
uint private constant MAX_ETHER_FOR_SILVER_WHITELIST = 10 ether;
// ETH/BCDT rate
uint public rateETH_BCDT = 13000;
// Soft cap, if not reached contributors can withdraw their ethers
uint public softCap = 1800 ether;
// Cap in ether of presale
uint public presaleCap = 1800 ether;
// Cap in ether of Round 1 (presale cap + 1800 ETH)
uint public round1Cap = 3600 ether;
// BCD Reserve/Community Wallets
address public reserveAddress;
address public communityAddress;
// Different stage from the ICO
enum State {
// ICO isn't started yet, initial state
Init,
// Presale has started
PresaleRunning,
// Presale has ended
PresaleFinished,
// Round 1 has started
Round1Running,
// Round 1 has ended
Round1Finished,
// Round 2 has started
Round2Running,
// Round 2 has ended
Round2Finished
}
// Initial state is Init
State public currentState = State.Init;
// BCDT total supply
uint256 public totalSupply = MAX_TOTAL_BCDT_TO_SELL;
// How much tokens have been sold
uint256 public tokensSold;
// Amount of ETH raised during ICO
uint256 private etherRaisedDuringICO;
// Maximum total of BCDT Token sold during ITS
uint private constant MAX_TOTAL_BCDT_TO_SELL = 100000000 * 1 ether;
// Token allocation per mille for reserve/community/founders
uint private constant RESERVE_ALLOCATION_PER_MILLE_RATIO = 200;
uint private constant COMMUNITY_ALLOCATION_PER_MILLE_RATIO = 103;
uint private constant FOUNDERS_ALLOCATION_PER_MILLE_RATIO = 30;
// List of contributors/contribution in ETH
mapping(address => uint256) contributors;
// Use to allow function call only if currentState is the one specified
modifier inStateInit()
{
}
modifier inStateRound2Finished()
{
}
// Event call when aside tokens are minted
event AsideTokensHaveBeenAllocated(address indexed to, uint256 amount);
// Event call when a contributor withdraw his ethers
event Withdraw(address indexed to, uint256 amount);
// Event call when ICO state change
event StateChanged(uint256 timestamp, State currentState);
// Constructor
function BCDToken() public {
}
function() public payable {
}
// Allow contributors to withdraw after the end of the ICO if the softcap hasn't been reached
function withdraw() public inStateRound2Finished {
}
// At the end of the sale, mint the aside tokens for the reserve, community and founders
function mintAsideTokens() public onlyOwner inStateRound2Finished {
}
function setTokenAsideAddresses(address _reserveAddress, address _communityAddress, address _founderAddress) public onlyOwner {
}
function updateCapsAndRate(uint _presaleCapInETH, uint _round1CapInETH, uint _softCapInETH, uint _rateETH_BCDT) public onlyOwner inStateInit {
}
function getRemainingEthersForCurrentRound() public constant returns (uint) {
}
function getBCDTRateForCurrentRound() public constant returns (uint) {
}
function setState(State _newState) public onlyOwner {
}
function privateSetState(State _newState) private {
}
function getEndedStateForCurrentRound() private constant returns (State) {
}
function setAllocation(address _to, uint _ratio) private onlyOwner returns (uint256) {
}
}
| (msg.sender==owner)||(msg.sender==whiteLister) | 328,290 | (msg.sender==owner)||(msg.sender==whiteLister) |
null | pragma solidity ^0.4.19;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title VestedToken
* @dev The VestedToken contract implements ERC20 standard basics function and
* - vesting for an address
* - token tradability delay
*/
contract VestedToken {
using SafeMath for uint256;
// Vested wallet address
address public vestedAddress;
// Vesting time
uint private constant VESTING_DELAY = 1 years;
// Token will be tradable TOKEN_TRADABLE_DELAY after
uint private constant TOKEN_TRADABLE_DELAY = 12 days;
// True if aside tokens have already been minted after second round
bool public asideTokensHaveBeenMinted = false;
// When aside tokens have been minted ?
uint public asideTokensMintDate;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
modifier transferAllowed { }
// Get the balance from an address
function balanceOf(address _owner) public constant returns (uint256) { }
// transfer ERC20 function
function transfer(address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// transferFrom ERC20 function
function transferFrom(address _from, address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// approve ERC20 function
function approve(address _spender, uint256 _value) public returns (bool success) {
}
// allowance ERC20 function
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
function privateTransfer (address _to, uint256 _value) private returns (bool success) {
}
// Events ERC20
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/**
* @title WhitelistsRegistration
* @dev This is an extension to add 2 levels whitelists to the crowdsale
*/
contract WhitelistsRegistration is Ownable {
// List of whitelisted addresses for KYC under 10 ETH
mapping(address => bool) silverWhiteList;
// List of whitelisted addresses for KYC over 10 ETH
mapping(address => bool) goldWhiteList;
// Different stage from the ICO
enum WhiteListState {
// This address is not whitelisted
None,
// this address is on the silver whitelist
Silver,
// this address is on the gold whitelist
Gold
}
address public whiteLister;
event SilverWhitelist(address indexed _address, bool _isRegistered);
event GoldWhitelist(address indexed _address, bool _isRegistered);
event SetWhitelister(address indexed newWhiteLister);
/**
* @dev Throws if called by any account other than the owner or the whitelister.
*/
modifier onlyOwnerOrWhiteLister() {
}
// Return registration status of an specified address
function checkRegistrationStatus(address _address) public constant returns (WhiteListState) {
}
// Change registration status for an address in the whitelist for KYC under 10 ETH
function changeRegistrationStatusForSilverWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for an address in the whitelist for KYC over 10 ETH
function changeRegistrationStatusForGoldWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC under 10 ETH
function massChangeRegistrationStatusForSilverWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC over 10 ETH
function massChangeRegistrationStatusForGoldWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
/**
* @dev Allows the current owner or whiteLister to transfer control of the whitelist to a newWhitelister.
* @param _newWhiteLister The address to transfer whitelist to.
*/
function setWhitelister(address _newWhiteLister) public onlyOwnerOrWhiteLister {
}
}
/**
* @title BCDToken
* @dev The BCDT crowdsale
*/
contract BCDToken is VestedToken, WhitelistsRegistration {
string public constant name = "Blockchain Certified Data Token";
string public constant symbol = "BCDT";
uint public constant decimals = 18;
// Maximum contribution in ETH for silver whitelist
uint private constant MAX_ETHER_FOR_SILVER_WHITELIST = 10 ether;
// ETH/BCDT rate
uint public rateETH_BCDT = 13000;
// Soft cap, if not reached contributors can withdraw their ethers
uint public softCap = 1800 ether;
// Cap in ether of presale
uint public presaleCap = 1800 ether;
// Cap in ether of Round 1 (presale cap + 1800 ETH)
uint public round1Cap = 3600 ether;
// BCD Reserve/Community Wallets
address public reserveAddress;
address public communityAddress;
// Different stage from the ICO
enum State {
// ICO isn't started yet, initial state
Init,
// Presale has started
PresaleRunning,
// Presale has ended
PresaleFinished,
// Round 1 has started
Round1Running,
// Round 1 has ended
Round1Finished,
// Round 2 has started
Round2Running,
// Round 2 has ended
Round2Finished
}
// Initial state is Init
State public currentState = State.Init;
// BCDT total supply
uint256 public totalSupply = MAX_TOTAL_BCDT_TO_SELL;
// How much tokens have been sold
uint256 public tokensSold;
// Amount of ETH raised during ICO
uint256 private etherRaisedDuringICO;
// Maximum total of BCDT Token sold during ITS
uint private constant MAX_TOTAL_BCDT_TO_SELL = 100000000 * 1 ether;
// Token allocation per mille for reserve/community/founders
uint private constant RESERVE_ALLOCATION_PER_MILLE_RATIO = 200;
uint private constant COMMUNITY_ALLOCATION_PER_MILLE_RATIO = 103;
uint private constant FOUNDERS_ALLOCATION_PER_MILLE_RATIO = 30;
// List of contributors/contribution in ETH
mapping(address => uint256) contributors;
// Use to allow function call only if currentState is the one specified
modifier inStateInit()
{
}
modifier inStateRound2Finished()
{
}
// Event call when aside tokens are minted
event AsideTokensHaveBeenAllocated(address indexed to, uint256 amount);
// Event call when a contributor withdraw his ethers
event Withdraw(address indexed to, uint256 amount);
// Event call when ICO state change
event StateChanged(uint256 timestamp, State currentState);
// Constructor
function BCDToken() public {
}
function() public payable {
}
// Allow contributors to withdraw after the end of the ICO if the softcap hasn't been reached
function withdraw() public inStateRound2Finished {
}
// At the end of the sale, mint the aside tokens for the reserve, community and founders
function mintAsideTokens() public onlyOwner inStateRound2Finished {
// Reserve, community and founders address have to be set before mint aside tokens
require(<FILL_ME>)
// Aside tokens can be minted only if softcap is reached
require(this.balance >= softCap);
// Revert if aside tokens have already been minted
if (asideTokensHaveBeenMinted) { revert(); }
// Set minted flag and date
asideTokensHaveBeenMinted = true;
asideTokensMintDate = now;
// If 100M sold, 50M more have to be mint (15 / 10 = * 1.5 = +50%)
totalSupply = tokensSold.mul(15).div(10);
// 20% of total supply is allocated to reserve
uint256 _amountMinted = setAllocation(reserveAddress, RESERVE_ALLOCATION_PER_MILLE_RATIO);
// 10.3% of total supply is allocated to community
_amountMinted = _amountMinted.add(setAllocation(communityAddress, COMMUNITY_ALLOCATION_PER_MILLE_RATIO));
// 3% of total supply is allocated to founders
_amountMinted = _amountMinted.add(setAllocation(vestedAddress, FOUNDERS_ALLOCATION_PER_MILLE_RATIO));
// the allocation is only 33.3%*150/100 = 49.95% of the token solds. It is therefore slightly higher than it should.
// to avoid that, we correct the real total number of tokens
totalSupply = tokensSold.add(_amountMinted);
// Send the eth to the owner of the contract
owner.transfer(this.balance);
}
function setTokenAsideAddresses(address _reserveAddress, address _communityAddress, address _founderAddress) public onlyOwner {
}
function updateCapsAndRate(uint _presaleCapInETH, uint _round1CapInETH, uint _softCapInETH, uint _rateETH_BCDT) public onlyOwner inStateInit {
}
function getRemainingEthersForCurrentRound() public constant returns (uint) {
}
function getBCDTRateForCurrentRound() public constant returns (uint) {
}
function setState(State _newState) public onlyOwner {
}
function privateSetState(State _newState) private {
}
function getEndedStateForCurrentRound() private constant returns (State) {
}
function setAllocation(address _to, uint _ratio) private onlyOwner returns (uint256) {
}
}
| (reserveAddress!=0x0)&&(communityAddress!=0x0)&&(vestedAddress!=0x0) | 328,290 | (reserveAddress!=0x0)&&(communityAddress!=0x0)&&(vestedAddress!=0x0) |
null | pragma solidity ^0.4.19;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title VestedToken
* @dev The VestedToken contract implements ERC20 standard basics function and
* - vesting for an address
* - token tradability delay
*/
contract VestedToken {
using SafeMath for uint256;
// Vested wallet address
address public vestedAddress;
// Vesting time
uint private constant VESTING_DELAY = 1 years;
// Token will be tradable TOKEN_TRADABLE_DELAY after
uint private constant TOKEN_TRADABLE_DELAY = 12 days;
// True if aside tokens have already been minted after second round
bool public asideTokensHaveBeenMinted = false;
// When aside tokens have been minted ?
uint public asideTokensMintDate;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
modifier transferAllowed { }
// Get the balance from an address
function balanceOf(address _owner) public constant returns (uint256) { }
// transfer ERC20 function
function transfer(address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// transferFrom ERC20 function
function transferFrom(address _from, address _to, uint256 _value) transferAllowed public returns (bool success) {
}
// approve ERC20 function
function approve(address _spender, uint256 _value) public returns (bool success) {
}
// allowance ERC20 function
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
function privateTransfer (address _to, uint256 _value) private returns (bool success) {
}
// Events ERC20
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/**
* @title WhitelistsRegistration
* @dev This is an extension to add 2 levels whitelists to the crowdsale
*/
contract WhitelistsRegistration is Ownable {
// List of whitelisted addresses for KYC under 10 ETH
mapping(address => bool) silverWhiteList;
// List of whitelisted addresses for KYC over 10 ETH
mapping(address => bool) goldWhiteList;
// Different stage from the ICO
enum WhiteListState {
// This address is not whitelisted
None,
// this address is on the silver whitelist
Silver,
// this address is on the gold whitelist
Gold
}
address public whiteLister;
event SilverWhitelist(address indexed _address, bool _isRegistered);
event GoldWhitelist(address indexed _address, bool _isRegistered);
event SetWhitelister(address indexed newWhiteLister);
/**
* @dev Throws if called by any account other than the owner or the whitelister.
*/
modifier onlyOwnerOrWhiteLister() {
}
// Return registration status of an specified address
function checkRegistrationStatus(address _address) public constant returns (WhiteListState) {
}
// Change registration status for an address in the whitelist for KYC under 10 ETH
function changeRegistrationStatusForSilverWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for an address in the whitelist for KYC over 10 ETH
function changeRegistrationStatusForGoldWhiteList(address _address, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC under 10 ETH
function massChangeRegistrationStatusForSilverWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
// Change registration status for several addresses in the whitelist for KYC over 10 ETH
function massChangeRegistrationStatusForGoldWhiteList(address[] _targets, bool _isRegistered) public onlyOwnerOrWhiteLister {
}
/**
* @dev Allows the current owner or whiteLister to transfer control of the whitelist to a newWhitelister.
* @param _newWhiteLister The address to transfer whitelist to.
*/
function setWhitelister(address _newWhiteLister) public onlyOwnerOrWhiteLister {
}
}
/**
* @title BCDToken
* @dev The BCDT crowdsale
*/
contract BCDToken is VestedToken, WhitelistsRegistration {
string public constant name = "Blockchain Certified Data Token";
string public constant symbol = "BCDT";
uint public constant decimals = 18;
// Maximum contribution in ETH for silver whitelist
uint private constant MAX_ETHER_FOR_SILVER_WHITELIST = 10 ether;
// ETH/BCDT rate
uint public rateETH_BCDT = 13000;
// Soft cap, if not reached contributors can withdraw their ethers
uint public softCap = 1800 ether;
// Cap in ether of presale
uint public presaleCap = 1800 ether;
// Cap in ether of Round 1 (presale cap + 1800 ETH)
uint public round1Cap = 3600 ether;
// BCD Reserve/Community Wallets
address public reserveAddress;
address public communityAddress;
// Different stage from the ICO
enum State {
// ICO isn't started yet, initial state
Init,
// Presale has started
PresaleRunning,
// Presale has ended
PresaleFinished,
// Round 1 has started
Round1Running,
// Round 1 has ended
Round1Finished,
// Round 2 has started
Round2Running,
// Round 2 has ended
Round2Finished
}
// Initial state is Init
State public currentState = State.Init;
// BCDT total supply
uint256 public totalSupply = MAX_TOTAL_BCDT_TO_SELL;
// How much tokens have been sold
uint256 public tokensSold;
// Amount of ETH raised during ICO
uint256 private etherRaisedDuringICO;
// Maximum total of BCDT Token sold during ITS
uint private constant MAX_TOTAL_BCDT_TO_SELL = 100000000 * 1 ether;
// Token allocation per mille for reserve/community/founders
uint private constant RESERVE_ALLOCATION_PER_MILLE_RATIO = 200;
uint private constant COMMUNITY_ALLOCATION_PER_MILLE_RATIO = 103;
uint private constant FOUNDERS_ALLOCATION_PER_MILLE_RATIO = 30;
// List of contributors/contribution in ETH
mapping(address => uint256) contributors;
// Use to allow function call only if currentState is the one specified
modifier inStateInit()
{
}
modifier inStateRound2Finished()
{
}
// Event call when aside tokens are minted
event AsideTokensHaveBeenAllocated(address indexed to, uint256 amount);
// Event call when a contributor withdraw his ethers
event Withdraw(address indexed to, uint256 amount);
// Event call when ICO state change
event StateChanged(uint256 timestamp, State currentState);
// Constructor
function BCDToken() public {
}
function() public payable {
}
// Allow contributors to withdraw after the end of the ICO if the softcap hasn't been reached
function withdraw() public inStateRound2Finished {
}
// At the end of the sale, mint the aside tokens for the reserve, community and founders
function mintAsideTokens() public onlyOwner inStateRound2Finished {
}
function setTokenAsideAddresses(address _reserveAddress, address _communityAddress, address _founderAddress) public onlyOwner {
}
function updateCapsAndRate(uint _presaleCapInETH, uint _round1CapInETH, uint _softCapInETH, uint _rateETH_BCDT) public onlyOwner inStateInit {
}
function getRemainingEthersForCurrentRound() public constant returns (uint) {
require(currentState != State.Init);
require(<FILL_ME>)
if((currentState == State.PresaleRunning) || (currentState == State.PresaleFinished)) {
// Presale cap is fixed in ETH
return presaleCap.sub(etherRaisedDuringICO);
}
if((currentState == State.Round1Running) || (currentState == State.Round1Finished)) {
// Round 1 cap is fixed in ETH
return round1Cap.sub(etherRaisedDuringICO);
}
if((currentState == State.Round2Running) || (currentState == State.Round2Finished)) {
// Round 2 cap is limited in tokens,
uint256 remainingTokens = totalSupply.sub(tokensSold);
// ETH available is calculated from the number of remaining tokens regarding the rate
return remainingTokens.div(rateETH_BCDT);
}
}
function getBCDTRateForCurrentRound() public constant returns (uint) {
}
function setState(State _newState) public onlyOwner {
}
function privateSetState(State _newState) private {
}
function getEndedStateForCurrentRound() private constant returns (State) {
}
function setAllocation(address _to, uint _ratio) private onlyOwner returns (uint256) {
}
}
| !asideTokensHaveBeenMinted | 328,290 | !asideTokensHaveBeenMinted |
"Sender isn't registered on Dakiya" | pragma solidity ^0.8.0;
contract Messaging {
uint256 public threadCount = 1;
mapping(uint256 => Thread) public threads;
mapping(uint256 => Message[]) public messages;
uint256 public messagesIndex = 0;
mapping(address => string) private pubEncKeys; // mapping of address to public encryption key https://docs.metamask.io/guide/rpc-api.html#eth-getencryptionpublickey
struct Thread {
uint256 thread_id;
address receiver;
string receiver_key;
address sender;
string sender_key;
bool encrypted;
}
struct Message {
address receiver;
string uri;
uint256 timestamp;
}
event MessageSent (
address receiver,
string uri,
uint256 timestamp,
address sender,
uint256 thread_id
);
event ThreadCreated (
address receiver,
address sender,
uint256 thread_id,
uint256 timestamp,
string _sender_key,
string _receiver_key,
bool _encrypted
);
function getPubEncKeys(address receiver) public view returns(string memory sender_key, string memory receiver_key) {
// require(msg.sender != receiver, "Sender can't be receiver");
require(<FILL_ME>)
if (bytes(pubEncKeys[msg.sender]).length != 0) {
sender_key = pubEncKeys[msg.sender];
}
if (bytes(pubEncKeys[receiver]).length != 0) {
receiver_key = pubEncKeys[receiver];
}
return (sender_key, receiver_key);
}
function checkUserRegistration() public view returns(bool) {
}
function setPubEncKey(string memory encKey) public {
}
function newThread(
address _receiver,
string memory _sender_key,
string memory _receiver_key,
bool encrypted
) internal returns (uint256) {
}
function sendMessage(
uint256 _thread_id,
string memory _uri,
address _receiver,
string memory _sender_key,
string memory _receiver_key,
bool encrypted
) public {
}
}
| bytes(pubEncKeys[msg.sender]).length!=0,"Sender isn't registered on Dakiya" | 328,330 | bytes(pubEncKeys[msg.sender]).length!=0 |
"OP01" | pragma solidity ^0.6.0;
/**
* @title Operable
* @dev The Operable contract enable the restrictions of operations to a set of operators
*
* @author Cyril Lapinte - <[email protected]>
*
* Error messages
* OP01: Message sender must be an operator
* OP02: Address must be an operator
* OP03: Address must not be an operator
*/
contract Operable is Ownable {
mapping (address => bool) private operators_;
/**
* @dev Throws if called by any account other than the operator
*/
modifier onlyOperator {
require(<FILL_ME>)
_;
}
/**
* @dev constructor
*/
constructor() public {
}
/**
* @dev isOperator
* @param _address operator address
*/
function isOperator(address _address) public view returns (bool) {
}
/**
* @dev removeOperator
* @param _address operator address
*/
function removeOperator(address _address) public onlyOwner {
}
/**
* @dev defineOperator
* @param _role operator role
* @param _address operator address
*/
function defineOperator(string memory _role, address _address)
public onlyOwner
{
}
event OperatorRemoved(address address_);
event OperatorDefined(
string role,
address address_
);
}
| operators_[msg.sender],"OP01" | 328,516 | operators_[msg.sender] |
"OP02" | pragma solidity ^0.6.0;
/**
* @title Operable
* @dev The Operable contract enable the restrictions of operations to a set of operators
*
* @author Cyril Lapinte - <[email protected]>
*
* Error messages
* OP01: Message sender must be an operator
* OP02: Address must be an operator
* OP03: Address must not be an operator
*/
contract Operable is Ownable {
mapping (address => bool) private operators_;
/**
* @dev Throws if called by any account other than the operator
*/
modifier onlyOperator {
}
/**
* @dev constructor
*/
constructor() public {
}
/**
* @dev isOperator
* @param _address operator address
*/
function isOperator(address _address) public view returns (bool) {
}
/**
* @dev removeOperator
* @param _address operator address
*/
function removeOperator(address _address) public onlyOwner {
require(<FILL_ME>)
operators_[_address] = false;
emit OperatorRemoved(_address);
}
/**
* @dev defineOperator
* @param _role operator role
* @param _address operator address
*/
function defineOperator(string memory _role, address _address)
public onlyOwner
{
}
event OperatorRemoved(address address_);
event OperatorDefined(
string role,
address address_
);
}
| operators_[_address],"OP02" | 328,516 | operators_[_address] |
"OP03" | pragma solidity ^0.6.0;
/**
* @title Operable
* @dev The Operable contract enable the restrictions of operations to a set of operators
*
* @author Cyril Lapinte - <[email protected]>
*
* Error messages
* OP01: Message sender must be an operator
* OP02: Address must be an operator
* OP03: Address must not be an operator
*/
contract Operable is Ownable {
mapping (address => bool) private operators_;
/**
* @dev Throws if called by any account other than the operator
*/
modifier onlyOperator {
}
/**
* @dev constructor
*/
constructor() public {
}
/**
* @dev isOperator
* @param _address operator address
*/
function isOperator(address _address) public view returns (bool) {
}
/**
* @dev removeOperator
* @param _address operator address
*/
function removeOperator(address _address) public onlyOwner {
}
/**
* @dev defineOperator
* @param _role operator role
* @param _address operator address
*/
function defineOperator(string memory _role, address _address)
public onlyOwner
{
require(<FILL_ME>)
operators_[_address] = true;
emit OperatorDefined(_role, _address);
}
event OperatorRemoved(address address_);
event OperatorDefined(
string role,
address address_
);
}
| !operators_[_address],"OP03" | 328,516 | !operators_[_address] |
"Must have deliver role to deliver" | //
// XX: pragma solidity 0.6.2;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract BaseToken is ERC20PresetMinterPauser {
bytes32 public constant ADJUST_ROLE = keccak256("ADJUST_ROLE");
bytes32 public constant DELIVER_ROLE = keccak256("DELIVER_ROLE");
string[30] private txidArray;
uint256 arrayLength = 30;
uint256 private id;
uint256 private _minDeliver;
uint256 private _minCollect;
// uint8 private decimals_;
event Deliver(address indexed to, uint256 amount, string from, string txid);
event Collect(address indexed from, uint256 amount, string to);
constructor(
uint8 decimal,
uint256 minDeliver,
uint256 minCollect,
string memory name,
string memory symbol
) public ERC20PresetMinterPauser(name, symbol) {
}
function deliver(
address to,
uint256 amount,
string memory from,
string memory txid
) public {
require(
amount >= _minDeliver,
"The minimum value must be greater than minDeliver"
);
require(<FILL_ME>)
for (uint256 i = 0; i < arrayLength; i++) {
require(
keccak256(abi.encodePacked(txidArray[i])) !=
keccak256(abi.encodePacked(txid)),
"The txid has existed"
);
}
uint256 id_number = id % arrayLength;
txidArray[id_number] = txid;
id++;
//transfer(to, amount);
//NEED MINTER_ROLE
super.mint(to, amount);
emit Deliver(to, amount, from, txid);
}
function collect(uint256 amount, string memory to) public {
}
function adjustParams(uint256 minDeliver, uint256 minCollect) public {
}
function getParams() public view returns (uint256, uint256) {
}
function getTxids() public view returns (string[30] memory) {
}
}
| hasRole(DELIVER_ROLE,_msgSender()),"Must have deliver role to deliver" | 328,537 | hasRole(DELIVER_ROLE,_msgSender()) |
"The txid has existed" | //
// XX: pragma solidity 0.6.2;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract BaseToken is ERC20PresetMinterPauser {
bytes32 public constant ADJUST_ROLE = keccak256("ADJUST_ROLE");
bytes32 public constant DELIVER_ROLE = keccak256("DELIVER_ROLE");
string[30] private txidArray;
uint256 arrayLength = 30;
uint256 private id;
uint256 private _minDeliver;
uint256 private _minCollect;
// uint8 private decimals_;
event Deliver(address indexed to, uint256 amount, string from, string txid);
event Collect(address indexed from, uint256 amount, string to);
constructor(
uint8 decimal,
uint256 minDeliver,
uint256 minCollect,
string memory name,
string memory symbol
) public ERC20PresetMinterPauser(name, symbol) {
}
function deliver(
address to,
uint256 amount,
string memory from,
string memory txid
) public {
require(
amount >= _minDeliver,
"The minimum value must be greater than minDeliver"
);
require(
hasRole(DELIVER_ROLE, _msgSender()),
"Must have deliver role to deliver"
);
for (uint256 i = 0; i < arrayLength; i++) {
require(<FILL_ME>)
}
uint256 id_number = id % arrayLength;
txidArray[id_number] = txid;
id++;
//transfer(to, amount);
//NEED MINTER_ROLE
super.mint(to, amount);
emit Deliver(to, amount, from, txid);
}
function collect(uint256 amount, string memory to) public {
}
function adjustParams(uint256 minDeliver, uint256 minCollect) public {
}
function getParams() public view returns (uint256, uint256) {
}
function getTxids() public view returns (string[30] memory) {
}
}
| keccak256(abi.encodePacked(txidArray[i]))!=keccak256(abi.encodePacked(txid)),"The txid has existed" | 328,537 | keccak256(abi.encodePacked(txidArray[i]))!=keccak256(abi.encodePacked(txid)) |
"Adjust role required" | //
// XX: pragma solidity 0.6.2;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract BaseToken is ERC20PresetMinterPauser {
bytes32 public constant ADJUST_ROLE = keccak256("ADJUST_ROLE");
bytes32 public constant DELIVER_ROLE = keccak256("DELIVER_ROLE");
string[30] private txidArray;
uint256 arrayLength = 30;
uint256 private id;
uint256 private _minDeliver;
uint256 private _minCollect;
// uint8 private decimals_;
event Deliver(address indexed to, uint256 amount, string from, string txid);
event Collect(address indexed from, uint256 amount, string to);
constructor(
uint8 decimal,
uint256 minDeliver,
uint256 minCollect,
string memory name,
string memory symbol
) public ERC20PresetMinterPauser(name, symbol) {
}
function deliver(
address to,
uint256 amount,
string memory from,
string memory txid
) public {
}
function collect(uint256 amount, string memory to) public {
}
function adjustParams(uint256 minDeliver, uint256 minCollect) public {
require(<FILL_ME>)
_minDeliver = minDeliver;
_minCollect = minCollect;
}
function getParams() public view returns (uint256, uint256) {
}
function getTxids() public view returns (string[30] memory) {
}
}
| hasRole(ADJUST_ROLE,_msgSender()),"Adjust role required" | 328,537 | hasRole(ADJUST_ROLE,_msgSender()) |
"No enough balance available to distribute" | // SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
/**
* @title FreewayTokenDistributor
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `FreewayTokenDistributor` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*/
contract FreewayTokenDistributor is Initializable, Context, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address account, uint256 payment);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
IERC20 private _token;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
/**
* @dev Creates an instance of `FreewayTokenDistributor` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
function initializeContract(
IERC20 token
) public initializer {
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
}
/**
* @dev Creates an instance of `FreewayTokenDistributor` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
function inputPayeeData(
address[] memory payees,
uint256[] memory amount
) public onlyOwner{
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function distribute() public onlyOwner{
require(<FILL_ME>)
for (uint index=0; index<_payees.length; index++) {
uint256 payment = _shares[_payees[index]];
if(payment >= 0){
_totalReleased = _totalReleased.add(payment);
_token.transfer(_payees[index],payment);
_released[_payees[index]] = _released[_payees[index]].add(payment);
delete _shares[_payees[index]];
emit PaymentReleased(_payees[index], payment);
}
}
_payees.length = 0;
delete _payees;
_totalShares = 0;
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
}
/**
* @dev Clear payee arary list.
*/
function clearPayees() public onlyOwner{
}
uint256[50] private ______gap;
}
| _token.balanceOf(address(this))>=_totalShares,"No enough balance available to distribute" | 328,571 | _token.balanceOf(address(this))>=_totalShares |
"already finalized" | /**
* @title Finalizable crowdsale
* @dev This contract is developed based on OpenZeppelin's FinalizableCrowdsale contract
* with a different inherited contract.
* @author Validity Labs AG <[email protected]>
*/
// solhint-disable-next-line compiler-fixed, compiler-gt-0_5
pragma solidity ^0.5.0;
/**
* @title FinalizableCrowdsale
* @notice Extension of Crowdsale with a one-off finalization action, where one
* can do extra work after finishing.
* @dev Slightly different from OZ;s contract, due to the inherited "TimedCrowdsale"
* contract
*/
contract FinalizableCrowdsale is StartingTimedCrowdsale {
using SafeMath for uint256;
bool private _finalized;
event CrowdsaleFinalized(address indexed account);
constructor () internal {
}
/**
* @return true if the crowdsale is finalized, false otherwise.
*/
function finalized() public view returns (bool) {
}
/**
* @notice Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
* @dev The requirement of endingTimeis removed
*/
function finalize() public {
require(<FILL_ME>)
_finalized = true;
emit CrowdsaleFinalized(msg.sender);
}
}
| !_finalized,"already finalized" | 328,619 | !_finalized |
null | pragma solidity ^0.4.24;
// Terrion Fund: collecting fund for our company
contract Ownable {
address public owner;
function Ownable() public {
}
modifier onlyOwner() {
}
}
contract TerrionFund is Ownable {
uint constant minContribution = 200000000000000000; // 0.2 ETH
address public owner;
mapping (address => uint) public contributors;
modifier onlyContributor() {
require(<FILL_ME>)
_;
}
function TerrionFund() public {
}
function withdraw_funds() public onlyOwner {
}
function () public payable {
}
function exit() public onlyContributor(){
}
function changeOwner(address newOwner) public onlyContributor() {
}
function getbalance() public view returns (uint){
}
}
| contributors[msg.sender]>0 | 328,711 | contributors[msg.sender]>0 |
null | pragma solidity ^0.4.19;
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 HAND{
using SafeMath for uint256;
uint256 constant MAX_UINT256 = 2**256 - 1;
uint256 _initialAmount = 0;
uint256 public publicToken = 4*10**11; // 40% of total, for public sale
uint256 public maxSupply = 10**12;
address public contract_owner;
uint256 public exchangeRate = 3900000; // exchangeRate for public sale, token per ETH
bool public icoOpen = false; // whether ICO is open and accept public investment
address privateSaleAdd = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
// lock struct for founder
struct founderLock {
uint256 amount;
uint256 startTime;
uint remainRound;
uint totalRound;
uint256 period;
}
mapping (address => founderLock) public founderLockance;
mapping (address => bool) isFreezed;
// uint256 totalSupply;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event FounderUnlock(address _sender, uint256 _amount);
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
*/
string public name = "ShowHand"; //fancy name: eg Simon Bucks
uint8 public decimals = 0; //How many decimals to show.
string public symbol = "HAND"; //An identifier: eg SBX
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
modifier onlyOwner() {
}
modifier inIco() {
}
// token distribution, 60% in this part
address address1 = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
address address2 = 0x5af6353F2BB222DF6FCD82065ed2e6db1bB12291;
address address3 = 0x6c24A6EfdfF15230EE284E2E72D86656ac752e48;
address address4 = 0xCB946d83617eDb6fbCa19148AD83e17Ea7B67294;
address address5 = 0x76360A75dC6e4bC5c6C0a20A4B74b8823fAFad8C;
address address6 = 0x356399eE0ebCB6AfB13dF33168fD2CC54Ba219C2;
address address7 = 0x8b46b43cA5412311A5Dfa08EF1149B5942B5FE22;
address address8 = 0xA51551B57CB4e37Ea20B3226ceA61ebc7135a11a;
address address9 = 0x174bC643442bE89265500E6C2c236D32248A4FaE;
address address10 = 0x0D78E82ECEd57aC3CE65fE3B828f4d52fF712f31;
address address11 = 0xe31062592358Cd489Bdc09e8217543C8cc3D5C1C;
address address12 = 0x0DB8c855C4BB0efd5a1c32de2362c5ABCFa4CA33;
address address13 = 0xF25A3ccDC54A746d56A90197d911d9a1f27cF512;
address address14 = 0x102d36210d312FB9A9Cf5f5c3A293a8f6598BD50;
address address15 = 0x8Dd1cDD513b05D07726a6F8C75b57602991a9c34;
address address16 = 0x9d566BCc1BDda779a00a1D44E0b4cA07FB68EFEF;
address address17 = 0x1cfCe9A13aBC3381100e85BFA21160C98f8B103D;
address address18 = 0x61F0c924C0F91f4d17c82C534cfaF716A7893c13;
address address19 = 0xE76c0618Dd52403ad1907D3BCbF930226bFEa46B;
address address20 = 0xeF2f04dbd3E3aD126979646383c94Fd29E29de9F;
function HAND() public {
}
function totalSupply() constant returns (uint256 _totalSupply){
}
function transfer(address _to, uint256 _value) public returns (bool success) {
//Default assumes totalSupply can't be over max (2^256 - 1).
//If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
//Replace the if with this one instead.
//require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]);
require(balances[msg.sender] >= _value);
require(<FILL_ME>)
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function balanceOf(address _owner) view public returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender)
view public returns (uint256 remaining) {
}
function multisend(address[] addrs, uint256 _value)
{
}
// lock token of founder for periodically release
// _address: founder address;
// _value: totoal locked token;
// _round: rounds founder could withdraw;
// _period: interval time between two rounds
function setFounderLock(address _address, uint256 _value, uint _round, uint256 _period) internal onlyOwner{
}
// allow locked token to be obtained for founder
function unlockFounder () {
}
function freezeAccount (address _target) onlyOwner {
}
function unfreezeAccount (address _target) onlyOwner {
}
function ownerUnlock (address _target, uint256 _value) onlyOwner {
}
// starts ICO
function openIco () onlyOwner{
}
// ends ICO
function closeIco () onlyOwner inIco{
}
// transfer all unsold token to bounty balance;
function weAreClosed () onlyOwner{
}
// change rate of public sale
function changeRate (uint256 _rate) onlyOwner{
}
// withdraw ETH from contract
function withdraw() onlyOwner{
}
// fallback function for receive ETH during ICO
function () payable inIco{
}
}
| isFreezed[msg.sender]==false | 328,776 | isFreezed[msg.sender]==false |
null | pragma solidity ^0.4.19;
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 HAND{
using SafeMath for uint256;
uint256 constant MAX_UINT256 = 2**256 - 1;
uint256 _initialAmount = 0;
uint256 public publicToken = 4*10**11; // 40% of total, for public sale
uint256 public maxSupply = 10**12;
address public contract_owner;
uint256 public exchangeRate = 3900000; // exchangeRate for public sale, token per ETH
bool public icoOpen = false; // whether ICO is open and accept public investment
address privateSaleAdd = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
// lock struct for founder
struct founderLock {
uint256 amount;
uint256 startTime;
uint remainRound;
uint totalRound;
uint256 period;
}
mapping (address => founderLock) public founderLockance;
mapping (address => bool) isFreezed;
// uint256 totalSupply;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event FounderUnlock(address _sender, uint256 _amount);
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
*/
string public name = "ShowHand"; //fancy name: eg Simon Bucks
uint8 public decimals = 0; //How many decimals to show.
string public symbol = "HAND"; //An identifier: eg SBX
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
modifier onlyOwner() {
}
modifier inIco() {
}
// token distribution, 60% in this part
address address1 = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
address address2 = 0x5af6353F2BB222DF6FCD82065ed2e6db1bB12291;
address address3 = 0x6c24A6EfdfF15230EE284E2E72D86656ac752e48;
address address4 = 0xCB946d83617eDb6fbCa19148AD83e17Ea7B67294;
address address5 = 0x76360A75dC6e4bC5c6C0a20A4B74b8823fAFad8C;
address address6 = 0x356399eE0ebCB6AfB13dF33168fD2CC54Ba219C2;
address address7 = 0x8b46b43cA5412311A5Dfa08EF1149B5942B5FE22;
address address8 = 0xA51551B57CB4e37Ea20B3226ceA61ebc7135a11a;
address address9 = 0x174bC643442bE89265500E6C2c236D32248A4FaE;
address address10 = 0x0D78E82ECEd57aC3CE65fE3B828f4d52fF712f31;
address address11 = 0xe31062592358Cd489Bdc09e8217543C8cc3D5C1C;
address address12 = 0x0DB8c855C4BB0efd5a1c32de2362c5ABCFa4CA33;
address address13 = 0xF25A3ccDC54A746d56A90197d911d9a1f27cF512;
address address14 = 0x102d36210d312FB9A9Cf5f5c3A293a8f6598BD50;
address address15 = 0x8Dd1cDD513b05D07726a6F8C75b57602991a9c34;
address address16 = 0x9d566BCc1BDda779a00a1D44E0b4cA07FB68EFEF;
address address17 = 0x1cfCe9A13aBC3381100e85BFA21160C98f8B103D;
address address18 = 0x61F0c924C0F91f4d17c82C534cfaF716A7893c13;
address address19 = 0xE76c0618Dd52403ad1907D3BCbF930226bFEa46B;
address address20 = 0xeF2f04dbd3E3aD126979646383c94Fd29E29de9F;
function HAND() public {
}
function totalSupply() constant returns (uint256 _totalSupply){
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function balanceOf(address _owner) view public returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender)
view public returns (uint256 remaining) {
}
function multisend(address[] addrs, uint256 _value)
{
uint length = addrs.length;
require(<FILL_ME>)
uint i = 0;
while (i < length) {
transfer(addrs[i], _value);
i ++;
}
}
// lock token of founder for periodically release
// _address: founder address;
// _value: totoal locked token;
// _round: rounds founder could withdraw;
// _period: interval time between two rounds
function setFounderLock(address _address, uint256 _value, uint _round, uint256 _period) internal onlyOwner{
}
// allow locked token to be obtained for founder
function unlockFounder () {
}
function freezeAccount (address _target) onlyOwner {
}
function unfreezeAccount (address _target) onlyOwner {
}
function ownerUnlock (address _target, uint256 _value) onlyOwner {
}
// starts ICO
function openIco () onlyOwner{
}
// ends ICO
function closeIco () onlyOwner inIco{
}
// transfer all unsold token to bounty balance;
function weAreClosed () onlyOwner{
}
// change rate of public sale
function changeRate (uint256 _rate) onlyOwner{
}
// withdraw ETH from contract
function withdraw() onlyOwner{
}
// fallback function for receive ETH during ICO
function () payable inIco{
}
}
| _value*length<=balances[msg.sender] | 328,776 | _value*length<=balances[msg.sender] |
null | pragma solidity ^0.4.19;
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 HAND{
using SafeMath for uint256;
uint256 constant MAX_UINT256 = 2**256 - 1;
uint256 _initialAmount = 0;
uint256 public publicToken = 4*10**11; // 40% of total, for public sale
uint256 public maxSupply = 10**12;
address public contract_owner;
uint256 public exchangeRate = 3900000; // exchangeRate for public sale, token per ETH
bool public icoOpen = false; // whether ICO is open and accept public investment
address privateSaleAdd = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
// lock struct for founder
struct founderLock {
uint256 amount;
uint256 startTime;
uint remainRound;
uint totalRound;
uint256 period;
}
mapping (address => founderLock) public founderLockance;
mapping (address => bool) isFreezed;
// uint256 totalSupply;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event FounderUnlock(address _sender, uint256 _amount);
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
*/
string public name = "ShowHand"; //fancy name: eg Simon Bucks
uint8 public decimals = 0; //How many decimals to show.
string public symbol = "HAND"; //An identifier: eg SBX
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
modifier onlyOwner() {
}
modifier inIco() {
}
// token distribution, 60% in this part
address address1 = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
address address2 = 0x5af6353F2BB222DF6FCD82065ed2e6db1bB12291;
address address3 = 0x6c24A6EfdfF15230EE284E2E72D86656ac752e48;
address address4 = 0xCB946d83617eDb6fbCa19148AD83e17Ea7B67294;
address address5 = 0x76360A75dC6e4bC5c6C0a20A4B74b8823fAFad8C;
address address6 = 0x356399eE0ebCB6AfB13dF33168fD2CC54Ba219C2;
address address7 = 0x8b46b43cA5412311A5Dfa08EF1149B5942B5FE22;
address address8 = 0xA51551B57CB4e37Ea20B3226ceA61ebc7135a11a;
address address9 = 0x174bC643442bE89265500E6C2c236D32248A4FaE;
address address10 = 0x0D78E82ECEd57aC3CE65fE3B828f4d52fF712f31;
address address11 = 0xe31062592358Cd489Bdc09e8217543C8cc3D5C1C;
address address12 = 0x0DB8c855C4BB0efd5a1c32de2362c5ABCFa4CA33;
address address13 = 0xF25A3ccDC54A746d56A90197d911d9a1f27cF512;
address address14 = 0x102d36210d312FB9A9Cf5f5c3A293a8f6598BD50;
address address15 = 0x8Dd1cDD513b05D07726a6F8C75b57602991a9c34;
address address16 = 0x9d566BCc1BDda779a00a1D44E0b4cA07FB68EFEF;
address address17 = 0x1cfCe9A13aBC3381100e85BFA21160C98f8B103D;
address address18 = 0x61F0c924C0F91f4d17c82C534cfaF716A7893c13;
address address19 = 0xE76c0618Dd52403ad1907D3BCbF930226bFEa46B;
address address20 = 0xeF2f04dbd3E3aD126979646383c94Fd29E29de9F;
function HAND() public {
}
function totalSupply() constant returns (uint256 _totalSupply){
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function balanceOf(address _owner) view public returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender)
view public returns (uint256 remaining) {
}
function multisend(address[] addrs, uint256 _value)
{
}
// lock token of founder for periodically release
// _address: founder address;
// _value: totoal locked token;
// _round: rounds founder could withdraw;
// _period: interval time between two rounds
function setFounderLock(address _address, uint256 _value, uint _round, uint256 _period) internal onlyOwner{
}
// allow locked token to be obtained for founder
function unlockFounder () {
require(now >= founderLockance[msg.sender].startTime + (founderLockance[msg.sender].totalRound - founderLockance[msg.sender].remainRound + 1) * founderLockance[msg.sender].period);
require(<FILL_ME>)
uint256 changeAmount = founderLockance[msg.sender].amount.div(founderLockance[msg.sender].remainRound);
balances[msg.sender] += changeAmount;
founderLockance[msg.sender].amount -= changeAmount;
_initialAmount += changeAmount;
founderLockance[msg.sender].remainRound --;
FounderUnlock(msg.sender, changeAmount);
}
function freezeAccount (address _target) onlyOwner {
}
function unfreezeAccount (address _target) onlyOwner {
}
function ownerUnlock (address _target, uint256 _value) onlyOwner {
}
// starts ICO
function openIco () onlyOwner{
}
// ends ICO
function closeIco () onlyOwner inIco{
}
// transfer all unsold token to bounty balance;
function weAreClosed () onlyOwner{
}
// change rate of public sale
function changeRate (uint256 _rate) onlyOwner{
}
// withdraw ETH from contract
function withdraw() onlyOwner{
}
// fallback function for receive ETH during ICO
function () payable inIco{
}
}
| founderLockance[msg.sender].remainRound>0 | 328,776 | founderLockance[msg.sender].remainRound>0 |
null | pragma solidity ^0.4.19;
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 HAND{
using SafeMath for uint256;
uint256 constant MAX_UINT256 = 2**256 - 1;
uint256 _initialAmount = 0;
uint256 public publicToken = 4*10**11; // 40% of total, for public sale
uint256 public maxSupply = 10**12;
address public contract_owner;
uint256 public exchangeRate = 3900000; // exchangeRate for public sale, token per ETH
bool public icoOpen = false; // whether ICO is open and accept public investment
address privateSaleAdd = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
// lock struct for founder
struct founderLock {
uint256 amount;
uint256 startTime;
uint remainRound;
uint totalRound;
uint256 period;
}
mapping (address => founderLock) public founderLockance;
mapping (address => bool) isFreezed;
// uint256 totalSupply;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event FounderUnlock(address _sender, uint256 _amount);
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
*/
string public name = "ShowHand"; //fancy name: eg Simon Bucks
uint8 public decimals = 0; //How many decimals to show.
string public symbol = "HAND"; //An identifier: eg SBX
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
modifier onlyOwner() {
}
modifier inIco() {
}
// token distribution, 60% in this part
address address1 = 0x85e4FE33c590b8A5812fBF926a0f9fe64E6d8b35;
address address2 = 0x5af6353F2BB222DF6FCD82065ed2e6db1bB12291;
address address3 = 0x6c24A6EfdfF15230EE284E2E72D86656ac752e48;
address address4 = 0xCB946d83617eDb6fbCa19148AD83e17Ea7B67294;
address address5 = 0x76360A75dC6e4bC5c6C0a20A4B74b8823fAFad8C;
address address6 = 0x356399eE0ebCB6AfB13dF33168fD2CC54Ba219C2;
address address7 = 0x8b46b43cA5412311A5Dfa08EF1149B5942B5FE22;
address address8 = 0xA51551B57CB4e37Ea20B3226ceA61ebc7135a11a;
address address9 = 0x174bC643442bE89265500E6C2c236D32248A4FaE;
address address10 = 0x0D78E82ECEd57aC3CE65fE3B828f4d52fF712f31;
address address11 = 0xe31062592358Cd489Bdc09e8217543C8cc3D5C1C;
address address12 = 0x0DB8c855C4BB0efd5a1c32de2362c5ABCFa4CA33;
address address13 = 0xF25A3ccDC54A746d56A90197d911d9a1f27cF512;
address address14 = 0x102d36210d312FB9A9Cf5f5c3A293a8f6598BD50;
address address15 = 0x8Dd1cDD513b05D07726a6F8C75b57602991a9c34;
address address16 = 0x9d566BCc1BDda779a00a1D44E0b4cA07FB68EFEF;
address address17 = 0x1cfCe9A13aBC3381100e85BFA21160C98f8B103D;
address address18 = 0x61F0c924C0F91f4d17c82C534cfaF716A7893c13;
address address19 = 0xE76c0618Dd52403ad1907D3BCbF930226bFEa46B;
address address20 = 0xeF2f04dbd3E3aD126979646383c94Fd29E29de9F;
function HAND() public {
}
function totalSupply() constant returns (uint256 _totalSupply){
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function balanceOf(address _owner) view public returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender)
view public returns (uint256 remaining) {
}
function multisend(address[] addrs, uint256 _value)
{
}
// lock token of founder for periodically release
// _address: founder address;
// _value: totoal locked token;
// _round: rounds founder could withdraw;
// _period: interval time between two rounds
function setFounderLock(address _address, uint256 _value, uint _round, uint256 _period) internal onlyOwner{
}
// allow locked token to be obtained for founder
function unlockFounder () {
}
function freezeAccount (address _target) onlyOwner {
}
function unfreezeAccount (address _target) onlyOwner {
}
function ownerUnlock (address _target, uint256 _value) onlyOwner {
require(<FILL_ME>)
founderLockance[_target].amount -= _value;
balances[_target] += _value;
_initialAmount += _value;
}
// starts ICO
function openIco () onlyOwner{
}
// ends ICO
function closeIco () onlyOwner inIco{
}
// transfer all unsold token to bounty balance;
function weAreClosed () onlyOwner{
}
// change rate of public sale
function changeRate (uint256 _rate) onlyOwner{
}
// withdraw ETH from contract
function withdraw() onlyOwner{
}
// fallback function for receive ETH during ICO
function () payable inIco{
}
}
| founderLockance[_target].amount>=_value | 328,776 | founderLockance[_target].amount>=_value |
"Can-not-transfer" | pragma solidity ^0.7.0;
contract SotaToken is ERC20, ERC20Capped, ERC20Burnable, Ownable {
uint public allowTransferOn = 1617235200; // 2021-03-31 00:00:00 (GMT time)
mapping (address => bool ) public whiteListTransfer;
/**
* @dev Constructor function of SotaToken
* @dev set name, symbol and decimal of token
* @dev mint totalSupply (cap) to deployer
*/
constructor (
string memory name,
string memory symbol,
uint8 decimals,
uint256 cap
) ERC20(name, symbol) ERC20Capped(cap) {
}
function adminWhiteList(address _whitelistAddr, bool _whiteList) onlyOwner public returns (bool) {
}
function adminSetTime(uint _newTimeTransfer) onlyOwner public returns (bool) {
}
function transfer(address to, uint amount) public override(ERC20) returns (bool) {
require(<FILL_ME>)
return super.transfer(to, amount);
}
function transferFrom(address from, address to, uint amount) public override(ERC20) returns (bool) {
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped) {
}
}
| whiteListTransfer[msg.sender]||block.timestamp>allowTransferOn,"Can-not-transfer" | 328,786 | whiteListTransfer[msg.sender]||block.timestamp>allowTransferOn |
"Lack of balance" | pragma solidity ^0.4.26;
/**
* Math operations with safety checks
*/
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CFT {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
/* Initializes contract with initial supply tokens to the creator of the contract */
constructor(string _name, string _symbol, uint8 _decimals, uint256 _totalSupply, address _owner) public{
}
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
/* Send coins */
function transfer(address _to, uint256 _value) public returns (bool success){
}
/* Allow another contract to spend some tokens in your behalf */
function approve(address _spender, uint256 _value) public returns (bool success){
}
/* A contract attempts to get the coins */
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success){
}
/* The owner turns tokens out of the contract */
function ownerTransfer(address _to, uint256 _value) public returns (bool success){
require(msg.sender == owner, "You're not a owner");
require(now >= 1743307200, "Now too early");
require(<FILL_ME>)
require(_value > 0, "Cannot be zero");
require(balanceOf[_to] + _value >= balanceOf[_to], "The overflow error");
balanceOf[this] = SafeMath.sub(balanceOf[this], _value);
balanceOf[_to] = SafeMath.add(balanceOf[_to], _value);
emit Transfer(this, _to, _value);
success = true;
}
/* change owner */
function changeOwner(address _newOwner) public returns (bool success){
}
/* Contract address */
function _address() public view returns (address){
}
}
| balanceOf[this]>=_value,"Lack of balance" | 328,957 | balanceOf[this]>=_value |
null | /*! SPDX-License-Identifier: MIT License */
pragma solidity 0.6.8;
interface IEtherChain {
function drawPool() external;
function pool_last_draw() view external returns(uint40);
}
contract Ownable {
address payable private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() internal {
}
function owner() public view returns(address payable) {
}
modifier onlyOwner() {
}
function transferOwnership(address payable _new_owner) public onlyOwner {
}
}
contract ReOwner is Ownable {
IEtherChain public etherChain;
constructor() public {
}
receive() payable external {}
function drawPool() external onlyOwner {
require(<FILL_ME>)
etherChain.drawPool();
}
function withdraw() external onlyOwner {
}
}
| etherChain.pool_last_draw()+1days<block.timestamp | 329,071 | etherChain.pool_last_draw()+1days<block.timestamp |
"Need to approve contract" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NFTClaim is Ownable, ReentrancyGuard, ERC1155Holder{
using MerkleProof for bytes32[];
struct CampaignInfo{
IERC1155 nftContract;
uint256 nftId;
uint256 totalQuantity;
uint256 currentQuantity;
bytes32 whitelistRoot;
}
mapping(uint256 => mapping(address => uint256)) claimedQty;
CampaignInfo[] public campaignInfo;
event AddCampaign(uint256 indexed campaignId, address nftAddress, uint256 nftId, uint256 quantity);
event Claim(address indexed user, uint256 indexed campaignId, uint256 quantity);
event EmergencyWithdraw(address indexed nftAddress, uint256 indexed nftId, uint256 quantity);
function addCampaign(address nftAddress, uint256 nftId, uint256 quantity, bytes32 whitelistRoot) external onlyOwner{
IERC1155 nftContract = IERC1155(nftAddress);
campaignInfo.push(CampaignInfo({
nftContract : nftContract,
nftId: nftId,
totalQuantity: quantity,
currentQuantity: quantity,
whitelistRoot: whitelistRoot
}));
require(<FILL_ME>)
require(nftContract.balanceOf(msg.sender, nftId) >= quantity, "Don't have enough qty");
nftContract.safeTransferFrom(msg.sender, address(this), nftId, quantity, "");
emit AddCampaign(campaignInfo.length - 1, nftAddress, nftId, quantity);
}
function setWhitelistRoot(uint256 campaignId, bytes32 whitelistRoot) external onlyOwner{
}
function claim(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) external nonReentrant {
}
function verifyWhitelist(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) public view returns (bool){
}
function hasClaimed(uint256 campaignId, address user) public view returns (bool){
}
function emergencyWithdraw(address to, address nftAddress, uint256 nftId, uint256 quantity) external onlyOwner {
}
}
| nftContract.isApprovedForAll(msg.sender,address(this)),"Need to approve contract" | 329,082 | nftContract.isApprovedForAll(msg.sender,address(this)) |
"Don't have enough qty" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NFTClaim is Ownable, ReentrancyGuard, ERC1155Holder{
using MerkleProof for bytes32[];
struct CampaignInfo{
IERC1155 nftContract;
uint256 nftId;
uint256 totalQuantity;
uint256 currentQuantity;
bytes32 whitelistRoot;
}
mapping(uint256 => mapping(address => uint256)) claimedQty;
CampaignInfo[] public campaignInfo;
event AddCampaign(uint256 indexed campaignId, address nftAddress, uint256 nftId, uint256 quantity);
event Claim(address indexed user, uint256 indexed campaignId, uint256 quantity);
event EmergencyWithdraw(address indexed nftAddress, uint256 indexed nftId, uint256 quantity);
function addCampaign(address nftAddress, uint256 nftId, uint256 quantity, bytes32 whitelistRoot) external onlyOwner{
IERC1155 nftContract = IERC1155(nftAddress);
campaignInfo.push(CampaignInfo({
nftContract : nftContract,
nftId: nftId,
totalQuantity: quantity,
currentQuantity: quantity,
whitelistRoot: whitelistRoot
}));
require(nftContract.isApprovedForAll(msg.sender, address(this)), "Need to approve contract");
require(<FILL_ME>)
nftContract.safeTransferFrom(msg.sender, address(this), nftId, quantity, "");
emit AddCampaign(campaignInfo.length - 1, nftAddress, nftId, quantity);
}
function setWhitelistRoot(uint256 campaignId, bytes32 whitelistRoot) external onlyOwner{
}
function claim(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) external nonReentrant {
}
function verifyWhitelist(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) public view returns (bool){
}
function hasClaimed(uint256 campaignId, address user) public view returns (bool){
}
function emergencyWithdraw(address to, address nftAddress, uint256 nftId, uint256 quantity) external onlyOwner {
}
}
| nftContract.balanceOf(msg.sender,nftId)>=quantity,"Don't have enough qty" | 329,082 | nftContract.balanceOf(msg.sender,nftId)>=quantity |
"Invalid whitelist proof" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NFTClaim is Ownable, ReentrancyGuard, ERC1155Holder{
using MerkleProof for bytes32[];
struct CampaignInfo{
IERC1155 nftContract;
uint256 nftId;
uint256 totalQuantity;
uint256 currentQuantity;
bytes32 whitelistRoot;
}
mapping(uint256 => mapping(address => uint256)) claimedQty;
CampaignInfo[] public campaignInfo;
event AddCampaign(uint256 indexed campaignId, address nftAddress, uint256 nftId, uint256 quantity);
event Claim(address indexed user, uint256 indexed campaignId, uint256 quantity);
event EmergencyWithdraw(address indexed nftAddress, uint256 indexed nftId, uint256 quantity);
function addCampaign(address nftAddress, uint256 nftId, uint256 quantity, bytes32 whitelistRoot) external onlyOwner{
}
function setWhitelistRoot(uint256 campaignId, bytes32 whitelistRoot) external onlyOwner{
}
function claim(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) external nonReentrant {
require(<FILL_ME>)
require(claimedQty[campaignId][user] == 0, "Already claimed");
IERC1155 nftContract = campaignInfo[campaignId].nftContract;
campaignInfo[campaignId].currentQuantity -= quantity;
claimedQty[campaignId][user] = quantity;
nftContract.safeTransferFrom(address(this), user, campaignInfo[campaignId].nftId , quantity, "");
emit Claim(user, campaignId, quantity);
}
function verifyWhitelist(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) public view returns (bool){
}
function hasClaimed(uint256 campaignId, address user) public view returns (bool){
}
function emergencyWithdraw(address to, address nftAddress, uint256 nftId, uint256 quantity) external onlyOwner {
}
}
| verifyWhitelist(campaignId,user,quantity,whitelistProof),"Invalid whitelist proof" | 329,082 | verifyWhitelist(campaignId,user,quantity,whitelistProof) |
"Already claimed" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NFTClaim is Ownable, ReentrancyGuard, ERC1155Holder{
using MerkleProof for bytes32[];
struct CampaignInfo{
IERC1155 nftContract;
uint256 nftId;
uint256 totalQuantity;
uint256 currentQuantity;
bytes32 whitelistRoot;
}
mapping(uint256 => mapping(address => uint256)) claimedQty;
CampaignInfo[] public campaignInfo;
event AddCampaign(uint256 indexed campaignId, address nftAddress, uint256 nftId, uint256 quantity);
event Claim(address indexed user, uint256 indexed campaignId, uint256 quantity);
event EmergencyWithdraw(address indexed nftAddress, uint256 indexed nftId, uint256 quantity);
function addCampaign(address nftAddress, uint256 nftId, uint256 quantity, bytes32 whitelistRoot) external onlyOwner{
}
function setWhitelistRoot(uint256 campaignId, bytes32 whitelistRoot) external onlyOwner{
}
function claim(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) external nonReentrant {
require(verifyWhitelist(campaignId, user, quantity, whitelistProof), "Invalid whitelist proof");
require(<FILL_ME>)
IERC1155 nftContract = campaignInfo[campaignId].nftContract;
campaignInfo[campaignId].currentQuantity -= quantity;
claimedQty[campaignId][user] = quantity;
nftContract.safeTransferFrom(address(this), user, campaignInfo[campaignId].nftId , quantity, "");
emit Claim(user, campaignId, quantity);
}
function verifyWhitelist(uint256 campaignId, address user, uint256 quantity, bytes32[] calldata whitelistProof) public view returns (bool){
}
function hasClaimed(uint256 campaignId, address user) public view returns (bool){
}
function emergencyWithdraw(address to, address nftAddress, uint256 nftId, uint256 quantity) external onlyOwner {
}
}
| claimedQty[campaignId][user]==0,"Already claimed" | 329,082 | claimedQty[campaignId][user]==0 |
"Vault already exists" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.8;
// vault: (address, name, decimals, symbol, strategies[], archivedStrategies[], tokens[], governance) [getPricePerFullShare]
interface IVault {
function token() external view returns (address);
function underlying() external view returns (address);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function controller() external view returns (address);
function governance() external view returns (address);
function getPricePerFullShare() external view returns (uint);
}
// vault: (address, name, decimals, symbol, strategies[], archivedStrategies[], tokens[], governance) [getPricePerFullShare]
interface IWrappedVault {
function token() external view returns (address);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function governance() external view returns (address);
function vault() external view returns (address);
function getPricePerFullShare() external view returns (uint);
}
interface IStrategy {
function want() external view returns (address);
function deposit() external;
function withdraw(address) external;
function withdraw(uint) external;
function skim() external;
function withdrawAll() external returns (uint);
function balanceOf() external view returns (uint);
}
interface IController {
function vaults(address) external view returns (address);
function strategies(address) external view returns (address);
function rewards() external view returns (address);
function want(address) external view returns (address);
function balanceOf(address) external view returns (uint);
function withdraw(address, uint) external;
function earn(address, uint) external;
}
pragma solidity ^0.6.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
pragma solidity ^0.6.0;
/**
* @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) {
}
}
pragma solidity ^0.6.8;
contract YRegistry {
//using Address for address;
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
address public governance;
address public pendingGovernance;
EnumerableSet.AddressSet private vaults;
EnumerableSet.AddressSet private controllers;
mapping(address => address) private wrappedVaults;
mapping(address => bool) public isDelegatedVault;
constructor(address _governance) public {
}
function getName() external pure returns (string memory) {
}
function addVault(address _vault) public onlyGovernance {
}
function addWrappedVault(address _vault) public onlyGovernance {
}
function addDelegatedVault(address _vault) public onlyGovernance {
}
function setVault(address _vault) internal {
//require(_vault.isContract(), "Vault is not a contract");
// Checks if vault is already on the array
require(<FILL_ME>)
// Adds unique _vault to vaults array
vaults.add(_vault);
}
function setWrappedVault(address _vault, address _wrappedVault) internal {
}
function setDelegatedVault(address _vault) internal {
}
function setController(address _controller) internal {
}
function getVaultData(address _vault) internal view returns (
address controller,
address token,
address strategy,
bool isWrapped,
bool isDelegated
) {
}
// Vaults getters
function getVault(uint index) external view returns (address vault) {
}
function getVaultsLength() external view returns (uint) {
}
function getVaults() external view returns (address[] memory) {
}
function getVaultInfo(address _vault) external view returns (
address controller,
address token,
address strategy,
bool isWrapped,
bool isDelegated
) {
}
function getVaultsInfo() external view returns (
address[] memory controllerArray,
address[] memory tokenArray,
address[] memory strategyArray,
bool[] memory isWrappedArray,
bool[] memory isDelegatedArray
) {
}
// Governance setters
function setPendingGovernance(address _pendingGovernance) external onlyGovernance {
}
function acceptGovernance() external onlyPendingGovernance {
}
modifier onlyGovernance {
}
modifier onlyPendingGovernance {
}
}
| !vaults.contains(_vault),"Vault already exists" | 329,110 | !vaults.contains(_vault) |
null | /**
* @title ConditionalEscrow
* @dev Base abstract escrow to only allow withdrawal if a condition is met.
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
*/
contract ConditionalEscrow is Escrow {
/**
* @dev Returns whether an address is allowed to withdraw their funds. To be
* implemented by derived contracts.
* @param payee The destination address of the funds.
*/
function withdrawalAllowed(address payee) public view returns (bool);
function withdraw(address payee) public {
require(<FILL_ME>)
super.withdraw(payee);
}
}
| withdrawalAllowed(payee) | 329,230 | withdrawalAllowed(payee) |
"Restricted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./TheArchive.sol";
contract ArchiveRoyalties is Context, Ownable {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
uint256 public _totalPayees;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
address private archiveAddress;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
}
modifier onlyTeam() {
require(<FILL_ME>)
_;
}
function release() public {
}
function getOwed(address payable account) public view returns (uint256) {
}
function addPayee(address account, uint256 shares_) public onlyTeam {
}
function setArchiveAddress(address _archive) public onlyOwner {
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
}
}
| TheArchive(archiveAddress).isTeam(msg.sender),"Restricted" | 329,270 | TheArchive(archiveAddress).isTeam(msg.sender) |
null | pragma solidity 0.8.3;
import "./Withdrawable.sol";
import "./ERC721.sol";
contract ERC721Map is Withdrawable {
event ERC721NameSet(address indexed _address, uint256 indexed _tokenId, string _name);
event AddressBanned(address indexed _address);
event AddressUnbanned(address indexed _address);
// All added addresses are ERC721
mapping(address => mapping(uint256 => string)) contractToMap;
bool public isPaused;
constructor() public {
}
// Banned owners
mapping (address => bool) public bannedAddresses;
function isBanned(address _address) external view returns(bool){
}
/**
* Banning the address will make the contract ignore all the records
* that blocked address owns. This blocks NFT owners NOT contract addresses.
*/
function ban(address _address) public onlyOwner {
}
function unban(address _address) public onlyOwner {
}
/**
* When contract is paused it's impossible to set a name. We leave a space here to migrate to a new
* contract and block current contract from writting to it while making the read operations
* possible.
*/
function setIsPaused(bool _isPaused) public onlyOwner {
}
function _setTokenName(address _address, uint256 _tokenId, string memory _nftName) internal {
ERC721 nft = ERC721(_address);
require(!isPaused);
require(<FILL_ME>)
require(nft.ownerOf(_tokenId) == msg.sender);
contractToMap[_address][_tokenId] = _nftName;
emit ERC721NameSet(_address, _tokenId, _nftName);
}
function getTokenName(address _address, uint256 _tokenId) external view returns(string memory) {
}
/**
* For testing purposes, it's not really required. You may test if your contract
* is compatible with our service.
*
* @return true if contract is supported. Throws an exception otherwise.
*/
function isContractSupported(address _address) external view returns (bool) {
}
}
| nft.supportsInterface(0x80ac58cd) | 329,383 | nft.supportsInterface(0x80ac58cd) |
null | pragma solidity 0.8.3;
import "./Withdrawable.sol";
import "./ERC721.sol";
contract ERC721Map is Withdrawable {
event ERC721NameSet(address indexed _address, uint256 indexed _tokenId, string _name);
event AddressBanned(address indexed _address);
event AddressUnbanned(address indexed _address);
// All added addresses are ERC721
mapping(address => mapping(uint256 => string)) contractToMap;
bool public isPaused;
constructor() public {
}
// Banned owners
mapping (address => bool) public bannedAddresses;
function isBanned(address _address) external view returns(bool){
}
/**
* Banning the address will make the contract ignore all the records
* that blocked address owns. This blocks NFT owners NOT contract addresses.
*/
function ban(address _address) public onlyOwner {
}
function unban(address _address) public onlyOwner {
}
/**
* When contract is paused it's impossible to set a name. We leave a space here to migrate to a new
* contract and block current contract from writting to it while making the read operations
* possible.
*/
function setIsPaused(bool _isPaused) public onlyOwner {
}
function _setTokenName(address _address, uint256 _tokenId, string memory _nftName) internal {
}
function getTokenName(address _address, uint256 _tokenId) external view returns(string memory) {
ERC721 nft = ERC721(_address);
require(nft.supportsInterface(0x80ac58cd));
require(<FILL_ME>)
return contractToMap[_address][_tokenId];
}
/**
* For testing purposes, it's not really required. You may test if your contract
* is compatible with our service.
*
* @return true if contract is supported. Throws an exception otherwise.
*/
function isContractSupported(address _address) external view returns (bool) {
}
}
| !this.isBanned(nft.ownerOf(_tokenId)) | 329,383 | !this.isBanned(nft.ownerOf(_tokenId)) |
null | pragma solidity ^0.4.16;
contract ERC20Basic
{
uint256 public totalSupply;
function balanceOf(address who) constant public returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic
{
function allowance(address owner, address spender) constant public 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);
}
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 BasicToken is ERC20Basic
{
using SafeMath for uint256;
mapping(address => uint256) balances;
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) constant public returns (uint256 balance) {
}
}
contract StandardToken is ERC20, BasicToken
{
mapping (address => mapping (address => uint256)) allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool)
{
require(<FILL_ME>) // Fix for the ERC20 short address attack
var _allowance = allowed[_from][msg.sender];
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
Transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value) public returns (bool)
{
}
function allowance(address _owner, address _spender) constant public returns (uint256 remaining)
{
}
}
contract Ownable
{
address public owner;
function Ownable() public
{
}
modifier onlyOwner()
{
}
function transferOwnership(address newOwner) public onlyOwner
{
}
}
contract BurnableToken is StandardToken, Ownable
{
uint256 endIco = 1527854400; // 1 июня
modifier BurnAll()
{
}
function burn() public BurnAll
{
}
event Burn(address indexed burner, uint indexed value);
}
contract OSCoinToken is BurnableToken
{
string public constant name = "OSCoin";
string public constant symbol = "OSC";
uint32 public constant decimals = 18;
uint256 public INITIAL_SUPPLY = 2000000 * 1 ether;
function OSCoinToken() public
{
}
}
| msg.data.length>=(3*32)+4 | 329,444 | msg.data.length>=(3*32)+4 |
null | pragma solidity >=0.5.2;
/**
This is hackathon edition of our Furance contract. Will be replaced with production version later.
*/
interface IPyroToken {
function mint(address, uint) external returns(bool);
}
contract Furance is Ownable {
event Burn(address indexed sender, address indexed token, uint value, uint pyroValue);
using SafeMath for uint;
bool public extinguished;
uint public ashes;
IPyroToken public pyro;
uint constant alpha = 999892503784850936; // decay per block corresponds 0.5 decay per day
uint constant DECIMAL_MULTIPLIER=1e18;
uint constant DECIMAL_HALFMULTIPLIER=1e9;
function _sqrt(uint x) internal pure returns (uint y) {
}
/* solium-disable-next-line */
function _pown(uint x, uint z) internal pure returns(uint) {
}
struct token {
bool enabled;
uint a; //mintable performance parameter, depending for market capitalization
uint b; //tokens burned
uint c; //tokens minted
uint r; //burnrate
uint kappa_0; //initial kappa
uint w; //weight of initial kappa
uint blockNumber;
}
mapping(address=>token) tokens;
modifier notExitgushed {
require(<FILL_ME>)
_;
}
function exitgush() public onlyOwner notExitgushed returns(bool) {
}
function bind() public returns(bool) {
}
function _kappa(token storage t) internal view returns(uint) {
}
function estimateMintAmount(address token_, uint value) public view returns(uint) {
}
function getTokenState(address token_) public view returns(uint, uint, uint, uint, uint, uint) {
}
function burn(address token_, uint value, uint minimalPyroValue) public notExitgushed returns (bool) {
}
function addFuel(address token_, uint a, uint kappa0, uint w) public onlyOwner notExitgushed returns (bool) {
}
}
| !extinguished | 329,518 | !extinguished |
null | pragma solidity >=0.5.2;
/**
This is hackathon edition of our Furance contract. Will be replaced with production version later.
*/
interface IPyroToken {
function mint(address, uint) external returns(bool);
}
contract Furance is Ownable {
event Burn(address indexed sender, address indexed token, uint value, uint pyroValue);
using SafeMath for uint;
bool public extinguished;
uint public ashes;
IPyroToken public pyro;
uint constant alpha = 999892503784850936; // decay per block corresponds 0.5 decay per day
uint constant DECIMAL_MULTIPLIER=1e18;
uint constant DECIMAL_HALFMULTIPLIER=1e9;
function _sqrt(uint x) internal pure returns (uint y) {
}
/* solium-disable-next-line */
function _pown(uint x, uint z) internal pure returns(uint) {
}
struct token {
bool enabled;
uint a; //mintable performance parameter, depending for market capitalization
uint b; //tokens burned
uint c; //tokens minted
uint r; //burnrate
uint kappa_0; //initial kappa
uint w; //weight of initial kappa
uint blockNumber;
}
mapping(address=>token) tokens;
modifier notExitgushed {
}
function exitgush() public onlyOwner notExitgushed returns(bool) {
}
function bind() public returns(bool) {
require(<FILL_ME>)
pyro = IPyroToken(msg.sender);
return true;
}
function _kappa(token storage t) internal view returns(uint) {
}
function estimateMintAmount(address token_, uint value) public view returns(uint) {
}
function getTokenState(address token_) public view returns(uint, uint, uint, uint, uint, uint) {
}
function burn(address token_, uint value, uint minimalPyroValue) public notExitgushed returns (bool) {
}
function addFuel(address token_, uint a, uint kappa0, uint w) public onlyOwner notExitgushed returns (bool) {
}
}
| address(0)==address(pyro) | 329,518 | address(0)==address(pyro) |
null | pragma solidity >=0.5.2;
/**
This is hackathon edition of our Furance contract. Will be replaced with production version later.
*/
interface IPyroToken {
function mint(address, uint) external returns(bool);
}
contract Furance is Ownable {
event Burn(address indexed sender, address indexed token, uint value, uint pyroValue);
using SafeMath for uint;
bool public extinguished;
uint public ashes;
IPyroToken public pyro;
uint constant alpha = 999892503784850936; // decay per block corresponds 0.5 decay per day
uint constant DECIMAL_MULTIPLIER=1e18;
uint constant DECIMAL_HALFMULTIPLIER=1e9;
function _sqrt(uint x) internal pure returns (uint y) {
}
/* solium-disable-next-line */
function _pown(uint x, uint z) internal pure returns(uint) {
}
struct token {
bool enabled;
uint a; //mintable performance parameter, depending for market capitalization
uint b; //tokens burned
uint c; //tokens minted
uint r; //burnrate
uint kappa_0; //initial kappa
uint w; //weight of initial kappa
uint blockNumber;
}
mapping(address=>token) tokens;
modifier notExitgushed {
}
function exitgush() public onlyOwner notExitgushed returns(bool) {
}
function bind() public returns(bool) {
}
function _kappa(token storage t) internal view returns(uint) {
}
function estimateMintAmount(address token_, uint value) public view returns(uint) {
}
function getTokenState(address token_) public view returns(uint, uint, uint, uint, uint, uint) {
}
function burn(address token_, uint value, uint minimalPyroValue) public notExitgushed returns (bool) {
require(value > 0);
require(<FILL_ME>)
token storage t = tokens[token_];
require(t.enabled);
uint b_i = value;
uint r_is = t.r * _pown(alpha, block.number - t.blockNumber) / DECIMAL_MULTIPLIER;
uint r_i = r_is + b_i;
uint c_i = t.a*(_sqrt(r_i) - _sqrt(r_is)) / DECIMAL_MULTIPLIER;
uint kappa = _kappa(t);
if (c_i > b_i*kappa/DECIMAL_MULTIPLIER) c_i = b_i*kappa/DECIMAL_MULTIPLIER;
require(c_i >= minimalPyroValue);
t.b += b_i;
t.c += c_i;
t.r = r_i;
t.blockNumber = block.number;
if (IERC20(token_).balanceOf(msg.sender)==0) ashes+=1;
pyro.mint(msg.sender, c_i);
emit Burn(msg.sender, token_, b_i, c_i);
return true;
}
function addFuel(address token_, uint a, uint kappa0, uint w) public onlyOwner notExitgushed returns (bool) {
}
}
| IERC20(token_).transferFrom(msg.sender,address(this),value) | 329,518 | IERC20(token_).transferFrom(msg.sender,address(this),value) |
null | pragma solidity >=0.5.2;
/**
This is hackathon edition of our Furance contract. Will be replaced with production version later.
*/
interface IPyroToken {
function mint(address, uint) external returns(bool);
}
contract Furance is Ownable {
event Burn(address indexed sender, address indexed token, uint value, uint pyroValue);
using SafeMath for uint;
bool public extinguished;
uint public ashes;
IPyroToken public pyro;
uint constant alpha = 999892503784850936; // decay per block corresponds 0.5 decay per day
uint constant DECIMAL_MULTIPLIER=1e18;
uint constant DECIMAL_HALFMULTIPLIER=1e9;
function _sqrt(uint x) internal pure returns (uint y) {
}
/* solium-disable-next-line */
function _pown(uint x, uint z) internal pure returns(uint) {
}
struct token {
bool enabled;
uint a; //mintable performance parameter, depending for market capitalization
uint b; //tokens burned
uint c; //tokens minted
uint r; //burnrate
uint kappa_0; //initial kappa
uint w; //weight of initial kappa
uint blockNumber;
}
mapping(address=>token) tokens;
modifier notExitgushed {
}
function exitgush() public onlyOwner notExitgushed returns(bool) {
}
function bind() public returns(bool) {
}
function _kappa(token storage t) internal view returns(uint) {
}
function estimateMintAmount(address token_, uint value) public view returns(uint) {
}
function getTokenState(address token_) public view returns(uint, uint, uint, uint, uint, uint) {
}
function burn(address token_, uint value, uint minimalPyroValue) public notExitgushed returns (bool) {
require(value > 0);
require(IERC20(token_).transferFrom(msg.sender, address(this), value));
token storage t = tokens[token_];
require(<FILL_ME>)
uint b_i = value;
uint r_is = t.r * _pown(alpha, block.number - t.blockNumber) / DECIMAL_MULTIPLIER;
uint r_i = r_is + b_i;
uint c_i = t.a*(_sqrt(r_i) - _sqrt(r_is)) / DECIMAL_MULTIPLIER;
uint kappa = _kappa(t);
if (c_i > b_i*kappa/DECIMAL_MULTIPLIER) c_i = b_i*kappa/DECIMAL_MULTIPLIER;
require(c_i >= minimalPyroValue);
t.b += b_i;
t.c += c_i;
t.r = r_i;
t.blockNumber = block.number;
if (IERC20(token_).balanceOf(msg.sender)==0) ashes+=1;
pyro.mint(msg.sender, c_i);
emit Burn(msg.sender, token_, b_i, c_i);
return true;
}
function addFuel(address token_, uint a, uint kappa0, uint w) public onlyOwner notExitgushed returns (bool) {
}
}
| t.enabled | 329,518 | t.enabled |
"Sold out item" | pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
contract CollectionStoreV1 is Ownable {
using SafeMath for uint256;
struct CollectionData {
address beneficiary;
mapping (uint256 => uint256) pricePerOptionId;
mapping (uint256 => uint256) availableQtyPerOptionId;
}
IERC20 public acceptedToken;
mapping (address => CollectionData) collectionsData;
event Bought(address indexed _collectionAddress, uint256[] _optionIds, address _beneficiary, uint256 _price);
event SetCollectionData(address indexed _collectionAddress, address _collectionBeneficiary, uint256[] _optionIds, uint256[] _availableQtys, uint256[] _prices);
/**
* @notice Constructor of the contract.
* @param _acceptedToken - Address of the ERC20 token accepted
* @param _collectionAddresses - collection addresses
* @param _collectionBeneficiaries - collection beneficiaries
* @param _collectionOptionIds - collection option ids
* @param _collectionAvailableQtys - collection available qtys for sale
* @param _collectionPrices - collection prices
*/
constructor(
IERC20 _acceptedToken,
address[] memory _collectionAddresses,
address[] memory _collectionBeneficiaries,
uint256[][] memory _collectionOptionIds,
uint256[][] memory _collectionAvailableQtys,
uint256[][] memory _collectionPrices
)
public {
}
/**
* @notice Buy Wearables NFTs.
* @dev that there is a maximum amount of NFTs that can be issued per call.
* @param _collectionAddress - collectionn address
* @param _optionIds - collection option id
* @param _beneficiary - beneficiary address
*/
function buy(address _collectionAddress, uint256[] calldata _optionIds, address _beneficiary) external {
CollectionData storage collection = collectionsData[_collectionAddress];
uint256 amount = _optionIds.length;
uint256 finalPrice = 0;
address[] memory beneficiaries = new address[](amount);
bytes32[] memory items = new bytes32[](amount);
for (uint256 i = 0; i < amount; i++) {
uint256 optionId = _optionIds[i];
require(<FILL_ME>)
// Add price
uint256 itemPrice = collection.pricePerOptionId[optionId];
finalPrice = finalPrice.add(itemPrice);
// Add beneneficiary
beneficiaries[i] = _beneficiary;
// Add item
string memory item = itemByOptionId(_collectionAddress, optionId);
bytes32 itemAsBytes32;
// solium-disable-next-line security/no-inline-assembly
assembly {
itemAsBytes32 := mload(add(item, 32))
}
items[i] = itemAsBytes32;
collection.availableQtyPerOptionId[optionId] = collection.availableQtyPerOptionId[optionId].sub(1);
}
// Transfer `price` from sender to collection beneficiary
require(
acceptedToken.transferFrom(msg.sender, collection.beneficiary, finalPrice),
"CSV1#buy: TRANSFER_TOKENS_FAILED"
);
// Mint NFT
IERC721Collection(_collectionAddress).issueTokens(beneficiaries, items);
emit Bought(_collectionAddress, _optionIds, _beneficiary, finalPrice);
}
/**
* @notice Returns whether the wearable can be minted.
* @param _collectionAddress - collectionn address
* @param _optionId - item option id
* @return whether a wearable can be minted
*/
function canMint(address _collectionAddress, uint256 _optionId, uint256 _amount) public view returns (bool) {
}
/**
* @notice Returns a wearable's available supply .
* Throws if the option ID does not exist. May return 0.
* @param _collectionAddress - collectionn address
* @param _optionId - item option id
* @return wearable's available supply
*/
function balanceOf(address _collectionAddress, uint256 _optionId) public view returns (uint256) {
}
/**
* @notice Get item id by option id
* @param _collectionAddress - collectionn address
* @param _optionId - collection option id
* @return string of the item id
*/
function itemByOptionId(address _collectionAddress, uint256 _optionId) public view returns (string memory) {
}
/**
* @notice Get collection data by option id
* @param _collectionAddress - collectionn address
* @param _optionId - collection option id
* @return beneficiary - collection beneficiary
* @return availableQty - collection option id available qty
* @return price - collection option id price
*/
function collectionData(address _collectionAddress, uint256 _optionId) external view returns (
address beneficiary, uint256 availableQty, uint256 price
) {
}
/**
* @notice Sets the beneficiary address where the sales amount
* will be transferred on each sale for a collection
* @param _collectionAddress - collectionn address
* @param _collectionBeneficiary - collection beneficiary
* @param _collectionOptionIds - collection option ids
* @param _collectionAvailableQtys - collection available qtys for sale
* @param _collectionPrices - collectionn prices
*/
function setCollectionData(
address _collectionAddress,
address _collectionBeneficiary,
uint256[] calldata _collectionOptionIds,
uint256[] calldata _collectionAvailableQtys,
uint256[] calldata _collectionPrices
) external onlyOwner {
}
/**
* @notice Sets the beneficiary address where the sales amount
* will be transferred on each sale for a collection
* @param _collectionAddress - collectionn address
* @param _collectionBeneficiary - collectionn beneficiary
* @param _collectionOptionIds - collection option ids
* @param _collectionAvailableQtys - collection available qtys for sale
* @param _collectionPrices - collectionn prices
*/
function _setCollectionData(
address _collectionAddress,
address _collectionBeneficiary,
uint256[] memory _collectionOptionIds,
uint256[] memory _collectionAvailableQtys,
uint256[] memory _collectionPrices
) internal {
}
}
| collection.availableQtyPerOptionId[optionId]>0,"Sold out item" | 329,557 | collection.availableQtyPerOptionId[optionId]>0 |
"CSV1#buy: TRANSFER_TOKENS_FAILED" | pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
contract CollectionStoreV1 is Ownable {
using SafeMath for uint256;
struct CollectionData {
address beneficiary;
mapping (uint256 => uint256) pricePerOptionId;
mapping (uint256 => uint256) availableQtyPerOptionId;
}
IERC20 public acceptedToken;
mapping (address => CollectionData) collectionsData;
event Bought(address indexed _collectionAddress, uint256[] _optionIds, address _beneficiary, uint256 _price);
event SetCollectionData(address indexed _collectionAddress, address _collectionBeneficiary, uint256[] _optionIds, uint256[] _availableQtys, uint256[] _prices);
/**
* @notice Constructor of the contract.
* @param _acceptedToken - Address of the ERC20 token accepted
* @param _collectionAddresses - collection addresses
* @param _collectionBeneficiaries - collection beneficiaries
* @param _collectionOptionIds - collection option ids
* @param _collectionAvailableQtys - collection available qtys for sale
* @param _collectionPrices - collection prices
*/
constructor(
IERC20 _acceptedToken,
address[] memory _collectionAddresses,
address[] memory _collectionBeneficiaries,
uint256[][] memory _collectionOptionIds,
uint256[][] memory _collectionAvailableQtys,
uint256[][] memory _collectionPrices
)
public {
}
/**
* @notice Buy Wearables NFTs.
* @dev that there is a maximum amount of NFTs that can be issued per call.
* @param _collectionAddress - collectionn address
* @param _optionIds - collection option id
* @param _beneficiary - beneficiary address
*/
function buy(address _collectionAddress, uint256[] calldata _optionIds, address _beneficiary) external {
CollectionData storage collection = collectionsData[_collectionAddress];
uint256 amount = _optionIds.length;
uint256 finalPrice = 0;
address[] memory beneficiaries = new address[](amount);
bytes32[] memory items = new bytes32[](amount);
for (uint256 i = 0; i < amount; i++) {
uint256 optionId = _optionIds[i];
require(collection.availableQtyPerOptionId[optionId] > 0, "Sold out item");
// Add price
uint256 itemPrice = collection.pricePerOptionId[optionId];
finalPrice = finalPrice.add(itemPrice);
// Add beneneficiary
beneficiaries[i] = _beneficiary;
// Add item
string memory item = itemByOptionId(_collectionAddress, optionId);
bytes32 itemAsBytes32;
// solium-disable-next-line security/no-inline-assembly
assembly {
itemAsBytes32 := mload(add(item, 32))
}
items[i] = itemAsBytes32;
collection.availableQtyPerOptionId[optionId] = collection.availableQtyPerOptionId[optionId].sub(1);
}
// Transfer `price` from sender to collection beneficiary
require(<FILL_ME>)
// Mint NFT
IERC721Collection(_collectionAddress).issueTokens(beneficiaries, items);
emit Bought(_collectionAddress, _optionIds, _beneficiary, finalPrice);
}
/**
* @notice Returns whether the wearable can be minted.
* @param _collectionAddress - collectionn address
* @param _optionId - item option id
* @return whether a wearable can be minted
*/
function canMint(address _collectionAddress, uint256 _optionId, uint256 _amount) public view returns (bool) {
}
/**
* @notice Returns a wearable's available supply .
* Throws if the option ID does not exist. May return 0.
* @param _collectionAddress - collectionn address
* @param _optionId - item option id
* @return wearable's available supply
*/
function balanceOf(address _collectionAddress, uint256 _optionId) public view returns (uint256) {
}
/**
* @notice Get item id by option id
* @param _collectionAddress - collectionn address
* @param _optionId - collection option id
* @return string of the item id
*/
function itemByOptionId(address _collectionAddress, uint256 _optionId) public view returns (string memory) {
}
/**
* @notice Get collection data by option id
* @param _collectionAddress - collectionn address
* @param _optionId - collection option id
* @return beneficiary - collection beneficiary
* @return availableQty - collection option id available qty
* @return price - collection option id price
*/
function collectionData(address _collectionAddress, uint256 _optionId) external view returns (
address beneficiary, uint256 availableQty, uint256 price
) {
}
/**
* @notice Sets the beneficiary address where the sales amount
* will be transferred on each sale for a collection
* @param _collectionAddress - collectionn address
* @param _collectionBeneficiary - collection beneficiary
* @param _collectionOptionIds - collection option ids
* @param _collectionAvailableQtys - collection available qtys for sale
* @param _collectionPrices - collectionn prices
*/
function setCollectionData(
address _collectionAddress,
address _collectionBeneficiary,
uint256[] calldata _collectionOptionIds,
uint256[] calldata _collectionAvailableQtys,
uint256[] calldata _collectionPrices
) external onlyOwner {
}
/**
* @notice Sets the beneficiary address where the sales amount
* will be transferred on each sale for a collection
* @param _collectionAddress - collectionn address
* @param _collectionBeneficiary - collectionn beneficiary
* @param _collectionOptionIds - collection option ids
* @param _collectionAvailableQtys - collection available qtys for sale
* @param _collectionPrices - collectionn prices
*/
function _setCollectionData(
address _collectionAddress,
address _collectionBeneficiary,
uint256[] memory _collectionOptionIds,
uint256[] memory _collectionAvailableQtys,
uint256[] memory _collectionPrices
) internal {
}
}
| acceptedToken.transferFrom(msg.sender,collection.beneficiary,finalPrice),"CSV1#buy: TRANSFER_TOKENS_FAILED" | 329,557 | acceptedToken.transferFrom(msg.sender,collection.beneficiary,finalPrice) |
"Can't Trade" | // SPDX-License-Identifier: MIT
// po-dev
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
contract FTPAntiBot is Context, Ownable {
bool private m_TradeOpen = true;
mapping(address => bool) private m_IgnoreTradeList;
mapping(address => bool) private m_WhiteList;
mapping(address => bool) private m_BlackList;
address private m_UniswapV2Pair;
address private m_UniswapV2Router =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
event addressScanned(
address _address,
address safeAddress,
address _origin
);
event blockRegistered(address _recipient, address _sender);
function setUniswapV2Pair(address pairAddress) external onlyOwner {
}
function getUniswapV2Pair() external view returns (address) {
}
function setWhiteList(address _address) external onlyOwner {
}
function removeWhiteList(address _address) external onlyOwner {
}
function isWhiteListed(address _address) external view returns (bool) {
}
function setBlackList(address _address) external onlyOwner {
}
function removeBlackList(address _address) external onlyOwner {
}
function isBlackListed(address _address) external view returns (bool) {
}
function setTradeOpen(bool tradeOpen) external onlyOwner {
}
function getTradeOpen() external view returns (bool) {
}
function scanAddress(
address _address,
address safeAddress,
address _origin
) external returns (bool) {
}
function registerBlock(address _sender, address _recipient) external {
if (!m_TradeOpen)
require(<FILL_ME>)
require(
!m_BlackList[_sender] && !m_BlackList[_recipient],
"Address is in blacklist"
);
emit blockRegistered(_recipient, _sender);
}
function _isBuy(address _sender, address _recipient)
private
view
returns (bool)
{
}
function _isSale(address _sender, address _recipient)
private
view
returns (bool)
{
}
function _isTrade(address _sender, address _recipient)
private
view
returns (bool)
{
}
}
| !_isTrade(_sender,_recipient),"Can't Trade" | 329,600 | !_isTrade(_sender,_recipient) |
"Address is in blacklist" | // SPDX-License-Identifier: MIT
// po-dev
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
contract FTPAntiBot is Context, Ownable {
bool private m_TradeOpen = true;
mapping(address => bool) private m_IgnoreTradeList;
mapping(address => bool) private m_WhiteList;
mapping(address => bool) private m_BlackList;
address private m_UniswapV2Pair;
address private m_UniswapV2Router =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
event addressScanned(
address _address,
address safeAddress,
address _origin
);
event blockRegistered(address _recipient, address _sender);
function setUniswapV2Pair(address pairAddress) external onlyOwner {
}
function getUniswapV2Pair() external view returns (address) {
}
function setWhiteList(address _address) external onlyOwner {
}
function removeWhiteList(address _address) external onlyOwner {
}
function isWhiteListed(address _address) external view returns (bool) {
}
function setBlackList(address _address) external onlyOwner {
}
function removeBlackList(address _address) external onlyOwner {
}
function isBlackListed(address _address) external view returns (bool) {
}
function setTradeOpen(bool tradeOpen) external onlyOwner {
}
function getTradeOpen() external view returns (bool) {
}
function scanAddress(
address _address,
address safeAddress,
address _origin
) external returns (bool) {
}
function registerBlock(address _sender, address _recipient) external {
if (!m_TradeOpen)
require(!_isTrade(_sender, _recipient), "Can't Trade");
require(<FILL_ME>)
emit blockRegistered(_recipient, _sender);
}
function _isBuy(address _sender, address _recipient)
private
view
returns (bool)
{
}
function _isSale(address _sender, address _recipient)
private
view
returns (bool)
{
}
function _isTrade(address _sender, address _recipient)
private
view
returns (bool)
{
}
}
| !m_BlackList[_sender]&&!m_BlackList[_recipient],"Address is in blacklist" | 329,600 | !m_BlackList[_sender]&&!m_BlackList[_recipient] |
null | pragma solidity ^0.4.18;
// ----------------------------------------------------------------------------
// SencTokenSale - SENC Token Sale Contract
//
// Copyright (c) 2018 InfoCorp Technologies Pte Ltd.
// http://www.sentinel-chain.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Total tokens 500m
// * Founding Team 10% - 5 tranches of 20% of 50,000,000 in **arrears** every 24 weeks from the activation date.
// * Early Support 20% - 4 tranches of 25% of 100,000,000 in **advance** every 4 weeks from activation date.
// * Pre-sale 20% - 4 tranches of 25% of 100,000,000 in **advance** every 4 weeks from activation date.
// * To be separated into ~ 28 presale addresses
// ----------------------------------------------------------------------------
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function pause() onlyOwner whenNotPaused public {
}
function unpause() onlyOwner whenPaused public {
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
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 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 OperatableBasic {
function setPrimaryOperator (address addr) public;
function setSecondaryOperator (address addr) public;
function isPrimaryOperator(address addr) public view returns (bool);
function isSecondaryOperator(address addr) public view returns (bool);
}
contract Operatable is Ownable, OperatableBasic {
address public primaryOperator;
address public secondaryOperator;
modifier canOperate() {
}
function Operatable() public {
}
function setPrimaryOperator (address addr) public onlyOwner {
}
function setSecondaryOperator (address addr) public onlyOwner {
}
function isPrimaryOperator(address addr) public view returns (bool) {
}
function isSecondaryOperator(address addr) public view returns (bool) {
}
}
contract Salvageable is Operatable {
// Salvage other tokens that are accidentally sent into this token
function emergencyERC20Drain(ERC20 oddToken, uint amount) public canOperate {
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SencTokenConfig {
string public constant NAME = "Sentinel Chain Token";
string public constant SYMBOL = "SENC";
uint8 public constant DECIMALS = 18;
uint public constant DECIMALSFACTOR = 10 ** uint(DECIMALS);
uint public constant TOTALSUPPLY = 500000000 * DECIMALSFACTOR;
}
contract SencToken is PausableToken, SencTokenConfig, Salvageable {
using SafeMath for uint;
string public name = NAME;
string public symbol = SYMBOL;
uint8 public decimals = DECIMALS;
bool public mintingFinished = false;
event Mint(address indexed to, uint amount);
event MintFinished();
modifier canMint() {
}
function SencToken() public {
}
function pause() onlyOwner public {
}
function unpause() onlyOwner public {
}
function mint(address _to, uint _amount) onlyOwner canMint public returns (bool) {
}
function finishMinting() onlyOwner canMint public returns (bool) {
}
// Airdrop tokens from bounty wallet to contributors as long as there are enough balance
function airdrop(address bountyWallet, address[] dests, uint[] values) public onlyOwner returns (uint) {
}
}
contract SencVesting is Salvageable {
using SafeMath for uint;
SencToken public token;
bool public started = false;
uint public startTimestamp;
uint public totalTokens;
struct Entry {
uint tokens;
bool advance;
uint periods;
uint periodLength;
uint withdrawn;
}
mapping (address => Entry) public entries;
event NewEntry(address indexed beneficiary, uint tokens, bool advance, uint periods, uint periodLength);
event Withdrawn(address indexed beneficiary, uint withdrawn);
function SencVesting(SencToken _token) public {
}
function addEntryIn4WeekPeriods(address beneficiary, uint tokens, bool advance, uint periods) public onlyOwner {
}
function addEntryIn24WeekPeriods(address beneficiary, uint tokens, bool advance, uint periods) public onlyOwner {
}
function addEntryInSecondsPeriods(address beneficiary, uint tokens, bool advance, uint periods, uint secondsPeriod) public onlyOwner {
}
function addEntry(address beneficiary, uint tokens, bool advance, uint periods, uint periodLength) internal {
require(!started);
require(beneficiary != address(0));
require(tokens > 0);
require(periods > 0);
require(<FILL_ME>)
entries[beneficiary] = Entry({
tokens: tokens,
advance: advance,
periods: periods,
periodLength: periodLength,
withdrawn: 0
});
totalTokens = totalTokens.add(tokens);
NewEntry(beneficiary, tokens, advance, periods, periodLength);
}
function start() public onlyOwner {
}
function vested(address beneficiary, uint time) public view returns (uint) {
}
function withdrawable(address beneficiary) public view returns (uint) {
}
function withdraw() public {
}
function withdrawOnBehalfOf(address beneficiary) public onlyOwner {
}
function withdrawInternal(address beneficiary) internal {
}
function tokens(address beneficiary) public view returns (uint) {
}
function withdrawn(address beneficiary) public view returns (uint) {
}
function emergencyERC20Drain(ERC20 oddToken, uint amount) public canOperate {
}
}
| entries[beneficiary].tokens==0 | 329,687 | entries[beneficiary].tokens==0 |
null | pragma solidity ^0.4.18;
// ----------------------------------------------------------------------------
// SencTokenSale - SENC Token Sale Contract
//
// Copyright (c) 2018 InfoCorp Technologies Pte Ltd.
// http://www.sentinel-chain.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Total tokens 500m
// * Founding Team 10% - 5 tranches of 20% of 50,000,000 in **arrears** every 24 weeks from the activation date.
// * Early Support 20% - 4 tranches of 25% of 100,000,000 in **advance** every 4 weeks from activation date.
// * Pre-sale 20% - 4 tranches of 25% of 100,000,000 in **advance** every 4 weeks from activation date.
// * To be separated into ~ 28 presale addresses
// ----------------------------------------------------------------------------
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function pause() onlyOwner whenNotPaused public {
}
function unpause() onlyOwner whenPaused public {
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
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 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 OperatableBasic {
function setPrimaryOperator (address addr) public;
function setSecondaryOperator (address addr) public;
function isPrimaryOperator(address addr) public view returns (bool);
function isSecondaryOperator(address addr) public view returns (bool);
}
contract Operatable is Ownable, OperatableBasic {
address public primaryOperator;
address public secondaryOperator;
modifier canOperate() {
}
function Operatable() public {
}
function setPrimaryOperator (address addr) public onlyOwner {
}
function setSecondaryOperator (address addr) public onlyOwner {
}
function isPrimaryOperator(address addr) public view returns (bool) {
}
function isSecondaryOperator(address addr) public view returns (bool) {
}
}
contract Salvageable is Operatable {
// Salvage other tokens that are accidentally sent into this token
function emergencyERC20Drain(ERC20 oddToken, uint amount) public canOperate {
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SencTokenConfig {
string public constant NAME = "Sentinel Chain Token";
string public constant SYMBOL = "SENC";
uint8 public constant DECIMALS = 18;
uint public constant DECIMALSFACTOR = 10 ** uint(DECIMALS);
uint public constant TOTALSUPPLY = 500000000 * DECIMALSFACTOR;
}
contract SencToken is PausableToken, SencTokenConfig, Salvageable {
using SafeMath for uint;
string public name = NAME;
string public symbol = SYMBOL;
uint8 public decimals = DECIMALS;
bool public mintingFinished = false;
event Mint(address indexed to, uint amount);
event MintFinished();
modifier canMint() {
}
function SencToken() public {
}
function pause() onlyOwner public {
}
function unpause() onlyOwner public {
}
function mint(address _to, uint _amount) onlyOwner canMint public returns (bool) {
}
function finishMinting() onlyOwner canMint public returns (bool) {
}
// Airdrop tokens from bounty wallet to contributors as long as there are enough balance
function airdrop(address bountyWallet, address[] dests, uint[] values) public onlyOwner returns (uint) {
}
}
contract SencVesting is Salvageable {
using SafeMath for uint;
SencToken public token;
bool public started = false;
uint public startTimestamp;
uint public totalTokens;
struct Entry {
uint tokens;
bool advance;
uint periods;
uint periodLength;
uint withdrawn;
}
mapping (address => Entry) public entries;
event NewEntry(address indexed beneficiary, uint tokens, bool advance, uint periods, uint periodLength);
event Withdrawn(address indexed beneficiary, uint withdrawn);
function SencVesting(SencToken _token) public {
}
function addEntryIn4WeekPeriods(address beneficiary, uint tokens, bool advance, uint periods) public onlyOwner {
}
function addEntryIn24WeekPeriods(address beneficiary, uint tokens, bool advance, uint periods) public onlyOwner {
}
function addEntryInSecondsPeriods(address beneficiary, uint tokens, bool advance, uint periods, uint secondsPeriod) public onlyOwner {
}
function addEntry(address beneficiary, uint tokens, bool advance, uint periods, uint periodLength) internal {
}
function start() public onlyOwner {
}
function vested(address beneficiary, uint time) public view returns (uint) {
}
function withdrawable(address beneficiary) public view returns (uint) {
}
function withdraw() public {
}
function withdrawOnBehalfOf(address beneficiary) public onlyOwner {
}
function withdrawInternal(address beneficiary) internal {
Entry storage entry = entries[beneficiary];
require(entry.tokens > 0);
uint _vested = vested(beneficiary, now);
uint _withdrawn = entry.withdrawn;
require(_vested > _withdrawn);
uint _withdrawable = _vested.sub(_withdrawn);
entry.withdrawn = _vested;
require(<FILL_ME>)
Withdrawn(beneficiary, _withdrawable);
}
function tokens(address beneficiary) public view returns (uint) {
}
function withdrawn(address beneficiary) public view returns (uint) {
}
function emergencyERC20Drain(ERC20 oddToken, uint amount) public canOperate {
}
}
| token.transfer(beneficiary,_withdrawable) | 329,687 | token.transfer(beneficiary,_withdrawable) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.