comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
'Not whitelisted' | pragma solidity ^0.8.9;
/**
* @title GenerativeDungeon contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract GenerativeDungeon is ERC721Enumerable, Ownable {
string public NFT_PROVENANCE = "";
string public BASE_METADATA_URI = "";
string public CONTRACT_METADATA_URI = "";
uint256 public startingIndexBlock;
uint256 public startingIndex;
uint256 public PRICE = 0.07 ether;
uint256 public PRICE_WHITELIST = 0.05 ether;
uint256 public MAX_NFTS_PLUS_1;
uint256 public WALLET_LIMIT = 4; // compare will use < to save gas, so actually 3/wallet
uint256 public WALLET_LIMIT_WHITELIST = 3; // compare will use < to save gas, so actually 2/wallet
bool public saleIsActive = false;
bool private locked; // for re-entrancy guard
struct AccountInfo {
uint256 mintedNFTs; // number of NFTs this wallet address has minted
}
mapping(address => AccountInfo) public accountInfoList;
constructor() ERC721("GenerativeDungeon", "GENDUN") {
}
// from openzeppelin-contracts/contracts/security/ReentrancyGuard.sol
modifier nonReentrant() {
}
// for whitelisted mint
modifier onlyWhitelisted(uint8 _v,
bytes32 _r,
bytes32 _s
) {
require(<FILL_ME>)
_;
}
// to make OpenSea happy - returns a URL for the storefront-level metadata
// https://docs.opensea.io/docs/contract-level-metadata
function contractURI() public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _baseMetaDataURI) public onlyOwner {
}
function setContractURI(string memory _contractMetaDataURI) public onlyOwner {
}
/*
* in case market is volatile
*/
function setMaxNfts(uint _maxNfts) public onlyOwner {
}
/*
* in case Eth is volatile
*/
function setPrice(uint256 _newPrice) public onlyOwner() {
}
/*
* in case Eth is volatile
*/
function setPriceWhitelist(uint256 _newPrice) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWalletLimit(uint256 _newLimit) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWhitelistWalletLimit(uint256 _newLimit) public onlyOwner() {
}
function withdraw() public onlyOwner {
}
/**
* Set some tokens aside for giveaways, etc
*/
function reserveNfts(uint256 _amt) public onlyOwner {
}
/*
* Returns all the tokenIds owned by a user in one transaction
*
* (backup function in case The Graph is down/unreachable)
*/
function getNFTsByAddress(address _owner) public view returns (uint256[] memory) {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* allows whitelisted addresses to mint NFTs
*/
function mintWhitelist(uint256 _numberOfTokens,
uint8 _v,
bytes32 _r,
bytes32 _s) public payable nonReentrant onlyWhitelisted(_v, _r, _s) {
}
/**
* Mints NFTs
*/
function mint(uint256 _numberOfTokens) public payable nonReentrant {
}
/*
* airdrops ignore wallet limits
*/
function airDrop(address _addr, uint256 _numberOfTokens) public onlyOwner {
}
/**
* Set the starting index for the collection after all tokens have sold or 9 days have passed since launch
* we use that value to seed our deterministic random bit generator in the gaming code
*/
function setStartingIndex() public onlyOwner {
}
/*
* Set overall provenance once it's calculated to prove we haven't touched the generated images+code
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
}
| owner()==ecrecover(keccak256(abi.encodePacked('\x19Ethereum Signed Message:\n32',keccak256(abi.encodePacked(address(this),msg.sender)))),_v,_r,_s),'Not whitelisted' | 352,668 | owner()==ecrecover(keccak256(abi.encodePacked('\x19Ethereum Signed Message:\n32',keccak256(abi.encodePacked(address(this),msg.sender)))),_v,_r,_s) |
"Exceeds wallet limit" | pragma solidity ^0.8.9;
/**
* @title GenerativeDungeon contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract GenerativeDungeon is ERC721Enumerable, Ownable {
string public NFT_PROVENANCE = "";
string public BASE_METADATA_URI = "";
string public CONTRACT_METADATA_URI = "";
uint256 public startingIndexBlock;
uint256 public startingIndex;
uint256 public PRICE = 0.07 ether;
uint256 public PRICE_WHITELIST = 0.05 ether;
uint256 public MAX_NFTS_PLUS_1;
uint256 public WALLET_LIMIT = 4; // compare will use < to save gas, so actually 3/wallet
uint256 public WALLET_LIMIT_WHITELIST = 3; // compare will use < to save gas, so actually 2/wallet
bool public saleIsActive = false;
bool private locked; // for re-entrancy guard
struct AccountInfo {
uint256 mintedNFTs; // number of NFTs this wallet address has minted
}
mapping(address => AccountInfo) public accountInfoList;
constructor() ERC721("GenerativeDungeon", "GENDUN") {
}
// from openzeppelin-contracts/contracts/security/ReentrancyGuard.sol
modifier nonReentrant() {
}
// for whitelisted mint
modifier onlyWhitelisted(uint8 _v,
bytes32 _r,
bytes32 _s
) {
}
// to make OpenSea happy - returns a URL for the storefront-level metadata
// https://docs.opensea.io/docs/contract-level-metadata
function contractURI() public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _baseMetaDataURI) public onlyOwner {
}
function setContractURI(string memory _contractMetaDataURI) public onlyOwner {
}
/*
* in case market is volatile
*/
function setMaxNfts(uint _maxNfts) public onlyOwner {
}
/*
* in case Eth is volatile
*/
function setPrice(uint256 _newPrice) public onlyOwner() {
}
/*
* in case Eth is volatile
*/
function setPriceWhitelist(uint256 _newPrice) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWalletLimit(uint256 _newLimit) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWhitelistWalletLimit(uint256 _newLimit) public onlyOwner() {
}
function withdraw() public onlyOwner {
}
/**
* Set some tokens aside for giveaways, etc
*/
function reserveNfts(uint256 _amt) public onlyOwner {
}
/*
* Returns all the tokenIds owned by a user in one transaction
*
* (backup function in case The Graph is down/unreachable)
*/
function getNFTsByAddress(address _owner) public view returns (uint256[] memory) {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* allows whitelisted addresses to mint NFTs
*/
function mintWhitelist(uint256 _numberOfTokens,
uint8 _v,
bytes32 _r,
bytes32 _s) public payable nonReentrant onlyWhitelisted(_v, _r, _s) {
uint256 supply = totalSupply(); // store to save gas
require(<FILL_ME>)
// we hold the whitelist data off-chain and verify on-chain via onlyWhilelisted;
// still have to check against max nft supply in case people whitelist late
require(supply + _numberOfTokens < MAX_NFTS_PLUS_1, "Exceeds max NFT supply"); //use < rather than <= to save gas
require(msg.value >= PRICE_WHITELIST * _numberOfTokens, "Ether sent is not correct");
_numberOfTokens++; // +1 once for our for loop comparison here, to save gas
for(uint256 i=1; i < _numberOfTokens; i++) { // start at Token #1 so IDs aren't zero-based
accountInfoList[msg.sender].mintedNFTs++; // nonReentrant above prevents this from messing up
_safeMint(msg.sender, supply+i);
}
}
/**
* Mints NFTs
*/
function mint(uint256 _numberOfTokens) public payable nonReentrant {
}
/*
* airdrops ignore wallet limits
*/
function airDrop(address _addr, uint256 _numberOfTokens) public onlyOwner {
}
/**
* Set the starting index for the collection after all tokens have sold or 9 days have passed since launch
* we use that value to seed our deterministic random bit generator in the gaming code
*/
function setStartingIndex() public onlyOwner {
}
/*
* Set overall provenance once it's calculated to prove we haven't touched the generated images+code
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
}
| (_numberOfTokens+accountInfoList[msg.sender].mintedNFTs)<WALLET_LIMIT_WHITELIST,"Exceeds wallet limit" | 352,668 | (_numberOfTokens+accountInfoList[msg.sender].mintedNFTs)<WALLET_LIMIT_WHITELIST |
"Exceeds max NFT supply" | pragma solidity ^0.8.9;
/**
* @title GenerativeDungeon contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract GenerativeDungeon is ERC721Enumerable, Ownable {
string public NFT_PROVENANCE = "";
string public BASE_METADATA_URI = "";
string public CONTRACT_METADATA_URI = "";
uint256 public startingIndexBlock;
uint256 public startingIndex;
uint256 public PRICE = 0.07 ether;
uint256 public PRICE_WHITELIST = 0.05 ether;
uint256 public MAX_NFTS_PLUS_1;
uint256 public WALLET_LIMIT = 4; // compare will use < to save gas, so actually 3/wallet
uint256 public WALLET_LIMIT_WHITELIST = 3; // compare will use < to save gas, so actually 2/wallet
bool public saleIsActive = false;
bool private locked; // for re-entrancy guard
struct AccountInfo {
uint256 mintedNFTs; // number of NFTs this wallet address has minted
}
mapping(address => AccountInfo) public accountInfoList;
constructor() ERC721("GenerativeDungeon", "GENDUN") {
}
// from openzeppelin-contracts/contracts/security/ReentrancyGuard.sol
modifier nonReentrant() {
}
// for whitelisted mint
modifier onlyWhitelisted(uint8 _v,
bytes32 _r,
bytes32 _s
) {
}
// to make OpenSea happy - returns a URL for the storefront-level metadata
// https://docs.opensea.io/docs/contract-level-metadata
function contractURI() public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _baseMetaDataURI) public onlyOwner {
}
function setContractURI(string memory _contractMetaDataURI) public onlyOwner {
}
/*
* in case market is volatile
*/
function setMaxNfts(uint _maxNfts) public onlyOwner {
}
/*
* in case Eth is volatile
*/
function setPrice(uint256 _newPrice) public onlyOwner() {
}
/*
* in case Eth is volatile
*/
function setPriceWhitelist(uint256 _newPrice) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWalletLimit(uint256 _newLimit) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWhitelistWalletLimit(uint256 _newLimit) public onlyOwner() {
}
function withdraw() public onlyOwner {
}
/**
* Set some tokens aside for giveaways, etc
*/
function reserveNfts(uint256 _amt) public onlyOwner {
}
/*
* Returns all the tokenIds owned by a user in one transaction
*
* (backup function in case The Graph is down/unreachable)
*/
function getNFTsByAddress(address _owner) public view returns (uint256[] memory) {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* allows whitelisted addresses to mint NFTs
*/
function mintWhitelist(uint256 _numberOfTokens,
uint8 _v,
bytes32 _r,
bytes32 _s) public payable nonReentrant onlyWhitelisted(_v, _r, _s) {
uint256 supply = totalSupply(); // store to save gas
require((_numberOfTokens + accountInfoList[msg.sender].mintedNFTs) < WALLET_LIMIT_WHITELIST, "Exceeds wallet limit");
// we hold the whitelist data off-chain and verify on-chain via onlyWhilelisted;
// still have to check against max nft supply in case people whitelist late
require(<FILL_ME>) //use < rather than <= to save gas
require(msg.value >= PRICE_WHITELIST * _numberOfTokens, "Ether sent is not correct");
_numberOfTokens++; // +1 once for our for loop comparison here, to save gas
for(uint256 i=1; i < _numberOfTokens; i++) { // start at Token #1 so IDs aren't zero-based
accountInfoList[msg.sender].mintedNFTs++; // nonReentrant above prevents this from messing up
_safeMint(msg.sender, supply+i);
}
}
/**
* Mints NFTs
*/
function mint(uint256 _numberOfTokens) public payable nonReentrant {
}
/*
* airdrops ignore wallet limits
*/
function airDrop(address _addr, uint256 _numberOfTokens) public onlyOwner {
}
/**
* Set the starting index for the collection after all tokens have sold or 9 days have passed since launch
* we use that value to seed our deterministic random bit generator in the gaming code
*/
function setStartingIndex() public onlyOwner {
}
/*
* Set overall provenance once it's calculated to prove we haven't touched the generated images+code
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
}
| supply+_numberOfTokens<MAX_NFTS_PLUS_1,"Exceeds max NFT supply" | 352,668 | supply+_numberOfTokens<MAX_NFTS_PLUS_1 |
"Exceeds wallet limit" | pragma solidity ^0.8.9;
/**
* @title GenerativeDungeon contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract GenerativeDungeon is ERC721Enumerable, Ownable {
string public NFT_PROVENANCE = "";
string public BASE_METADATA_URI = "";
string public CONTRACT_METADATA_URI = "";
uint256 public startingIndexBlock;
uint256 public startingIndex;
uint256 public PRICE = 0.07 ether;
uint256 public PRICE_WHITELIST = 0.05 ether;
uint256 public MAX_NFTS_PLUS_1;
uint256 public WALLET_LIMIT = 4; // compare will use < to save gas, so actually 3/wallet
uint256 public WALLET_LIMIT_WHITELIST = 3; // compare will use < to save gas, so actually 2/wallet
bool public saleIsActive = false;
bool private locked; // for re-entrancy guard
struct AccountInfo {
uint256 mintedNFTs; // number of NFTs this wallet address has minted
}
mapping(address => AccountInfo) public accountInfoList;
constructor() ERC721("GenerativeDungeon", "GENDUN") {
}
// from openzeppelin-contracts/contracts/security/ReentrancyGuard.sol
modifier nonReentrant() {
}
// for whitelisted mint
modifier onlyWhitelisted(uint8 _v,
bytes32 _r,
bytes32 _s
) {
}
// to make OpenSea happy - returns a URL for the storefront-level metadata
// https://docs.opensea.io/docs/contract-level-metadata
function contractURI() public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _baseMetaDataURI) public onlyOwner {
}
function setContractURI(string memory _contractMetaDataURI) public onlyOwner {
}
/*
* in case market is volatile
*/
function setMaxNfts(uint _maxNfts) public onlyOwner {
}
/*
* in case Eth is volatile
*/
function setPrice(uint256 _newPrice) public onlyOwner() {
}
/*
* in case Eth is volatile
*/
function setPriceWhitelist(uint256 _newPrice) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWalletLimit(uint256 _newLimit) public onlyOwner() {
}
/*
* in case we need to adjust the wallet limit
*/
function setWhitelistWalletLimit(uint256 _newLimit) public onlyOwner() {
}
function withdraw() public onlyOwner {
}
/**
* Set some tokens aside for giveaways, etc
*/
function reserveNfts(uint256 _amt) public onlyOwner {
}
/*
* Returns all the tokenIds owned by a user in one transaction
*
* (backup function in case The Graph is down/unreachable)
*/
function getNFTsByAddress(address _owner) public view returns (uint256[] memory) {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* allows whitelisted addresses to mint NFTs
*/
function mintWhitelist(uint256 _numberOfTokens,
uint8 _v,
bytes32 _r,
bytes32 _s) public payable nonReentrant onlyWhitelisted(_v, _r, _s) {
}
/**
* Mints NFTs
*/
function mint(uint256 _numberOfTokens) public payable nonReentrant {
uint256 supply = totalSupply(); // store to save gas
require(saleIsActive, "Sale paused");
require(<FILL_ME>)
require(supply + _numberOfTokens < MAX_NFTS_PLUS_1, "Exceeds max NFT supply"); //use < rather than <= to save gas
require(msg.value >= PRICE * _numberOfTokens, "Ether sent is not correct");
_numberOfTokens++; // +1 once for our for loop comparison here, to save gas
for(uint256 i=1; i < _numberOfTokens; i++) { // start at Token #1 so IDs aren't zero-based
accountInfoList[msg.sender].mintedNFTs++; // nonReentrant above prevents this from messing up
_safeMint(msg.sender, supply+i);
}
// to save gas for minters, rather than automatically setting the starting block here,
// we'll manually set it by calling setStartingIndex when either
// 1) the last token has been sold, or 2) 9 days have passed since launch
}
/*
* airdrops ignore wallet limits
*/
function airDrop(address _addr, uint256 _numberOfTokens) public onlyOwner {
}
/**
* Set the starting index for the collection after all tokens have sold or 9 days have passed since launch
* we use that value to seed our deterministic random bit generator in the gaming code
*/
function setStartingIndex() public onlyOwner {
}
/*
* Set overall provenance once it's calculated to prove we haven't touched the generated images+code
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
}
| (_numberOfTokens+accountInfoList[msg.sender].mintedNFTs)<WALLET_LIMIT,"Exceeds wallet limit" | 352,668 | (_numberOfTokens+accountInfoList[msg.sender].mintedNFTs)<WALLET_LIMIT |
"_currentUnderlyingToken must be part of _underlyingTokens." | pragma solidity ^0.6.12;
// ERC20PausableUpgradeSafe,
// IERC20,
// SafeMath
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Pausable.sol";
// SafeERC20
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol";
// OwnableUpgradeSafe
// } from "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol";
/**
* @title LimaToken
* @author Lima Protocol
*
* Standard LimaToken.
*/
contract LimaTokenStorage is OwnableUpgradeSafe, OwnableLimaGovernance {
using AddressArrayUtils for address[];
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 public constant MAX_UINT256 = 2**256 - 1;
address public constant USDC = address(
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
);
// List of UnderlyingTokens
address[] public underlyingTokens;
address public currentUnderlyingToken;
// address public owner;
ILimaSwap public limaSwap;
address public limaToken;
//Fees
address public feeWallet;
uint256 public burnFee; // 1 / burnFee * burned amount == fee
uint256 public mintFee; // 1 / mintFee * minted amount == fee
uint256 public performanceFee;
//Rebalance
uint256 public lastUnderlyingBalancePer1000;
uint256 public lastRebalance;
uint256 public rebalanceInterval;
/**
* @dev Initializes contract
*/
function __LimaTokenStorage_init_unchained(
address _limaSwap,
address _feeWallet,
address _currentUnderlyingToken,
address[] memory _underlyingTokens,
uint256 _mintFee,
uint256 _burnFee,
uint256 _performanceFee
) public initializer {
require(<FILL_ME>)
__Ownable_init();
limaSwap = ILimaSwap(_limaSwap);
__OwnableLimaGovernance_init_unchained();
underlyingTokens = _underlyingTokens;
currentUnderlyingToken = _currentUnderlyingToken;
burnFee = _burnFee; //1/100 = 1%
mintFee = _mintFee;
performanceFee = _performanceFee; //1/10 = 10%
rebalanceInterval = 24 hours;
lastRebalance = now;
lastUnderlyingBalancePer1000 = 0;
feeWallet = _feeWallet;
}
/**
* @dev Throws if called by any account other than the limaGovernance.
*/
modifier onlyLimaGovernanceOrOwner() {
}
function _isLimaGovernanceOrOwner() internal view {
}
modifier onlyUnderlyingToken(address _token) {
}
function _isUnderlyingToken(address _token) internal view {
}
modifier noEmptyAddress(address _address) {
}
/* ============ Setter ============ */
function addUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
}
function removeUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
}
function setCurrentUnderlyingToken(address _currentUnderlyingToken)
external
onlyUnderlyingToken(_currentUnderlyingToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaToken(address _limaToken)
external
noEmptyAddress(_limaToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaSwap(address _limaSwap)
public
noEmptyAddress(_limaSwap)
onlyLimaGovernanceOrOwner
{
}
function setFeeWallet(address _feeWallet)
external
noEmptyAddress(_feeWallet)
onlyLimaGovernanceOrOwner
{
}
function setPerformanceFee(uint256 _performanceFee)
external
onlyLimaGovernanceOrOwner
{
}
function setBurnFee(uint256 _burnFee) external onlyLimaGovernanceOrOwner {
}
function setMintFee(uint256 _mintFee) external onlyLimaGovernanceOrOwner {
}
function setLastUnderlyingBalancePer1000(
uint256 _lastUnderlyingBalancePer1000
) external onlyLimaGovernanceOrOwner {
}
function setLastRebalance(uint256 _lastRebalance)
external
onlyLimaGovernanceOrOwner
{
}
function setRebalanceInterval(uint256 _rebalanceInterval)
external
onlyLimaGovernanceOrOwner
{
}
/* ============ View ============ */
function isUnderlyingTokens(address _underlyingToken)
public
view
returns (bool)
{
}
}
| _underlyingTokens.contains(_currentUnderlyingToken),"_currentUnderlyingToken must be part of _underlyingTokens." | 352,687 | _underlyingTokens.contains(_currentUnderlyingToken) |
"LS2" | pragma solidity ^0.6.12;
// ERC20PausableUpgradeSafe,
// IERC20,
// SafeMath
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Pausable.sol";
// SafeERC20
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol";
// OwnableUpgradeSafe
// } from "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol";
/**
* @title LimaToken
* @author Lima Protocol
*
* Standard LimaToken.
*/
contract LimaTokenStorage is OwnableUpgradeSafe, OwnableLimaGovernance {
using AddressArrayUtils for address[];
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 public constant MAX_UINT256 = 2**256 - 1;
address public constant USDC = address(
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
);
// List of UnderlyingTokens
address[] public underlyingTokens;
address public currentUnderlyingToken;
// address public owner;
ILimaSwap public limaSwap;
address public limaToken;
//Fees
address public feeWallet;
uint256 public burnFee; // 1 / burnFee * burned amount == fee
uint256 public mintFee; // 1 / mintFee * minted amount == fee
uint256 public performanceFee;
//Rebalance
uint256 public lastUnderlyingBalancePer1000;
uint256 public lastRebalance;
uint256 public rebalanceInterval;
/**
* @dev Initializes contract
*/
function __LimaTokenStorage_init_unchained(
address _limaSwap,
address _feeWallet,
address _currentUnderlyingToken,
address[] memory _underlyingTokens,
uint256 _mintFee,
uint256 _burnFee,
uint256 _performanceFee
) public initializer {
}
/**
* @dev Throws if called by any account other than the limaGovernance.
*/
modifier onlyLimaGovernanceOrOwner() {
}
function _isLimaGovernanceOrOwner() internal view {
require(<FILL_ME>)
}
modifier onlyUnderlyingToken(address _token) {
}
function _isUnderlyingToken(address _token) internal view {
}
modifier noEmptyAddress(address _address) {
}
/* ============ Setter ============ */
function addUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
}
function removeUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
}
function setCurrentUnderlyingToken(address _currentUnderlyingToken)
external
onlyUnderlyingToken(_currentUnderlyingToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaToken(address _limaToken)
external
noEmptyAddress(_limaToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaSwap(address _limaSwap)
public
noEmptyAddress(_limaSwap)
onlyLimaGovernanceOrOwner
{
}
function setFeeWallet(address _feeWallet)
external
noEmptyAddress(_feeWallet)
onlyLimaGovernanceOrOwner
{
}
function setPerformanceFee(uint256 _performanceFee)
external
onlyLimaGovernanceOrOwner
{
}
function setBurnFee(uint256 _burnFee) external onlyLimaGovernanceOrOwner {
}
function setMintFee(uint256 _mintFee) external onlyLimaGovernanceOrOwner {
}
function setLastUnderlyingBalancePer1000(
uint256 _lastUnderlyingBalancePer1000
) external onlyLimaGovernanceOrOwner {
}
function setLastRebalance(uint256 _lastRebalance)
external
onlyLimaGovernanceOrOwner
{
}
function setRebalanceInterval(uint256 _rebalanceInterval)
external
onlyLimaGovernanceOrOwner
{
}
/* ============ View ============ */
function isUnderlyingTokens(address _underlyingToken)
public
view
returns (bool)
{
}
}
| limaGovernance()==_msgSender()||owner()==_msgSender()||limaToken==_msgSender(),"LS2" | 352,687 | limaGovernance()==_msgSender()||owner()==_msgSender()||limaToken==_msgSender() |
"LS3" | pragma solidity ^0.6.12;
// ERC20PausableUpgradeSafe,
// IERC20,
// SafeMath
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Pausable.sol";
// SafeERC20
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol";
// OwnableUpgradeSafe
// } from "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol";
/**
* @title LimaToken
* @author Lima Protocol
*
* Standard LimaToken.
*/
contract LimaTokenStorage is OwnableUpgradeSafe, OwnableLimaGovernance {
using AddressArrayUtils for address[];
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 public constant MAX_UINT256 = 2**256 - 1;
address public constant USDC = address(
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
);
// List of UnderlyingTokens
address[] public underlyingTokens;
address public currentUnderlyingToken;
// address public owner;
ILimaSwap public limaSwap;
address public limaToken;
//Fees
address public feeWallet;
uint256 public burnFee; // 1 / burnFee * burned amount == fee
uint256 public mintFee; // 1 / mintFee * minted amount == fee
uint256 public performanceFee;
//Rebalance
uint256 public lastUnderlyingBalancePer1000;
uint256 public lastRebalance;
uint256 public rebalanceInterval;
/**
* @dev Initializes contract
*/
function __LimaTokenStorage_init_unchained(
address _limaSwap,
address _feeWallet,
address _currentUnderlyingToken,
address[] memory _underlyingTokens,
uint256 _mintFee,
uint256 _burnFee,
uint256 _performanceFee
) public initializer {
}
/**
* @dev Throws if called by any account other than the limaGovernance.
*/
modifier onlyLimaGovernanceOrOwner() {
}
function _isLimaGovernanceOrOwner() internal view {
}
modifier onlyUnderlyingToken(address _token) {
}
function _isUnderlyingToken(address _token) internal view {
require(<FILL_ME>)
}
modifier noEmptyAddress(address _address) {
}
/* ============ Setter ============ */
function addUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
}
function removeUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
}
function setCurrentUnderlyingToken(address _currentUnderlyingToken)
external
onlyUnderlyingToken(_currentUnderlyingToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaToken(address _limaToken)
external
noEmptyAddress(_limaToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaSwap(address _limaSwap)
public
noEmptyAddress(_limaSwap)
onlyLimaGovernanceOrOwner
{
}
function setFeeWallet(address _feeWallet)
external
noEmptyAddress(_feeWallet)
onlyLimaGovernanceOrOwner
{
}
function setPerformanceFee(uint256 _performanceFee)
external
onlyLimaGovernanceOrOwner
{
}
function setBurnFee(uint256 _burnFee) external onlyLimaGovernanceOrOwner {
}
function setMintFee(uint256 _mintFee) external onlyLimaGovernanceOrOwner {
}
function setLastUnderlyingBalancePer1000(
uint256 _lastUnderlyingBalancePer1000
) external onlyLimaGovernanceOrOwner {
}
function setLastRebalance(uint256 _lastRebalance)
external
onlyLimaGovernanceOrOwner
{
}
function setRebalanceInterval(uint256 _rebalanceInterval)
external
onlyLimaGovernanceOrOwner
{
}
/* ============ View ============ */
function isUnderlyingTokens(address _underlyingToken)
public
view
returns (bool)
{
}
}
| isUnderlyingTokens(_token),"LS3" | 352,687 | isUnderlyingTokens(_token) |
"LS1" | pragma solidity ^0.6.12;
// ERC20PausableUpgradeSafe,
// IERC20,
// SafeMath
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Pausable.sol";
// SafeERC20
// } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol";
// OwnableUpgradeSafe
// } from "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol";
/**
* @title LimaToken
* @author Lima Protocol
*
* Standard LimaToken.
*/
contract LimaTokenStorage is OwnableUpgradeSafe, OwnableLimaGovernance {
using AddressArrayUtils for address[];
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 public constant MAX_UINT256 = 2**256 - 1;
address public constant USDC = address(
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
);
// List of UnderlyingTokens
address[] public underlyingTokens;
address public currentUnderlyingToken;
// address public owner;
ILimaSwap public limaSwap;
address public limaToken;
//Fees
address public feeWallet;
uint256 public burnFee; // 1 / burnFee * burned amount == fee
uint256 public mintFee; // 1 / mintFee * minted amount == fee
uint256 public performanceFee;
//Rebalance
uint256 public lastUnderlyingBalancePer1000;
uint256 public lastRebalance;
uint256 public rebalanceInterval;
/**
* @dev Initializes contract
*/
function __LimaTokenStorage_init_unchained(
address _limaSwap,
address _feeWallet,
address _currentUnderlyingToken,
address[] memory _underlyingTokens,
uint256 _mintFee,
uint256 _burnFee,
uint256 _performanceFee
) public initializer {
}
/**
* @dev Throws if called by any account other than the limaGovernance.
*/
modifier onlyLimaGovernanceOrOwner() {
}
function _isLimaGovernanceOrOwner() internal view {
}
modifier onlyUnderlyingToken(address _token) {
}
function _isUnderlyingToken(address _token) internal view {
}
modifier noEmptyAddress(address _address) {
}
/* ============ Setter ============ */
function addUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
require(<FILL_ME>)
underlyingTokens.push(_underlyingToken);
}
function removeUnderlyingToken(address _underlyingToken)
external
onlyLimaGovernanceOrOwner
{
}
function setCurrentUnderlyingToken(address _currentUnderlyingToken)
external
onlyUnderlyingToken(_currentUnderlyingToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaToken(address _limaToken)
external
noEmptyAddress(_limaToken)
onlyLimaGovernanceOrOwner
{
}
function setLimaSwap(address _limaSwap)
public
noEmptyAddress(_limaSwap)
onlyLimaGovernanceOrOwner
{
}
function setFeeWallet(address _feeWallet)
external
noEmptyAddress(_feeWallet)
onlyLimaGovernanceOrOwner
{
}
function setPerformanceFee(uint256 _performanceFee)
external
onlyLimaGovernanceOrOwner
{
}
function setBurnFee(uint256 _burnFee) external onlyLimaGovernanceOrOwner {
}
function setMintFee(uint256 _mintFee) external onlyLimaGovernanceOrOwner {
}
function setLastUnderlyingBalancePer1000(
uint256 _lastUnderlyingBalancePer1000
) external onlyLimaGovernanceOrOwner {
}
function setLastRebalance(uint256 _lastRebalance)
external
onlyLimaGovernanceOrOwner
{
}
function setRebalanceInterval(uint256 _rebalanceInterval)
external
onlyLimaGovernanceOrOwner
{
}
/* ============ View ============ */
function isUnderlyingTokens(address _underlyingToken)
public
view
returns (bool)
{
}
}
| !isUnderlyingTokens(_underlyingToken),"LS1" | 352,687 | !isUnderlyingTokens(_underlyingToken) |
null | /**
* Edgeless Casino Proxy Contract. Serves as a proxy for game functionality.
* Allows the players to deposit and withdraw funds.
* Allows authorized addresses to make game transactions.
* author: Julia Altenried
**/
pragma solidity ^ 0.4 .17;
contract token {
function transferFrom(address sender, address receiver, uint amount) public returns(bool success) {}
function transfer(address receiver, uint amount) public returns(bool success) {}
function balanceOf(address holder) public constant returns(uint) {}
}
contract owned {
address public owner;
modifier onlyOwner {
}
function owned() public {
}
function changeOwner(address newOwner) onlyOwner public {
}
}
contract safeMath {
//internals
function safeSub(uint a, uint b) constant internal returns(uint) {
}
function safeAdd(uint a, uint b) constant internal returns(uint) {
}
function safeMul(uint a, uint b) constant internal returns(uint) {
}
}
contract casinoBank is owned, safeMath {
/** the total balance of all players with 4 virtual decimals **/
uint public playerBalance;
/** the balance per player in edgeless tokens with 4 virtual decimals */
mapping(address => uint) public balanceOf;
/** in case the user wants/needs to call the withdraw function from his own wallet, he first needs to request a withdrawal */
mapping(address => uint) public withdrawAfter;
/** the price per kgas in tokens (4 decimals) */
uint public gasPrice = 20;
/** the edgeless token contract */
token edg;
/** owner should be able to close the contract is nobody has been using it for at least 30 days */
uint public closeAt;
/** informs listeners how many tokens were deposited for a player */
event Deposit(address _player, uint _numTokens, bool _chargeGas);
/** informs listeners how many tokens were withdrawn from the player to the receiver address */
event Withdrawal(address _player, address _receiver, uint _numTokens);
function casinoBank(address tokenContract) public {
}
/**
* accepts deposits for an arbitrary address.
* retrieves tokens from the message sender and adds them to the balance of the specified address.
* edgeless tokens do not have any decimals, but are represented on this contract with 4 decimals.
* @param receiver address of the receiver
* numTokens number of tokens to deposit (0 decimals)
* chargeGas indicates if the gas cost is subtracted from the user's edgeless token balance
**/
function deposit(address receiver, uint numTokens, bool chargeGas) public isAlive {
}
/**
* If the user wants/needs to withdraw his funds himself, he needs to request the withdrawal first.
* This method sets the earliest possible withdrawal date to 7 minutes from now.
* Reason: The user should not be able to withdraw his funds, while the the last game methods have not yet been mined.
**/
function requestWithdrawal() public {
}
/**
* In case the user requested a withdrawal and changes his mind.
* Necessary to be able to continue playing.
**/
function cancelWithdrawalRequest() public {
}
/**
* withdraws an amount from the user balance if 7 minutes passed since the request.
* @param amount the amount of tokens to withdraw
**/
function withdraw(uint amount) public keepAlive {
}
/**
* lets the owner withdraw from the bankroll
* @param numTokens the number of tokens to withdraw (0 decimals)
**/
function withdrawBankroll(uint numTokens) public onlyOwner {
}
/**
* returns the current bankroll in tokens with 0 decimals
**/
function bankroll() constant public returns(uint) {
}
/**
* lets the owner close the contract if there are no player funds on it or if nobody has been using it for at least 30 days
*/
function close() onlyOwner public {
}
/**
* in case close has been called accidentally.
**/
function open() onlyOwner public {
}
/**
* make sure the contract is not in process of being closed.
**/
modifier isAlive {
}
/**
* delays the time of closing.
**/
modifier keepAlive {
}
}
contract casinoProxy is casinoBank {
/** indicates if an address is authorized to call game functions */
mapping(address => bool) public authorized;
/** list of casino game contract addresses */
address[] public casinoGames;
/** a number to count withdrawal signatures to ensure each signature is different even if withdrawing the same amount to the same address */
mapping(address => uint) public count;
modifier onlyAuthorized {
}
modifier onlyCasinoGames {
}
/**
* creates a new casino wallet.
* @param authorizedAddress the address which may send transactions to the Edgeless Casino
* blackjackAddress the address of the Edgeless blackjack contract
* tokenContract the address of the Edgeless token contract
**/
function casinoProxy(address authorizedAddress, address blackjackAddress, address tokenContract) casinoBank(tokenContract) public {
}
/**
* shifts tokens from the contract balance to the receiver.
* only callable from an edgeless casino contract.
* @param receiver the address of the receiver
* numTokens the amount of tokens to shift with 4 decimals
**/
function shift(address receiver, uint numTokens) public onlyCasinoGames {
}
/**
* transfers an amount from the contract balance to the owner's wallet.
* @param receiver the receiver address
* amount the amount of tokens to withdraw (0 decimals)
* v,r,s the signature of the player
**/
function withdrawFor(address receiver, uint amount, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized keepAlive {
}
/**
* update a casino game address in case of a new contract or a new casino game
* @param game the index of the game
* newAddress the new address of the game
**/
function setGameAddress(uint8 game, address newAddress) public onlyOwner {
}
/**
* authorize a address to call game functions.
* @param addr the address to be authorized
**/
function authorize(address addr) public onlyOwner {
}
/**
* deauthorize a address to call game functions.
* @param addr the address to be deauthorized
**/
function deauthorize(address addr) public onlyOwner {
}
/**
* updates the price per 1000 gas in EDG.
* @param price the new gas price (4 decimals, max 0.0256 EDG)
**/
function setGasPrice(uint8 price) public onlyOwner {
}
/**
* Forwards a move to the corresponding game contract if the data has been signed by the client.
* The casino contract ensures it is no duplicate move.
* @param game specifies which game contract to call
* value the value to send to the contract in tokens with 4 decimals
* data the function call
* v,r,s the player's signature of the data
**/
function move(uint8 game, uint value, bytes data, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized isAlive {
require(game < casinoGames.length);
require(<FILL_ME>) //make sure, the casino can always pay out the player
var player = ecrecover(keccak256(data), v, r, s);
require(withdrawAfter[player] == 0 || now < withdrawAfter[player]);
value = safeAdd(value, msg.gas / 1000 * gasPrice);
balanceOf[player] = safeSub(balanceOf[player], value);
playerBalance = safeSub(playerBalance, value);
assert(casinoGames[game].call(data));
}
}
| safeMul(bankroll(),10000)>value*8 | 352,729 | safeMul(bankroll(),10000)>value*8 |
null | /**
* Source Code first verified at https://etherscan.io on Thursday, June 14, 2018
(UTC) */
pragma solidity ^0.4.24;
/**
* @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
* The Ownable contract has an owner address, and provides basic authorization control
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* Allows the current owner to transfer control of the contract to a newOwner.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
/**
* @title Pausable
* Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused {
}
/**
* called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused {
}
}
/**
* @title ERC20 interface
*/
contract ERC20 is Ownable {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
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);
function burn(uint256 value) public returns(bool);
function burnFrom(address from,uint256 value)public returns(bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address target,uint amount);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/
contract StandardToken is ERC20, Pausable {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
mapping(address => bool) frozen;
/**
* check if given address is frozen. Freeze works only if moderator role is active
*/
function isFrozen(address _addr) constant returns (bool){
}
/**
* Freezes address (no transfer can be made from or to this address).
*/
function freeze(address _addr) onlyOwner {
}
/**
* Unfreezes frozen address.
*/
function unfreeze(address _addr) onlyOwner {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @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 remaining) {
}
function burn(uint256 _value) public returns(bool success){
}
function burnFrom(address _from,uint256 _value)public returns(bool success){
}
}
/**
* Pausable token with moderator role and freeze address implementation
**/
contract ModToken is StandardToken {
mapping(address => bool) frozen;
/**
* check if given address is frozen. Freeze works only if moderator role is active
*/
function isFrozen(address _addr) constant returns (bool){
}
/**
* Freezes address (no transfer can be made from or to this address).
*/
function freeze(address _addr) onlyOwner {
}
/**
* Unfreezes frozen address.
*/
function unfreeze(address _addr) onlyOwner {
}
/**
* Declines transfers from/to frozen addresses.
*/
function transfer(address _to, uint256 _value) whenNotPaused returns (bool) {
require(!isFrozen(msg.sender));
require(<FILL_ME>)
return super.transfer(_to, _value);
}
/**
* Declines transfers from/to/by frozen addresses.
*/
function transferFrom(address _from, address _to, uint256 _value) whenNotPaused returns (bool) {
}
}
contract ShinhwaToken is ModToken {
uint256 _initialAmount = 10000000000;
uint8 constant public decimals = 18;
uint public totalSupply = _initialAmount * 10 ** uint256(decimals);
string constant public name = "Shinhwa Token";
string constant public symbol = "SWT";
function ShinhwaToken() public {
}
}
| !isFrozen(_to) | 352,734 | !isFrozen(_to) |
"Caller not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^ 0.8.0;
/* by cryptovale.eth
* This contract supports minting and sending large amount of tokens
* It can be flexibly used to send an amount of tokens in a run, but it should be tested where limits are based on gas restrictions
* The using contract has to implement airdropper_mint, allowedToken and allowedCaller
* airdropper_mint: is called by this contract to mint a single token to an address
* airdropper_allowedToken is used to give back, if the id is allowed to be airdropped (if you foresee a section)
* airdropper_allowedCaller checks if a caller is allowed to call your contract for an airdrop
*
* You register your contract by calling registerContract (your contract needs to have you as an allowed caller)
* You can unregister the contract by calling unregisterContract
*
* You should save the address of this contract in your token contract and protect the calls
* require(airdroppers[msg.sender], "Not an airdropper contract");
*/
abstract contract externalInterface{
function airdropper_mint(address to, uint256 tokenId) public virtual;
function airdropper_allowedToken(uint256 tokenId) public virtual returns(bool);
function airdropper_allowedCaller(address caller) public virtual returns(bool);
}
contract AirDropper{
mapping(address => externalInterface) contracts;
mapping(address => bool) activeContracts;
function registerContract(address contractAddress) public{
externalInterface _temp = externalInterface(contractAddress);
require(<FILL_ME>)
activeContracts[contractAddress] = true;
contracts[contractAddress] = externalInterface(contractAddress);
}
function unregisterContract(address contractAddress) public{
}
function airdropByIndex(address contractAddress, address[] memory receivers, uint256 startIndex) public{
}
function airdrop(address contractAddress, address[] memory receivers, uint256[] memory indexes) public{
}
}
| _temp.airdropper_allowedCaller(msg.sender),"Caller not allowed" | 352,896 | _temp.airdropper_allowedCaller(msg.sender) |
"Caller not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^ 0.8.0;
/* by cryptovale.eth
* This contract supports minting and sending large amount of tokens
* It can be flexibly used to send an amount of tokens in a run, but it should be tested where limits are based on gas restrictions
* The using contract has to implement airdropper_mint, allowedToken and allowedCaller
* airdropper_mint: is called by this contract to mint a single token to an address
* airdropper_allowedToken is used to give back, if the id is allowed to be airdropped (if you foresee a section)
* airdropper_allowedCaller checks if a caller is allowed to call your contract for an airdrop
*
* You register your contract by calling registerContract (your contract needs to have you as an allowed caller)
* You can unregister the contract by calling unregisterContract
*
* You should save the address of this contract in your token contract and protect the calls
* require(airdroppers[msg.sender], "Not an airdropper contract");
*/
abstract contract externalInterface{
function airdropper_mint(address to, uint256 tokenId) public virtual;
function airdropper_allowedToken(uint256 tokenId) public virtual returns(bool);
function airdropper_allowedCaller(address caller) public virtual returns(bool);
}
contract AirDropper{
mapping(address => externalInterface) contracts;
mapping(address => bool) activeContracts;
function registerContract(address contractAddress) public{
}
function unregisterContract(address contractAddress) public{
require(<FILL_ME>)
activeContracts[contractAddress] = false;
}
function airdropByIndex(address contractAddress, address[] memory receivers, uint256 startIndex) public{
}
function airdrop(address contractAddress, address[] memory receivers, uint256[] memory indexes) public{
}
}
| contracts[contractAddress].airdropper_allowedCaller(msg.sender),"Caller not allowed" | 352,896 | contracts[contractAddress].airdropper_allowedCaller(msg.sender) |
"Contract not registered" | // SPDX-License-Identifier: MIT
pragma solidity ^ 0.8.0;
/* by cryptovale.eth
* This contract supports minting and sending large amount of tokens
* It can be flexibly used to send an amount of tokens in a run, but it should be tested where limits are based on gas restrictions
* The using contract has to implement airdropper_mint, allowedToken and allowedCaller
* airdropper_mint: is called by this contract to mint a single token to an address
* airdropper_allowedToken is used to give back, if the id is allowed to be airdropped (if you foresee a section)
* airdropper_allowedCaller checks if a caller is allowed to call your contract for an airdrop
*
* You register your contract by calling registerContract (your contract needs to have you as an allowed caller)
* You can unregister the contract by calling unregisterContract
*
* You should save the address of this contract in your token contract and protect the calls
* require(airdroppers[msg.sender], "Not an airdropper contract");
*/
abstract contract externalInterface{
function airdropper_mint(address to, uint256 tokenId) public virtual;
function airdropper_allowedToken(uint256 tokenId) public virtual returns(bool);
function airdropper_allowedCaller(address caller) public virtual returns(bool);
}
contract AirDropper{
mapping(address => externalInterface) contracts;
mapping(address => bool) activeContracts;
function registerContract(address contractAddress) public{
}
function unregisterContract(address contractAddress) public{
}
function airdropByIndex(address contractAddress, address[] memory receivers, uint256 startIndex) public{
require(contracts[contractAddress].airdropper_allowedCaller(msg.sender), "Caller not allowed");
require(<FILL_ME>)
for (uint256 i = 0; i < receivers.length; i++) {
require(contracts[contractAddress].airdropper_allowedToken(startIndex + i), "Token not allowed");
contracts[contractAddress].airdropper_mint(receivers[i], startIndex + i);
}
}
function airdrop(address contractAddress, address[] memory receivers, uint256[] memory indexes) public{
}
}
| activeContracts[contractAddress],"Contract not registered" | 352,896 | activeContracts[contractAddress] |
"Token not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^ 0.8.0;
/* by cryptovale.eth
* This contract supports minting and sending large amount of tokens
* It can be flexibly used to send an amount of tokens in a run, but it should be tested where limits are based on gas restrictions
* The using contract has to implement airdropper_mint, allowedToken and allowedCaller
* airdropper_mint: is called by this contract to mint a single token to an address
* airdropper_allowedToken is used to give back, if the id is allowed to be airdropped (if you foresee a section)
* airdropper_allowedCaller checks if a caller is allowed to call your contract for an airdrop
*
* You register your contract by calling registerContract (your contract needs to have you as an allowed caller)
* You can unregister the contract by calling unregisterContract
*
* You should save the address of this contract in your token contract and protect the calls
* require(airdroppers[msg.sender], "Not an airdropper contract");
*/
abstract contract externalInterface{
function airdropper_mint(address to, uint256 tokenId) public virtual;
function airdropper_allowedToken(uint256 tokenId) public virtual returns(bool);
function airdropper_allowedCaller(address caller) public virtual returns(bool);
}
contract AirDropper{
mapping(address => externalInterface) contracts;
mapping(address => bool) activeContracts;
function registerContract(address contractAddress) public{
}
function unregisterContract(address contractAddress) public{
}
function airdropByIndex(address contractAddress, address[] memory receivers, uint256 startIndex) public{
require(contracts[contractAddress].airdropper_allowedCaller(msg.sender), "Caller not allowed");
require(activeContracts[contractAddress], "Contract not registered");
for (uint256 i = 0; i < receivers.length; i++) {
require(<FILL_ME>)
contracts[contractAddress].airdropper_mint(receivers[i], startIndex + i);
}
}
function airdrop(address contractAddress, address[] memory receivers, uint256[] memory indexes) public{
}
}
| contracts[contractAddress].airdropper_allowedToken(startIndex+i),"Token not allowed" | 352,896 | contracts[contractAddress].airdropper_allowedToken(startIndex+i) |
"Token not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^ 0.8.0;
/* by cryptovale.eth
* This contract supports minting and sending large amount of tokens
* It can be flexibly used to send an amount of tokens in a run, but it should be tested where limits are based on gas restrictions
* The using contract has to implement airdropper_mint, allowedToken and allowedCaller
* airdropper_mint: is called by this contract to mint a single token to an address
* airdropper_allowedToken is used to give back, if the id is allowed to be airdropped (if you foresee a section)
* airdropper_allowedCaller checks if a caller is allowed to call your contract for an airdrop
*
* You register your contract by calling registerContract (your contract needs to have you as an allowed caller)
* You can unregister the contract by calling unregisterContract
*
* You should save the address of this contract in your token contract and protect the calls
* require(airdroppers[msg.sender], "Not an airdropper contract");
*/
abstract contract externalInterface{
function airdropper_mint(address to, uint256 tokenId) public virtual;
function airdropper_allowedToken(uint256 tokenId) public virtual returns(bool);
function airdropper_allowedCaller(address caller) public virtual returns(bool);
}
contract AirDropper{
mapping(address => externalInterface) contracts;
mapping(address => bool) activeContracts;
function registerContract(address contractAddress) public{
}
function unregisterContract(address contractAddress) public{
}
function airdropByIndex(address contractAddress, address[] memory receivers, uint256 startIndex) public{
}
function airdrop(address contractAddress, address[] memory receivers, uint256[] memory indexes) public{
require(contracts[contractAddress].airdropper_allowedCaller(msg.sender), "Caller not allowed");
require(activeContracts[contractAddress], "Contract not registered");
require(receivers.length == indexes.length, "Wrong amount");
for (uint256 i = 0; i < receivers.length; i++) {
require(<FILL_ME>)
contracts[contractAddress].airdropper_mint(receivers[i], indexes[i]);
}
}
}
| contracts[contractAddress].airdropper_allowedToken(indexes[i]),"Token not allowed" | 352,896 | contracts[contractAddress].airdropper_allowedToken(indexes[i]) |
"not on sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
// CyberNinja has 3 sale stages:
// 1. Whitelisted Free Claim - 0 ether
// 2. Whitelisted Pre-Sale - 0.044 ether
// 3. Public Sale - 0.08 ether
contract CyberNinja is ERC721A, Ownable {
using Strings for uint256;
// constants
uint256 public constant PRE_SALE_PRICE = 0.044 ether;
uint256 public constant PUBLIC_MINT_PRICE = 0.08 ether;
uint256 public constant PUBLIC_MINT_MAX_PER_TX = 20;
uint256 public constant MAX_SUPPLY = 4888;
address private constant VAULT_ADDRESS = 0x189705667db1b85B058B9558af68689bC7111fE9;
// global
bool public saleActivated;
string private _baseMetaURI;
// free claim
uint256 public freeClaimStartTime;
uint256 public freeClaimEndTime;
bytes32 private _freeClaimMerkleRoot;
mapping(address => uint256) private _freeClaimWallets;
// pre-sale
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
bytes32 private _preSaleMerkleRoot;
mapping(address => uint256) private _preSaleWallets;
// public mint
uint256 public publicMintStartTime;
uint256 public publicMintEndTime;
constructor() ERC721A("CyberNinja", "CBNJ", PUBLIC_MINT_MAX_PER_TX, MAX_SUPPLY) {}
modifier callerIsUser() {
}
function freeClaim(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
require(<FILL_ME>)
require(
_isWhitelisted(_freeClaimMerkleRoot, proof, msg.sender, maxClaimQuantity),
"not in free claim whitelist"
);
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
_freeClaimWallets[msg.sender] += quantity;
require(_freeClaimWallets[msg.sender] <= maxClaimQuantity, "quantity of tokens cannot exceed max mint");
require(totalSupply() + quantity <= MAX_SUPPLY, "the purchase would exceed max supply of tokens");
_safeMint(msg.sender, quantity);
}
function preSale(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function mint(uint256 quantity) external payable callerIsUser {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _isWhitelisted(
bytes32 root,
bytes32[] memory proof,
address account,
uint256 quantity
) internal pure returns (bool) {
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setMintActivated(bool active) external onlyOwner {
}
function setFreeClaimTime(uint256 start, uint256 end) external onlyOwner {
}
function setFreeClaimMerkleRoot(bytes32 root) external onlyOwner {
}
function setPreSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function setPreSaleMerkleRoot(bytes32 root) external onlyOwner {
}
function setPublicMintTime(uint256 start, uint256 end) external onlyOwner {
}
function preserve(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| saleActivated&&block.timestamp>=freeClaimStartTime&&block.timestamp<=freeClaimEndTime,"not on sale" | 352,917 | saleActivated&&block.timestamp>=freeClaimStartTime&&block.timestamp<=freeClaimEndTime |
"not in free claim whitelist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
// CyberNinja has 3 sale stages:
// 1. Whitelisted Free Claim - 0 ether
// 2. Whitelisted Pre-Sale - 0.044 ether
// 3. Public Sale - 0.08 ether
contract CyberNinja is ERC721A, Ownable {
using Strings for uint256;
// constants
uint256 public constant PRE_SALE_PRICE = 0.044 ether;
uint256 public constant PUBLIC_MINT_PRICE = 0.08 ether;
uint256 public constant PUBLIC_MINT_MAX_PER_TX = 20;
uint256 public constant MAX_SUPPLY = 4888;
address private constant VAULT_ADDRESS = 0x189705667db1b85B058B9558af68689bC7111fE9;
// global
bool public saleActivated;
string private _baseMetaURI;
// free claim
uint256 public freeClaimStartTime;
uint256 public freeClaimEndTime;
bytes32 private _freeClaimMerkleRoot;
mapping(address => uint256) private _freeClaimWallets;
// pre-sale
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
bytes32 private _preSaleMerkleRoot;
mapping(address => uint256) private _preSaleWallets;
// public mint
uint256 public publicMintStartTime;
uint256 public publicMintEndTime;
constructor() ERC721A("CyberNinja", "CBNJ", PUBLIC_MINT_MAX_PER_TX, MAX_SUPPLY) {}
modifier callerIsUser() {
}
function freeClaim(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
require(
saleActivated && block.timestamp >= freeClaimStartTime && block.timestamp <= freeClaimEndTime,
"not on sale"
);
require(<FILL_ME>)
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
_freeClaimWallets[msg.sender] += quantity;
require(_freeClaimWallets[msg.sender] <= maxClaimQuantity, "quantity of tokens cannot exceed max mint");
require(totalSupply() + quantity <= MAX_SUPPLY, "the purchase would exceed max supply of tokens");
_safeMint(msg.sender, quantity);
}
function preSale(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function mint(uint256 quantity) external payable callerIsUser {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _isWhitelisted(
bytes32 root,
bytes32[] memory proof,
address account,
uint256 quantity
) internal pure returns (bool) {
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setMintActivated(bool active) external onlyOwner {
}
function setFreeClaimTime(uint256 start, uint256 end) external onlyOwner {
}
function setFreeClaimMerkleRoot(bytes32 root) external onlyOwner {
}
function setPreSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function setPreSaleMerkleRoot(bytes32 root) external onlyOwner {
}
function setPublicMintTime(uint256 start, uint256 end) external onlyOwner {
}
function preserve(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| _isWhitelisted(_freeClaimMerkleRoot,proof,msg.sender,maxClaimQuantity),"not in free claim whitelist" | 352,917 | _isWhitelisted(_freeClaimMerkleRoot,proof,msg.sender,maxClaimQuantity) |
"quantity of tokens cannot exceed max mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
// CyberNinja has 3 sale stages:
// 1. Whitelisted Free Claim - 0 ether
// 2. Whitelisted Pre-Sale - 0.044 ether
// 3. Public Sale - 0.08 ether
contract CyberNinja is ERC721A, Ownable {
using Strings for uint256;
// constants
uint256 public constant PRE_SALE_PRICE = 0.044 ether;
uint256 public constant PUBLIC_MINT_PRICE = 0.08 ether;
uint256 public constant PUBLIC_MINT_MAX_PER_TX = 20;
uint256 public constant MAX_SUPPLY = 4888;
address private constant VAULT_ADDRESS = 0x189705667db1b85B058B9558af68689bC7111fE9;
// global
bool public saleActivated;
string private _baseMetaURI;
// free claim
uint256 public freeClaimStartTime;
uint256 public freeClaimEndTime;
bytes32 private _freeClaimMerkleRoot;
mapping(address => uint256) private _freeClaimWallets;
// pre-sale
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
bytes32 private _preSaleMerkleRoot;
mapping(address => uint256) private _preSaleWallets;
// public mint
uint256 public publicMintStartTime;
uint256 public publicMintEndTime;
constructor() ERC721A("CyberNinja", "CBNJ", PUBLIC_MINT_MAX_PER_TX, MAX_SUPPLY) {}
modifier callerIsUser() {
}
function freeClaim(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
require(
saleActivated && block.timestamp >= freeClaimStartTime && block.timestamp <= freeClaimEndTime,
"not on sale"
);
require(
_isWhitelisted(_freeClaimMerkleRoot, proof, msg.sender, maxClaimQuantity),
"not in free claim whitelist"
);
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
_freeClaimWallets[msg.sender] += quantity;
require(<FILL_ME>)
require(totalSupply() + quantity <= MAX_SUPPLY, "the purchase would exceed max supply of tokens");
_safeMint(msg.sender, quantity);
}
function preSale(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function mint(uint256 quantity) external payable callerIsUser {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _isWhitelisted(
bytes32 root,
bytes32[] memory proof,
address account,
uint256 quantity
) internal pure returns (bool) {
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setMintActivated(bool active) external onlyOwner {
}
function setFreeClaimTime(uint256 start, uint256 end) external onlyOwner {
}
function setFreeClaimMerkleRoot(bytes32 root) external onlyOwner {
}
function setPreSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function setPreSaleMerkleRoot(bytes32 root) external onlyOwner {
}
function setPublicMintTime(uint256 start, uint256 end) external onlyOwner {
}
function preserve(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| _freeClaimWallets[msg.sender]<=maxClaimQuantity,"quantity of tokens cannot exceed max mint" | 352,917 | _freeClaimWallets[msg.sender]<=maxClaimQuantity |
"not on sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
// CyberNinja has 3 sale stages:
// 1. Whitelisted Free Claim - 0 ether
// 2. Whitelisted Pre-Sale - 0.044 ether
// 3. Public Sale - 0.08 ether
contract CyberNinja is ERC721A, Ownable {
using Strings for uint256;
// constants
uint256 public constant PRE_SALE_PRICE = 0.044 ether;
uint256 public constant PUBLIC_MINT_PRICE = 0.08 ether;
uint256 public constant PUBLIC_MINT_MAX_PER_TX = 20;
uint256 public constant MAX_SUPPLY = 4888;
address private constant VAULT_ADDRESS = 0x189705667db1b85B058B9558af68689bC7111fE9;
// global
bool public saleActivated;
string private _baseMetaURI;
// free claim
uint256 public freeClaimStartTime;
uint256 public freeClaimEndTime;
bytes32 private _freeClaimMerkleRoot;
mapping(address => uint256) private _freeClaimWallets;
// pre-sale
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
bytes32 private _preSaleMerkleRoot;
mapping(address => uint256) private _preSaleWallets;
// public mint
uint256 public publicMintStartTime;
uint256 public publicMintEndTime;
constructor() ERC721A("CyberNinja", "CBNJ", PUBLIC_MINT_MAX_PER_TX, MAX_SUPPLY) {}
modifier callerIsUser() {
}
function freeClaim(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function preSale(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
require(<FILL_ME>)
require(_isWhitelisted(_preSaleMerkleRoot, proof, msg.sender, maxClaimQuantity), "not in pre-sale whitelist");
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
_preSaleWallets[msg.sender] += quantity;
require(_preSaleWallets[msg.sender] <= maxClaimQuantity, "quantity of tokens cannot exceed max mint");
require(totalSupply() + quantity <= MAX_SUPPLY, "the purchase would exceed max supply of tokens");
require(msg.value >= PRE_SALE_PRICE * quantity, "insufficient ether value");
_safeMint(msg.sender, quantity);
}
function mint(uint256 quantity) external payable callerIsUser {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _isWhitelisted(
bytes32 root,
bytes32[] memory proof,
address account,
uint256 quantity
) internal pure returns (bool) {
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setMintActivated(bool active) external onlyOwner {
}
function setFreeClaimTime(uint256 start, uint256 end) external onlyOwner {
}
function setFreeClaimMerkleRoot(bytes32 root) external onlyOwner {
}
function setPreSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function setPreSaleMerkleRoot(bytes32 root) external onlyOwner {
}
function setPublicMintTime(uint256 start, uint256 end) external onlyOwner {
}
function preserve(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| saleActivated&&block.timestamp>=preSaleStartTime&&block.timestamp<=preSaleEndTime,"not on sale" | 352,917 | saleActivated&&block.timestamp>=preSaleStartTime&&block.timestamp<=preSaleEndTime |
"not in pre-sale whitelist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
// CyberNinja has 3 sale stages:
// 1. Whitelisted Free Claim - 0 ether
// 2. Whitelisted Pre-Sale - 0.044 ether
// 3. Public Sale - 0.08 ether
contract CyberNinja is ERC721A, Ownable {
using Strings for uint256;
// constants
uint256 public constant PRE_SALE_PRICE = 0.044 ether;
uint256 public constant PUBLIC_MINT_PRICE = 0.08 ether;
uint256 public constant PUBLIC_MINT_MAX_PER_TX = 20;
uint256 public constant MAX_SUPPLY = 4888;
address private constant VAULT_ADDRESS = 0x189705667db1b85B058B9558af68689bC7111fE9;
// global
bool public saleActivated;
string private _baseMetaURI;
// free claim
uint256 public freeClaimStartTime;
uint256 public freeClaimEndTime;
bytes32 private _freeClaimMerkleRoot;
mapping(address => uint256) private _freeClaimWallets;
// pre-sale
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
bytes32 private _preSaleMerkleRoot;
mapping(address => uint256) private _preSaleWallets;
// public mint
uint256 public publicMintStartTime;
uint256 public publicMintEndTime;
constructor() ERC721A("CyberNinja", "CBNJ", PUBLIC_MINT_MAX_PER_TX, MAX_SUPPLY) {}
modifier callerIsUser() {
}
function freeClaim(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function preSale(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
require(
saleActivated && block.timestamp >= preSaleStartTime && block.timestamp <= preSaleEndTime,
"not on sale"
);
require(<FILL_ME>)
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
_preSaleWallets[msg.sender] += quantity;
require(_preSaleWallets[msg.sender] <= maxClaimQuantity, "quantity of tokens cannot exceed max mint");
require(totalSupply() + quantity <= MAX_SUPPLY, "the purchase would exceed max supply of tokens");
require(msg.value >= PRE_SALE_PRICE * quantity, "insufficient ether value");
_safeMint(msg.sender, quantity);
}
function mint(uint256 quantity) external payable callerIsUser {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _isWhitelisted(
bytes32 root,
bytes32[] memory proof,
address account,
uint256 quantity
) internal pure returns (bool) {
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setMintActivated(bool active) external onlyOwner {
}
function setFreeClaimTime(uint256 start, uint256 end) external onlyOwner {
}
function setFreeClaimMerkleRoot(bytes32 root) external onlyOwner {
}
function setPreSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function setPreSaleMerkleRoot(bytes32 root) external onlyOwner {
}
function setPublicMintTime(uint256 start, uint256 end) external onlyOwner {
}
function preserve(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| _isWhitelisted(_preSaleMerkleRoot,proof,msg.sender,maxClaimQuantity),"not in pre-sale whitelist" | 352,917 | _isWhitelisted(_preSaleMerkleRoot,proof,msg.sender,maxClaimQuantity) |
"quantity of tokens cannot exceed max mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
// CyberNinja has 3 sale stages:
// 1. Whitelisted Free Claim - 0 ether
// 2. Whitelisted Pre-Sale - 0.044 ether
// 3. Public Sale - 0.08 ether
contract CyberNinja is ERC721A, Ownable {
using Strings for uint256;
// constants
uint256 public constant PRE_SALE_PRICE = 0.044 ether;
uint256 public constant PUBLIC_MINT_PRICE = 0.08 ether;
uint256 public constant PUBLIC_MINT_MAX_PER_TX = 20;
uint256 public constant MAX_SUPPLY = 4888;
address private constant VAULT_ADDRESS = 0x189705667db1b85B058B9558af68689bC7111fE9;
// global
bool public saleActivated;
string private _baseMetaURI;
// free claim
uint256 public freeClaimStartTime;
uint256 public freeClaimEndTime;
bytes32 private _freeClaimMerkleRoot;
mapping(address => uint256) private _freeClaimWallets;
// pre-sale
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
bytes32 private _preSaleMerkleRoot;
mapping(address => uint256) private _preSaleWallets;
// public mint
uint256 public publicMintStartTime;
uint256 public publicMintEndTime;
constructor() ERC721A("CyberNinja", "CBNJ", PUBLIC_MINT_MAX_PER_TX, MAX_SUPPLY) {}
modifier callerIsUser() {
}
function freeClaim(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function preSale(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
require(
saleActivated && block.timestamp >= preSaleStartTime && block.timestamp <= preSaleEndTime,
"not on sale"
);
require(_isWhitelisted(_preSaleMerkleRoot, proof, msg.sender, maxClaimQuantity), "not in pre-sale whitelist");
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
_preSaleWallets[msg.sender] += quantity;
require(<FILL_ME>)
require(totalSupply() + quantity <= MAX_SUPPLY, "the purchase would exceed max supply of tokens");
require(msg.value >= PRE_SALE_PRICE * quantity, "insufficient ether value");
_safeMint(msg.sender, quantity);
}
function mint(uint256 quantity) external payable callerIsUser {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _isWhitelisted(
bytes32 root,
bytes32[] memory proof,
address account,
uint256 quantity
) internal pure returns (bool) {
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setMintActivated(bool active) external onlyOwner {
}
function setFreeClaimTime(uint256 start, uint256 end) external onlyOwner {
}
function setFreeClaimMerkleRoot(bytes32 root) external onlyOwner {
}
function setPreSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function setPreSaleMerkleRoot(bytes32 root) external onlyOwner {
}
function setPublicMintTime(uint256 start, uint256 end) external onlyOwner {
}
function preserve(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| _preSaleWallets[msg.sender]<=maxClaimQuantity,"quantity of tokens cannot exceed max mint" | 352,917 | _preSaleWallets[msg.sender]<=maxClaimQuantity |
"not on sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
// CyberNinja has 3 sale stages:
// 1. Whitelisted Free Claim - 0 ether
// 2. Whitelisted Pre-Sale - 0.044 ether
// 3. Public Sale - 0.08 ether
contract CyberNinja is ERC721A, Ownable {
using Strings for uint256;
// constants
uint256 public constant PRE_SALE_PRICE = 0.044 ether;
uint256 public constant PUBLIC_MINT_PRICE = 0.08 ether;
uint256 public constant PUBLIC_MINT_MAX_PER_TX = 20;
uint256 public constant MAX_SUPPLY = 4888;
address private constant VAULT_ADDRESS = 0x189705667db1b85B058B9558af68689bC7111fE9;
// global
bool public saleActivated;
string private _baseMetaURI;
// free claim
uint256 public freeClaimStartTime;
uint256 public freeClaimEndTime;
bytes32 private _freeClaimMerkleRoot;
mapping(address => uint256) private _freeClaimWallets;
// pre-sale
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
bytes32 private _preSaleMerkleRoot;
mapping(address => uint256) private _preSaleWallets;
// public mint
uint256 public publicMintStartTime;
uint256 public publicMintEndTime;
constructor() ERC721A("CyberNinja", "CBNJ", PUBLIC_MINT_MAX_PER_TX, MAX_SUPPLY) {}
modifier callerIsUser() {
}
function freeClaim(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function preSale(
bytes32[] memory proof,
uint256 maxClaimQuantity,
uint256 quantity
) external payable callerIsUser {
}
function mint(uint256 quantity) external payable callerIsUser {
require(<FILL_ME>)
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
require(quantity <= PUBLIC_MINT_MAX_PER_TX, "quantity of tokens cannot exceed max per mint");
require(totalSupply() + quantity <= MAX_SUPPLY, "the purchase would exceed max supply of tokens");
require(msg.value >= PUBLIC_MINT_PRICE * quantity, "insufficient ether value");
_safeMint(msg.sender, quantity);
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _isWhitelisted(
bytes32 root,
bytes32[] memory proof,
address account,
uint256 quantity
) internal pure returns (bool) {
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setMintActivated(bool active) external onlyOwner {
}
function setFreeClaimTime(uint256 start, uint256 end) external onlyOwner {
}
function setFreeClaimMerkleRoot(bytes32 root) external onlyOwner {
}
function setPreSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function setPreSaleMerkleRoot(bytes32 root) external onlyOwner {
}
function setPublicMintTime(uint256 start, uint256 end) external onlyOwner {
}
function preserve(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| saleActivated&&block.timestamp>=publicMintStartTime&&block.timestamp<=publicMintEndTime,"not on sale" | 352,917 | saleActivated&&block.timestamp>=publicMintStartTime&&block.timestamp<=publicMintEndTime |
"unable to mint more, maxsupply reached" | /* . .x+=:.
.x88888x. z` ^%
:8**888888X. :> u. u. . <k
f `888888x./ .u x@88k u@88c. uL u .@8Ned8"
' `*88888~ ud8888. ^"8888""8888" .ue888Nc.. us888u. .@^%8888"
\. . `?)X. :888'8888. 8888 888R d88E`"888E` .@88 "8888" x88: `)8b.
`~=-^ X88> ~ d888 '88%" 8888 888R 888E 888E 9888 9888 8888N=*8888
X8888 ~ 8888.+" 8888 888R 888E 888E 9888 9888 %8" R88
488888 8888L 8888 888R 888E 888E 9888 9888 @8Wou 9%
.xx. 88888X '8888c. .+ "*88*" 8888" 888& .888E 9888 9888 .888888P`
'*8888. '88888> "88888% "" 'Y" *888" 888& "888*""888" ` ^"F
88888 '8888> "YP' `" "888E ^Y" ^Y'
`8888> `888 .dWi `88E
"8888 8% 4888~ J8%
`"888x:-" ^"===**/
/// @custom:security-contact [email protected]
// https://mint.jengas.io Mint Jengascoin DAO Tokens
pragma solidity ^0.8.2;
contract Jengas is ERC1155, Ownable, Pausable, ERC1155Burnable, ERC1155Supply {
string public name = "Jengas DAO";
string public symbol = "JNGAD";
address public TradableAddress = 0x2404bfDDf05599f791267Ea8aC6D158EB3C194b7;
address public LockedAddress = 0x266287316E0c97af64486F718cD40aa3C1E92481;
uint256 public constant LockEndEpoch = 1660060800;
uint256 public PurchasePrice = 200000000000000000;
uint256 public TotalSupply = 0;
uint256 public constant MaxSupply = 40000;
event Received(address, uint256);
event Withdrawal(uint256 value);
constructor() ERC1155("https://jengas.io/nfts/jenga.json") {
}
receive() external payable {
require(msg.sender != address(0), "transfer from the zero address");
uint256 Quantity = msg.value / PurchasePrice;
uint256 PricePer = msg.value / Quantity;
require(PricePer == PurchasePrice, "wrong value supplied");
require(<FILL_ME>)
TotalSupply += Quantity;
_mint(msg.sender, 0, Quantity, "");
emit Received(msg.sender, msg.value);
}
function getBalance() private view returns(uint) {
}
function withdraw() public onlyOwner {
}
function setPurchasePrice(uint256 _newPurchasePrice) public onlyOwner {
}
function contractURI() public pure returns (string memory) {
}
function setURI(string memory newuri) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
}
| (Quantity+TotalSupply)<=MaxSupply,"unable to mint more, maxsupply reached" | 352,924 | (Quantity+TotalSupply)<=MaxSupply |
null | contract SGTEscrow is Ownable {
using SafeMath for uint256;
SGTCoin public token;
uint256 public contractStart;
address public constant VESTING_WALLET = 0x58DD9FCaf9b16F7049A1c9315781aBB748D96Cf6;
mapping(uint256 => bool) public hasRoundBeenWithdrawn;
function SGTEscrow(SGTCoin _token) public {
}
function withdrawRound (uint256 round) public onlyOwner {
require(round > 0);
require(round < 50);
require(<FILL_ME>)
// Validate round falls in the correct timeframe
uint256 roundOffset = round.mul(30 days);
uint256 minimumDateForRound = contractStart.add(roundOffset);
require(now > minimumDateForRound);
hasRoundBeenWithdrawn[round] = token.transfer(VESTING_WALLET, 1000000 ether);
}
}
| hasRoundBeenWithdrawn[round]!=true | 352,992 | hasRoundBeenWithdrawn[round]!=true |
"NOT_GOVERNANCE" | // SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.7;
// @TODO: Formatting
library LibBytes {
// @TODO: see if we can just set .length =
function trimToSize(bytes memory b, uint newLen)
internal
pure
{
}
/***********************************|
| Read Bytes Functions |
|__________________________________*/
/**
* @dev Reads a bytes32 value from a position in a byte array.
* @param b Byte array containing a bytes32 value.
* @param index Index in byte array of bytes32 value.
* @return result bytes32 value from byte array.
*/
function readBytes32(
bytes memory b,
uint256 index
)
internal
pure
returns (bytes32 result)
{
}
}
interface IERC1271Wallet {
function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);
}
library SignatureValidator {
using LibBytes for bytes;
enum SignatureMode {
EIP712,
EthSign,
SmartWallet,
Spoof
}
// bytes4(keccak256("isValidSignature(bytes32,bytes)"))
bytes4 constant internal ERC1271_MAGICVALUE_BYTES32 = 0x1626ba7e;
function recoverAddr(bytes32 hash, bytes memory sig) internal view returns (address) {
}
function recoverAddrImpl(bytes32 hash, bytes memory sig, bool allowSpoofing) internal view returns (address) {
}
}
library MerkleProof {
function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WALLETToken {
// Constants
string public constant name = "Ambire Wallet";
string public constant symbol = "WALLET";
uint8 public constant decimals = 18;
uint public constant MAX_SUPPLY = 1_000_000_000 * 1e18;
// Mutable variables
uint public totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
event Approval(address indexed owner, address indexed spender, uint amount);
event Transfer(address indexed from, address indexed to, uint amount);
event SupplyControllerChanged(address indexed prev, address indexed current);
address public supplyController;
constructor(address _supplyController) {
}
function balanceOf(address owner) external view returns (uint balance) {
}
function transfer(address to, uint amount) external returns (bool success) {
}
function transferFrom(address from, address to, uint amount) external returns (bool success) {
}
function approve(address spender, uint amount) external returns (bool success) {
}
function allowance(address owner, address spender) external view returns (uint remaining) {
}
// Supply control
function innerMint(address owner, uint amount) internal {
}
function mint(address owner, uint amount) external {
}
function changeSupplyController(address newSupplyController) external {
}
}
interface IStakingPool {
function enterTo(address recipient, uint amount) external;
}
contract WALLETSupplyController {
event LogNewVesting(address indexed recipient, uint start, uint end, uint amountPerSec);
event LogVestingUnset(address indexed recipient, uint end, uint amountPerSec);
event LogMintVesting(address indexed recipient, uint amount);
// solhint-disable-next-line var-name-mixedcase
WALLETToken public immutable WALLET;
mapping (address => bool) public hasGovernance;
constructor(WALLETToken token, address initialGovernance) {
}
// Governance and supply controller
function changeSupplyController(address newSupplyController) external {
require(<FILL_ME>)
WALLET.changeSupplyController(newSupplyController);
}
function setGovernance(address addr, bool level) external {
}
// Vesting
// Some addresses (eg StakingPools) are incentivized with a certain allowance of WALLET per year
// Also used for linear vesting of early supporters, team, etc.
// mapping of (addr => end => rate) => lastMintTime;
mapping (address => mapping(uint => mapping(uint => uint))) public vestingLastMint;
function setVesting(address recipient, uint start, uint end, uint amountPerSecond) external {
}
function unsetVesting(address recipient, uint end, uint amountPerSecond) external {
}
// vesting mechanism
function mintableVesting(address addr, uint end, uint amountPerSecond) public view returns (uint) {
}
function mintVesting(address recipient, uint end, uint amountPerSecond) external {
}
//
// Rewards distribution
//
event LogUpdatePenaltyBps(uint newPenaltyBps);
event LogClaimStaked(address indexed recipient, uint claimed);
event LogClaimWithPenalty(address indexed recipient, uint received, uint burned);
uint public immutable MAX_CLAIM_NODE = 80_000_000e18;
bytes32 public lastRoot;
mapping (address => uint) public claimed;
uint public penaltyBps = 0;
function setPenaltyBps(uint _penaltyBps) external {
}
function setRoot(bytes32 newRoot) external {
}
function claimWithRootUpdate(
// claim() args
uint totalRewardInTree, bytes32[] calldata proof, uint toBurnBps, IStakingPool stakingPool,
// args for updating the root
bytes32 newRoot, bytes calldata signature
) external {
}
// claim() has two modes, either receive the full amount as xWALLET (staked WALLET) or burn some (penaltyBps) and receive the rest immediately in $WALLET
// toBurnBps is a safety parameter that serves two purposes:
// 1) prevents griefing attacks/frontrunning where governance sets penalties higher before someone's claim() gets mined
// 2) ensures that the sender really does have the intention to burn some of their tokens but receive the rest immediatey
// set toBurnBps to 0 to receive the tokens as xWALLET, set it to the current penaltyBps to receive immediately
// There is an edge case: when penaltyBps is set to 0, you pass 0 to receive everything immediately; this is intended
function claim(uint totalRewardInTree, bytes32[] memory proof, uint toBurnBps, IStakingPool stakingPool) public {
}
// In case funds get stuck
function withdraw(IERC20 token, address to, uint256 tokenAmount) external {
}
}
| hasGovernance[msg.sender],"NOT_GOVERNANCE" | 353,000 | hasGovernance[msg.sender] |
"VESTING_ALREADY_SET" | // SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.7;
// @TODO: Formatting
library LibBytes {
// @TODO: see if we can just set .length =
function trimToSize(bytes memory b, uint newLen)
internal
pure
{
}
/***********************************|
| Read Bytes Functions |
|__________________________________*/
/**
* @dev Reads a bytes32 value from a position in a byte array.
* @param b Byte array containing a bytes32 value.
* @param index Index in byte array of bytes32 value.
* @return result bytes32 value from byte array.
*/
function readBytes32(
bytes memory b,
uint256 index
)
internal
pure
returns (bytes32 result)
{
}
}
interface IERC1271Wallet {
function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);
}
library SignatureValidator {
using LibBytes for bytes;
enum SignatureMode {
EIP712,
EthSign,
SmartWallet,
Spoof
}
// bytes4(keccak256("isValidSignature(bytes32,bytes)"))
bytes4 constant internal ERC1271_MAGICVALUE_BYTES32 = 0x1626ba7e;
function recoverAddr(bytes32 hash, bytes memory sig) internal view returns (address) {
}
function recoverAddrImpl(bytes32 hash, bytes memory sig, bool allowSpoofing) internal view returns (address) {
}
}
library MerkleProof {
function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WALLETToken {
// Constants
string public constant name = "Ambire Wallet";
string public constant symbol = "WALLET";
uint8 public constant decimals = 18;
uint public constant MAX_SUPPLY = 1_000_000_000 * 1e18;
// Mutable variables
uint public totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
event Approval(address indexed owner, address indexed spender, uint amount);
event Transfer(address indexed from, address indexed to, uint amount);
event SupplyControllerChanged(address indexed prev, address indexed current);
address public supplyController;
constructor(address _supplyController) {
}
function balanceOf(address owner) external view returns (uint balance) {
}
function transfer(address to, uint amount) external returns (bool success) {
}
function transferFrom(address from, address to, uint amount) external returns (bool success) {
}
function approve(address spender, uint amount) external returns (bool success) {
}
function allowance(address owner, address spender) external view returns (uint remaining) {
}
// Supply control
function innerMint(address owner, uint amount) internal {
}
function mint(address owner, uint amount) external {
}
function changeSupplyController(address newSupplyController) external {
}
}
interface IStakingPool {
function enterTo(address recipient, uint amount) external;
}
contract WALLETSupplyController {
event LogNewVesting(address indexed recipient, uint start, uint end, uint amountPerSec);
event LogVestingUnset(address indexed recipient, uint end, uint amountPerSec);
event LogMintVesting(address indexed recipient, uint amount);
// solhint-disable-next-line var-name-mixedcase
WALLETToken public immutable WALLET;
mapping (address => bool) public hasGovernance;
constructor(WALLETToken token, address initialGovernance) {
}
// Governance and supply controller
function changeSupplyController(address newSupplyController) external {
}
function setGovernance(address addr, bool level) external {
}
// Vesting
// Some addresses (eg StakingPools) are incentivized with a certain allowance of WALLET per year
// Also used for linear vesting of early supporters, team, etc.
// mapping of (addr => end => rate) => lastMintTime;
mapping (address => mapping(uint => mapping(uint => uint))) public vestingLastMint;
function setVesting(address recipient, uint start, uint end, uint amountPerSecond) external {
require(hasGovernance[msg.sender], "NOT_GOVERNANCE");
// no more than 10 WALLET per second; theoretical emission max should be ~8 WALLET
require(amountPerSecond <= 10e18, "AMOUNT_TOO_LARGE");
require(start >= 1643695200, "START_TOO_LOW");
require(<FILL_ME>)
vestingLastMint[recipient][end][amountPerSecond] = start;
emit LogNewVesting(recipient, start, end, amountPerSecond);
}
function unsetVesting(address recipient, uint end, uint amountPerSecond) external {
}
// vesting mechanism
function mintableVesting(address addr, uint end, uint amountPerSecond) public view returns (uint) {
}
function mintVesting(address recipient, uint end, uint amountPerSecond) external {
}
//
// Rewards distribution
//
event LogUpdatePenaltyBps(uint newPenaltyBps);
event LogClaimStaked(address indexed recipient, uint claimed);
event LogClaimWithPenalty(address indexed recipient, uint received, uint burned);
uint public immutable MAX_CLAIM_NODE = 80_000_000e18;
bytes32 public lastRoot;
mapping (address => uint) public claimed;
uint public penaltyBps = 0;
function setPenaltyBps(uint _penaltyBps) external {
}
function setRoot(bytes32 newRoot) external {
}
function claimWithRootUpdate(
// claim() args
uint totalRewardInTree, bytes32[] calldata proof, uint toBurnBps, IStakingPool stakingPool,
// args for updating the root
bytes32 newRoot, bytes calldata signature
) external {
}
// claim() has two modes, either receive the full amount as xWALLET (staked WALLET) or burn some (penaltyBps) and receive the rest immediately in $WALLET
// toBurnBps is a safety parameter that serves two purposes:
// 1) prevents griefing attacks/frontrunning where governance sets penalties higher before someone's claim() gets mined
// 2) ensures that the sender really does have the intention to burn some of their tokens but receive the rest immediatey
// set toBurnBps to 0 to receive the tokens as xWALLET, set it to the current penaltyBps to receive immediately
// There is an edge case: when penaltyBps is set to 0, you pass 0 to receive everything immediately; this is intended
function claim(uint totalRewardInTree, bytes32[] memory proof, uint toBurnBps, IStakingPool stakingPool) public {
}
// In case funds get stuck
function withdraw(IERC20 token, address to, uint256 tokenAmount) external {
}
}
| vestingLastMint[recipient][end][amountPerSecond]==0,"VESTING_ALREADY_SET" | 353,000 | vestingLastMint[recipient][end][amountPerSecond]==0 |
"NOT_GOVERNANCE" | // SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.7;
// @TODO: Formatting
library LibBytes {
// @TODO: see if we can just set .length =
function trimToSize(bytes memory b, uint newLen)
internal
pure
{
}
/***********************************|
| Read Bytes Functions |
|__________________________________*/
/**
* @dev Reads a bytes32 value from a position in a byte array.
* @param b Byte array containing a bytes32 value.
* @param index Index in byte array of bytes32 value.
* @return result bytes32 value from byte array.
*/
function readBytes32(
bytes memory b,
uint256 index
)
internal
pure
returns (bytes32 result)
{
}
}
interface IERC1271Wallet {
function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);
}
library SignatureValidator {
using LibBytes for bytes;
enum SignatureMode {
EIP712,
EthSign,
SmartWallet,
Spoof
}
// bytes4(keccak256("isValidSignature(bytes32,bytes)"))
bytes4 constant internal ERC1271_MAGICVALUE_BYTES32 = 0x1626ba7e;
function recoverAddr(bytes32 hash, bytes memory sig) internal view returns (address) {
}
function recoverAddrImpl(bytes32 hash, bytes memory sig, bool allowSpoofing) internal view returns (address) {
}
}
library MerkleProof {
function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WALLETToken {
// Constants
string public constant name = "Ambire Wallet";
string public constant symbol = "WALLET";
uint8 public constant decimals = 18;
uint public constant MAX_SUPPLY = 1_000_000_000 * 1e18;
// Mutable variables
uint public totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
event Approval(address indexed owner, address indexed spender, uint amount);
event Transfer(address indexed from, address indexed to, uint amount);
event SupplyControllerChanged(address indexed prev, address indexed current);
address public supplyController;
constructor(address _supplyController) {
}
function balanceOf(address owner) external view returns (uint balance) {
}
function transfer(address to, uint amount) external returns (bool success) {
}
function transferFrom(address from, address to, uint amount) external returns (bool success) {
}
function approve(address spender, uint amount) external returns (bool success) {
}
function allowance(address owner, address spender) external view returns (uint remaining) {
}
// Supply control
function innerMint(address owner, uint amount) internal {
}
function mint(address owner, uint amount) external {
}
function changeSupplyController(address newSupplyController) external {
}
}
interface IStakingPool {
function enterTo(address recipient, uint amount) external;
}
contract WALLETSupplyController {
event LogNewVesting(address indexed recipient, uint start, uint end, uint amountPerSec);
event LogVestingUnset(address indexed recipient, uint end, uint amountPerSec);
event LogMintVesting(address indexed recipient, uint amount);
// solhint-disable-next-line var-name-mixedcase
WALLETToken public immutable WALLET;
mapping (address => bool) public hasGovernance;
constructor(WALLETToken token, address initialGovernance) {
}
// Governance and supply controller
function changeSupplyController(address newSupplyController) external {
}
function setGovernance(address addr, bool level) external {
}
// Vesting
// Some addresses (eg StakingPools) are incentivized with a certain allowance of WALLET per year
// Also used for linear vesting of early supporters, team, etc.
// mapping of (addr => end => rate) => lastMintTime;
mapping (address => mapping(uint => mapping(uint => uint))) public vestingLastMint;
function setVesting(address recipient, uint start, uint end, uint amountPerSecond) external {
}
function unsetVesting(address recipient, uint end, uint amountPerSecond) external {
}
// vesting mechanism
function mintableVesting(address addr, uint end, uint amountPerSecond) public view returns (uint) {
}
function mintVesting(address recipient, uint end, uint amountPerSecond) external {
}
//
// Rewards distribution
//
event LogUpdatePenaltyBps(uint newPenaltyBps);
event LogClaimStaked(address indexed recipient, uint claimed);
event LogClaimWithPenalty(address indexed recipient, uint received, uint burned);
uint public immutable MAX_CLAIM_NODE = 80_000_000e18;
bytes32 public lastRoot;
mapping (address => uint) public claimed;
uint public penaltyBps = 0;
function setPenaltyBps(uint _penaltyBps) external {
}
function setRoot(bytes32 newRoot) external {
}
function claimWithRootUpdate(
// claim() args
uint totalRewardInTree, bytes32[] calldata proof, uint toBurnBps, IStakingPool stakingPool,
// args for updating the root
bytes32 newRoot, bytes calldata signature
) external {
address signer = SignatureValidator.recoverAddrImpl(newRoot, signature, false);
require(<FILL_ME>)
lastRoot = newRoot;
claim(totalRewardInTree, proof, toBurnBps, stakingPool);
}
// claim() has two modes, either receive the full amount as xWALLET (staked WALLET) or burn some (penaltyBps) and receive the rest immediately in $WALLET
// toBurnBps is a safety parameter that serves two purposes:
// 1) prevents griefing attacks/frontrunning where governance sets penalties higher before someone's claim() gets mined
// 2) ensures that the sender really does have the intention to burn some of their tokens but receive the rest immediatey
// set toBurnBps to 0 to receive the tokens as xWALLET, set it to the current penaltyBps to receive immediately
// There is an edge case: when penaltyBps is set to 0, you pass 0 to receive everything immediately; this is intended
function claim(uint totalRewardInTree, bytes32[] memory proof, uint toBurnBps, IStakingPool stakingPool) public {
}
// In case funds get stuck
function withdraw(IERC20 token, address to, uint256 tokenAmount) external {
}
}
| hasGovernance[signer],"NOT_GOVERNANCE" | 353,000 | hasGovernance[signer] |
"LEAF_NOT_FOUND" | // SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.7;
// @TODO: Formatting
library LibBytes {
// @TODO: see if we can just set .length =
function trimToSize(bytes memory b, uint newLen)
internal
pure
{
}
/***********************************|
| Read Bytes Functions |
|__________________________________*/
/**
* @dev Reads a bytes32 value from a position in a byte array.
* @param b Byte array containing a bytes32 value.
* @param index Index in byte array of bytes32 value.
* @return result bytes32 value from byte array.
*/
function readBytes32(
bytes memory b,
uint256 index
)
internal
pure
returns (bytes32 result)
{
}
}
interface IERC1271Wallet {
function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);
}
library SignatureValidator {
using LibBytes for bytes;
enum SignatureMode {
EIP712,
EthSign,
SmartWallet,
Spoof
}
// bytes4(keccak256("isValidSignature(bytes32,bytes)"))
bytes4 constant internal ERC1271_MAGICVALUE_BYTES32 = 0x1626ba7e;
function recoverAddr(bytes32 hash, bytes memory sig) internal view returns (address) {
}
function recoverAddrImpl(bytes32 hash, bytes memory sig, bool allowSpoofing) internal view returns (address) {
}
}
library MerkleProof {
function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WALLETToken {
// Constants
string public constant name = "Ambire Wallet";
string public constant symbol = "WALLET";
uint8 public constant decimals = 18;
uint public constant MAX_SUPPLY = 1_000_000_000 * 1e18;
// Mutable variables
uint public totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
event Approval(address indexed owner, address indexed spender, uint amount);
event Transfer(address indexed from, address indexed to, uint amount);
event SupplyControllerChanged(address indexed prev, address indexed current);
address public supplyController;
constructor(address _supplyController) {
}
function balanceOf(address owner) external view returns (uint balance) {
}
function transfer(address to, uint amount) external returns (bool success) {
}
function transferFrom(address from, address to, uint amount) external returns (bool success) {
}
function approve(address spender, uint amount) external returns (bool success) {
}
function allowance(address owner, address spender) external view returns (uint remaining) {
}
// Supply control
function innerMint(address owner, uint amount) internal {
}
function mint(address owner, uint amount) external {
}
function changeSupplyController(address newSupplyController) external {
}
}
interface IStakingPool {
function enterTo(address recipient, uint amount) external;
}
contract WALLETSupplyController {
event LogNewVesting(address indexed recipient, uint start, uint end, uint amountPerSec);
event LogVestingUnset(address indexed recipient, uint end, uint amountPerSec);
event LogMintVesting(address indexed recipient, uint amount);
// solhint-disable-next-line var-name-mixedcase
WALLETToken public immutable WALLET;
mapping (address => bool) public hasGovernance;
constructor(WALLETToken token, address initialGovernance) {
}
// Governance and supply controller
function changeSupplyController(address newSupplyController) external {
}
function setGovernance(address addr, bool level) external {
}
// Vesting
// Some addresses (eg StakingPools) are incentivized with a certain allowance of WALLET per year
// Also used for linear vesting of early supporters, team, etc.
// mapping of (addr => end => rate) => lastMintTime;
mapping (address => mapping(uint => mapping(uint => uint))) public vestingLastMint;
function setVesting(address recipient, uint start, uint end, uint amountPerSecond) external {
}
function unsetVesting(address recipient, uint end, uint amountPerSecond) external {
}
// vesting mechanism
function mintableVesting(address addr, uint end, uint amountPerSecond) public view returns (uint) {
}
function mintVesting(address recipient, uint end, uint amountPerSecond) external {
}
//
// Rewards distribution
//
event LogUpdatePenaltyBps(uint newPenaltyBps);
event LogClaimStaked(address indexed recipient, uint claimed);
event LogClaimWithPenalty(address indexed recipient, uint received, uint burned);
uint public immutable MAX_CLAIM_NODE = 80_000_000e18;
bytes32 public lastRoot;
mapping (address => uint) public claimed;
uint public penaltyBps = 0;
function setPenaltyBps(uint _penaltyBps) external {
}
function setRoot(bytes32 newRoot) external {
}
function claimWithRootUpdate(
// claim() args
uint totalRewardInTree, bytes32[] calldata proof, uint toBurnBps, IStakingPool stakingPool,
// args for updating the root
bytes32 newRoot, bytes calldata signature
) external {
}
// claim() has two modes, either receive the full amount as xWALLET (staked WALLET) or burn some (penaltyBps) and receive the rest immediately in $WALLET
// toBurnBps is a safety parameter that serves two purposes:
// 1) prevents griefing attacks/frontrunning where governance sets penalties higher before someone's claim() gets mined
// 2) ensures that the sender really does have the intention to burn some of their tokens but receive the rest immediatey
// set toBurnBps to 0 to receive the tokens as xWALLET, set it to the current penaltyBps to receive immediately
// There is an edge case: when penaltyBps is set to 0, you pass 0 to receive everything immediately; this is intended
function claim(uint totalRewardInTree, bytes32[] memory proof, uint toBurnBps, IStakingPool stakingPool) public {
address recipient = msg.sender;
require(totalRewardInTree <= MAX_CLAIM_NODE, "MAX_CLAIM_NODE");
require(lastRoot != bytes32(0), "EMPTY_ROOT");
// Check the merkle proof
bytes32 leaf = keccak256(abi.encode(address(this), recipient, totalRewardInTree));
require(<FILL_ME>)
uint toClaim = totalRewardInTree - claimed[recipient];
claimed[recipient] = totalRewardInTree;
if (toBurnBps == penaltyBps) {
// Claiming in $WALLET directly: some tokens get burned immediately, but the rest go to you
uint toBurn = (toClaim * penaltyBps) / 10000;
uint toReceive = toClaim - toBurn;
// AUDIT: We can check toReceive > 0 or toBurn > 0, but there's no point since in the most common path both will be non-zero
WALLET.mint(recipient, toReceive);
WALLET.mint(address(0), toBurn);
emit LogClaimWithPenalty(recipient, toReceive, toBurn);
} else if (toBurnBps == 0) {
WALLET.mint(address(this), toClaim);
if (WALLET.allowance(address(this), address(stakingPool)) < toClaim) {
WALLET.approve(address(stakingPool), type(uint256).max);
}
stakingPool.enterTo(recipient, toClaim);
emit LogClaimStaked(recipient, toClaim);
} else {
revert("INVALID_TOBURNBPS");
}
}
// In case funds get stuck
function withdraw(IERC20 token, address to, uint256 tokenAmount) external {
}
}
| MerkleProof.isContained(leaf,proof,lastRoot),"LEAF_NOT_FOUND" | 353,000 | MerkleProof.isContained(leaf,proof,lastRoot) |
"Exceeds maximum supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './ERC721Enumerable.sol';
import './Ownable.sol';
// To dev on Etherem or not, that is no longer a question
contract Shakespeare is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 100;
uint256 private _price = 0.03 ether;
bool public _paused = true;
mapping (address => uint) public early_addresses;
// wallet address
address t1 = 0xeE7392be3D672FF0114FA3B483d05F42A5001b4A;
constructor(string memory baseURI) ERC721("9858 by Shakespeare", "9858") {
}
function mint(uint256 num) public payable {
uint256 supply = totalSupply();
require( !_paused, "Sale paused" );
require( num < 11, "You can mint a maximum of 10 at once" );
require(<FILL_ME>)
require( msg.value >= _price * num, "Ether sent is not correct" );
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
}
// first 1,000 tokens are free of charge
function earlyfolks(uint256 num) public {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| supply+num<9858-_reserved,"Exceeds maximum supply" | 353,023 | supply+num<9858-_reserved |
"You can be early only once." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './ERC721Enumerable.sol';
import './Ownable.sol';
// To dev on Etherem or not, that is no longer a question
contract Shakespeare is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 100;
uint256 private _price = 0.03 ether;
bool public _paused = true;
mapping (address => uint) public early_addresses;
// wallet address
address t1 = 0xeE7392be3D672FF0114FA3B483d05F42A5001b4A;
constructor(string memory baseURI) ERC721("9858 by Shakespeare", "9858") {
}
function mint(uint256 num) public payable {
}
// first 1,000 tokens are free of charge
function earlyfolks(uint256 num) public {
uint256 supply = totalSupply();
require(<FILL_ME>)
require(num < 11, "Don't be too greedy!" );
require(totalSupply() + num < 1001, "The earlier hath been better.");
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
early_addresses[msg.sender] = 1;
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| early_addresses[msg.sender]==0,"You can be early only once." | 353,023 | early_addresses[msg.sender]==0 |
"The earlier hath been better." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './ERC721Enumerable.sol';
import './Ownable.sol';
// To dev on Etherem or not, that is no longer a question
contract Shakespeare is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 100;
uint256 private _price = 0.03 ether;
bool public _paused = true;
mapping (address => uint) public early_addresses;
// wallet address
address t1 = 0xeE7392be3D672FF0114FA3B483d05F42A5001b4A;
constructor(string memory baseURI) ERC721("9858 by Shakespeare", "9858") {
}
function mint(uint256 num) public payable {
}
// first 1,000 tokens are free of charge
function earlyfolks(uint256 num) public {
uint256 supply = totalSupply();
require(early_addresses[msg.sender] == 0, "You can be early only once.");
require(num < 11, "Don't be too greedy!" );
require(<FILL_ME>)
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
early_addresses[msg.sender] = 1;
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| totalSupply()+num<1001,"The earlier hath been better." | 353,023 | totalSupply()+num<1001 |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './ERC721Enumerable.sol';
import './Ownable.sol';
// To dev on Etherem or not, that is no longer a question
contract Shakespeare is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 100;
uint256 private _price = 0.03 ether;
bool public _paused = true;
mapping (address => uint) public early_addresses;
// wallet address
address t1 = 0xeE7392be3D672FF0114FA3B483d05F42A5001b4A;
constructor(string memory baseURI) ERC721("9858 by Shakespeare", "9858") {
}
function mint(uint256 num) public payable {
}
// first 1,000 tokens are free of charge
function earlyfolks(uint256 num) public {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
require(<FILL_ME>)
}
}
| payable(t1).send(address(this).balance) | 353,023 | payable(t1).send(address(this).balance) |
"Spending condition contract not found" | pragma solidity 0.5.11;
pragma experimental ABIEncoderV2;
import "../PaymentExitDataModel.sol";
import "../routers/PaymentStandardExitRouterArgs.sol";
import "../../interfaces/ISpendingCondition.sol";
import "../../registries/SpendingConditionRegistry.sol";
import "../../utils/MoreVpFinalization.sol";
import "../../utils/OutputId.sol";
import "../../../vaults/EthVault.sol";
import "../../../vaults/Erc20Vault.sol";
import "../../../framework/PlasmaFramework.sol";
import "../../../framework/Protocol.sol";
import "../../../utils/SafeEthTransfer.sol";
import "../../../utils/PosLib.sol";
import "../../../transactions/PaymentTransactionModel.sol";
import "../../../transactions/GenericTransaction.sol";
library PaymentChallengeStandardExit {
using PosLib for PosLib.Position;
using PaymentTransactionModel for PaymentTransactionModel.Transaction;
struct Controller {
PlasmaFramework framework;
SpendingConditionRegistry spendingConditionRegistry;
uint256 safeGasStipend;
}
event ExitChallenged(
uint256 indexed utxoPos
);
/**
* @dev Data to be passed around helper functions
*/
struct ChallengeStandardExitData {
Controller controller;
PaymentStandardExitRouterArgs.ChallengeStandardExitArgs args;
PaymentExitDataModel.StandardExit exitData;
uint256 challengeTxType;
}
/**
* @notice Function that builds the controller struct
* @return Controller struct of PaymentChallengeStandardExit
*/
function buildController(
PlasmaFramework framework,
SpendingConditionRegistry spendingConditionRegistry,
uint256 safeGasStipend
)
public
pure
returns (Controller memory)
{
}
/**
* @notice Main logic function to challenge standard exit
* @dev emits ExitChallenged event on success
* @param self The controller struct
* @param exitMap The storage of all standard exit data
* @param args Arguments of challenge standard exit function from client
*/
function run(
Controller memory self,
PaymentExitDataModel.StandardExitMap storage exitMap,
PaymentStandardExitRouterArgs.ChallengeStandardExitArgs memory args
)
public
{
}
function verifyChallengeExitExists(ChallengeStandardExitData memory data) private pure {
}
function verifyChallengeTxProtocolFinalized(ChallengeStandardExitData memory data) private view {
}
function verifySpendingCondition(ChallengeStandardExitData memory data) private view {
PaymentStandardExitRouterArgs.ChallengeStandardExitArgs memory args = data.args;
PosLib.Position memory utxoPos = PosLib.decode(data.exitData.utxoPos);
FungibleTokenOutputModel.Output memory output = PaymentTransactionModel
.decode(args.exitingTx)
.getOutput(utxoPos.outputIndex);
ISpendingCondition condition = data.controller.spendingConditionRegistry.spendingConditions(
output.outputType, data.challengeTxType
);
require(<FILL_ME>)
bytes32 outputId = data.controller.framework.isDeposit(utxoPos.blockNum)
? OutputId.computeDepositOutputId(args.exitingTx, utxoPos.outputIndex, utxoPos.encode())
: OutputId.computeNormalOutputId(args.exitingTx, utxoPos.outputIndex);
require(outputId == data.exitData.outputId, "Invalid exiting tx causing outputId mismatch");
bool isSpentByChallengeTx = condition.verify(
args.exitingTx,
utxoPos.encode(),
args.challengeTx,
args.inputIndex,
args.witness
);
require(isSpentByChallengeTx, "Spending condition failed");
}
}
| address(condition)!=address(0),"Spending condition contract not found" | 353,086 | address(condition)!=address(0) |
"Invalid ETH vault" | pragma solidity 0.5.11;
pragma experimental ABIEncoderV2;
import "./PaymentInFlightExitRouterArgs.sol";
import "../PaymentExitDataModel.sol";
import "../PaymentExitGameArgs.sol";
import "../controllers/PaymentStartInFlightExit.sol";
import "../controllers/PaymentPiggybackInFlightExit.sol";
import "../controllers/PaymentChallengeIFENotCanonical.sol";
import "../controllers/PaymentChallengeIFEInputSpent.sol";
import "../controllers/PaymentChallengeIFEOutputSpent.sol";
import "../controllers/PaymentDeleteInFlightExit.sol";
import "../controllers/PaymentProcessInFlightExit.sol";
import "../../registries/SpendingConditionRegistry.sol";
import "../../interfaces/IStateTransitionVerifier.sol";
import "../../utils/BondSize.sol";
import "../../../utils/FailFastReentrancyGuard.sol";
import "../../../utils/OnlyFromAddress.sol";
import "../../../utils/OnlyWithValue.sol";
import "../../../framework/PlasmaFramework.sol";
import "../../../framework/interfaces/IExitProcessor.sol";
contract PaymentInFlightExitRouter is
IExitProcessor,
OnlyFromAddress,
OnlyWithValue,
FailFastReentrancyGuard
{
using PaymentStartInFlightExit for PaymentStartInFlightExit.Controller;
using PaymentPiggybackInFlightExit for PaymentPiggybackInFlightExit.Controller;
using PaymentChallengeIFENotCanonical for PaymentChallengeIFENotCanonical.Controller;
using PaymentChallengeIFEInputSpent for PaymentChallengeIFEInputSpent.Controller;
using PaymentChallengeIFEOutputSpent for PaymentChallengeIFEOutputSpent.Controller;
using PaymentDeleteInFlightExit for PaymentDeleteInFlightExit.Controller;
using PaymentProcessInFlightExit for PaymentProcessInFlightExit.Controller;
using BondSize for BondSize.Params;
// Initial IFE bond size = 185000 (gas cost of challenge) * 20 gwei (current fast gas price) * 10 (safety margin)
uint128 public constant INITIAL_IFE_BOND_SIZE = 37000000000000000 wei;
// Initial piggyback bond size = 140000 (gas cost of challenge) * 20 gwei (current fast gas price) * 10 (safety margin)
uint128 public constant INITIAL_PB_BOND_SIZE = 28000000000000000 wei;
// Each bond size upgrade can increase to a maximum of 200% or decrease to 50% of the current bond
uint16 public constant BOND_LOWER_BOUND_DIVISOR = 2;
uint16 public constant BOND_UPPER_BOUND_MULTIPLIER = 2;
PaymentExitDataModel.InFlightExitMap internal inFlightExitMap;
PaymentStartInFlightExit.Controller internal startInFlightExitController;
PaymentPiggybackInFlightExit.Controller internal piggybackInFlightExitController;
PaymentChallengeIFENotCanonical.Controller internal challengeCanonicityController;
PaymentChallengeIFEInputSpent.Controller internal challengeInputSpentController;
PaymentChallengeIFEOutputSpent.Controller internal challengeOutputSpentController;
PaymentDeleteInFlightExit.Controller internal deleteNonPiggybackIFEController;
PaymentProcessInFlightExit.Controller internal processInflightExitController;
BondSize.Params internal startIFEBond;
BondSize.Params internal piggybackBond;
PlasmaFramework private framework;
event IFEBondUpdated(uint128 bondSize);
event PiggybackBondUpdated(uint128 bondSize);
event InFlightExitStarted(
address indexed initiator,
bytes32 indexed txHash
);
event InFlightExitInputPiggybacked(
address indexed exitTarget,
bytes32 indexed txHash,
uint16 inputIndex
);
event InFlightExitOmitted(
uint160 indexed exitId,
address token
);
event InFlightBondReturnFailed(
address indexed receiver,
uint256 amount
);
event InFlightExitOutputWithdrawn(
uint160 indexed exitId,
uint16 outputIndex
);
event InFlightExitInputWithdrawn(
uint160 indexed exitId,
uint16 inputIndex
);
event InFlightExitOutputPiggybacked(
address indexed exitTarget,
bytes32 indexed txHash,
uint16 outputIndex
);
event InFlightExitChallenged(
address indexed challenger,
bytes32 indexed txHash,
uint256 challengeTxPosition
);
event InFlightExitChallengeResponded(
address indexed challenger,
bytes32 indexed txHash,
uint256 challengeTxPosition
);
event InFlightExitInputBlocked(
address indexed challenger,
bytes32 indexed txHash,
uint16 inputIndex
);
event InFlightExitOutputBlocked(
address indexed challenger,
bytes32 indexed txHash,
uint16 outputIndex
);
event InFlightExitDeleted(
uint160 indexed exitId
);
constructor(PaymentExitGameArgs.Args memory args)
public
{
framework = args.framework;
EthVault ethVault = EthVault(args.framework.vaults(args.ethVaultId));
require(<FILL_ME>)
Erc20Vault erc20Vault = Erc20Vault(args.framework.vaults(args.erc20VaultId));
require(address(erc20Vault) != address(0), "Invalid ERC20 vault");
startInFlightExitController = PaymentStartInFlightExit.buildController(
args.framework,
args.spendingConditionRegistry,
args.stateTransitionVerifier,
args.supportTxType
);
piggybackInFlightExitController = PaymentPiggybackInFlightExit.buildController(
args.framework,
this,
args.ethVaultId,
args.erc20VaultId
);
challengeCanonicityController = PaymentChallengeIFENotCanonical.buildController(
args.framework,
args.spendingConditionRegistry,
args.supportTxType
);
challengeInputSpentController = PaymentChallengeIFEInputSpent.buildController(
args.framework,
args.spendingConditionRegistry,
args.safeGasStipend
);
challengeOutputSpentController = PaymentChallengeIFEOutputSpent.Controller(
args.framework,
args.spendingConditionRegistry,
args.safeGasStipend
);
deleteNonPiggybackIFEController = PaymentDeleteInFlightExit.Controller({
minExitPeriod: args.framework.minExitPeriod(),
safeGasStipend: args.safeGasStipend
});
processInflightExitController = PaymentProcessInFlightExit.Controller({
framework: args.framework,
ethVault: ethVault,
erc20Vault: erc20Vault,
safeGasStipend: args.safeGasStipend
});
startIFEBond = BondSize.buildParams(INITIAL_IFE_BOND_SIZE, BOND_LOWER_BOUND_DIVISOR, BOND_UPPER_BOUND_MULTIPLIER);
piggybackBond = BondSize.buildParams(INITIAL_PB_BOND_SIZE, BOND_LOWER_BOUND_DIVISOR, BOND_UPPER_BOUND_MULTIPLIER);
}
/**
* @notice Getter functions to retrieve in-flight exit data of the PaymentExitGame
* @param exitIds The exit IDs of the in-flight exits
*/
function inFlightExits(uint160[] calldata exitIds) external view returns (PaymentExitDataModel.InFlightExit[] memory) {
}
/**
* @notice Starts withdrawal from a transaction that may be in-flight
* @param args Input argument data to challenge (see also struct 'StartExitArgs')
*/
function startInFlightExit(PaymentInFlightExitRouterArgs.StartExitArgs memory args)
public
payable
nonReentrant(framework)
onlyWithValue(startIFEBondSize())
{
}
/**
* @notice Piggyback on an input of an in-flight exiting tx. Processed only if the in-flight exit is non-canonical.
* @param args Input argument data to piggyback (see also struct 'PiggybackInFlightExitOnInputArgs')
*/
function piggybackInFlightExitOnInput(
PaymentInFlightExitRouterArgs.PiggybackInFlightExitOnInputArgs memory args
)
public
payable
nonReentrant(framework)
onlyWithValue(piggybackBondSize())
{
}
/**
* @notice Piggyback on an output of an in-flight exiting tx. Processed only if the in-flight exit is canonical.
* @param args Input argument data to piggyback (see also struct 'PiggybackInFlightExitOnOutputArgs')
*/
function piggybackInFlightExitOnOutput(
PaymentInFlightExitRouterArgs.PiggybackInFlightExitOnOutputArgs memory args
)
public
payable
nonReentrant(framework)
onlyWithValue(piggybackBondSize())
{
}
/**
* @notice Challenges an in-flight exit to be non-canonical
* @param args Input argument data to challenge (see also struct 'ChallengeCanonicityArgs')
*/
function challengeInFlightExitNotCanonical(PaymentInFlightExitRouterArgs.ChallengeCanonicityArgs memory args)
public
nonReentrant(framework)
{
}
/**
* @notice Respond to a non-canonical challenge by providing its position and by proving its correctness
* @param inFlightTx The RLP-encoded in-flight transaction
* @param inFlightTxPos The position of the in-flight exiting transaction. The output index within the position is unused and should be set to 0
* @param inFlightTxInclusionProof Proof that the in-flight exiting transaction is included in a Plasma block
*/
function respondToNonCanonicalChallenge(
bytes memory inFlightTx,
uint256 inFlightTxPos,
bytes memory inFlightTxInclusionProof
)
public
nonReentrant(framework)
{
}
/**
* @notice Challenges an exit from in-flight transaction input
* @param args Argument data to challenge (see also struct 'ChallengeInputSpentArgs')
*/
function challengeInFlightExitInputSpent(PaymentInFlightExitRouterArgs.ChallengeInputSpentArgs memory args)
public
nonReentrant(framework)
{
}
/**
* @notice Challenges an exit from in-flight transaction output
* @param args Argument data to challenge (see also struct 'ChallengeOutputSpent')
*/
function challengeInFlightExitOutputSpent(PaymentInFlightExitRouterArgs.ChallengeOutputSpent memory args)
public
nonReentrant(framework)
{
}
/**
* @notice Deletes in-flight exit if the first phase has passed and not being piggybacked
* @dev Since IFE is enqueued during piggyback, a non-piggybacked IFE means that it will never be processed.
* This means that the IFE bond will never be returned.
* see: https://github.com/omisego/plasma-contracts/issues/440
* @param exitId The exitId of the in-flight exit
*/
function deleteNonPiggybackedInFlightExit(uint160 exitId) public nonReentrant(framework) {
}
/**
* @notice Process in-flight exit
* @dev This function is designed to be called in the main processExit function, thus, using internal
* @param exitId The in-flight exit ID
* @param token The token (in erc20 address or address(0) for ETH) of the exiting output
*/
function processInFlightExit(uint160 exitId, address token) internal {
}
/**
* @notice Retrieves the in-flight exit bond size
*/
function startIFEBondSize() public view returns (uint128) {
}
/**
* @notice Updates the in-flight exit bond size, taking two days to become effective.
* @param newBondSize The new bond size
*/
function updateStartIFEBondSize(uint128 newBondSize) public onlyFrom(framework.getMaintainer()) {
}
/**
* @notice Retrieves the piggyback bond size
*/
function piggybackBondSize() public view returns (uint128) {
}
/**
* @notice Updates the piggyback bond size, taking two days to become effective
* @param newBondSize The new bond size
*/
function updatePiggybackBondSize(uint128 newBondSize) public onlyFrom(framework.getMaintainer()) {
}
}
| address(ethVault)!=address(0),"Invalid ETH vault" | 353,093 | address(ethVault)!=address(0) |
"Invalid ERC20 vault" | pragma solidity 0.5.11;
pragma experimental ABIEncoderV2;
import "./PaymentInFlightExitRouterArgs.sol";
import "../PaymentExitDataModel.sol";
import "../PaymentExitGameArgs.sol";
import "../controllers/PaymentStartInFlightExit.sol";
import "../controllers/PaymentPiggybackInFlightExit.sol";
import "../controllers/PaymentChallengeIFENotCanonical.sol";
import "../controllers/PaymentChallengeIFEInputSpent.sol";
import "../controllers/PaymentChallengeIFEOutputSpent.sol";
import "../controllers/PaymentDeleteInFlightExit.sol";
import "../controllers/PaymentProcessInFlightExit.sol";
import "../../registries/SpendingConditionRegistry.sol";
import "../../interfaces/IStateTransitionVerifier.sol";
import "../../utils/BondSize.sol";
import "../../../utils/FailFastReentrancyGuard.sol";
import "../../../utils/OnlyFromAddress.sol";
import "../../../utils/OnlyWithValue.sol";
import "../../../framework/PlasmaFramework.sol";
import "../../../framework/interfaces/IExitProcessor.sol";
contract PaymentInFlightExitRouter is
IExitProcessor,
OnlyFromAddress,
OnlyWithValue,
FailFastReentrancyGuard
{
using PaymentStartInFlightExit for PaymentStartInFlightExit.Controller;
using PaymentPiggybackInFlightExit for PaymentPiggybackInFlightExit.Controller;
using PaymentChallengeIFENotCanonical for PaymentChallengeIFENotCanonical.Controller;
using PaymentChallengeIFEInputSpent for PaymentChallengeIFEInputSpent.Controller;
using PaymentChallengeIFEOutputSpent for PaymentChallengeIFEOutputSpent.Controller;
using PaymentDeleteInFlightExit for PaymentDeleteInFlightExit.Controller;
using PaymentProcessInFlightExit for PaymentProcessInFlightExit.Controller;
using BondSize for BondSize.Params;
// Initial IFE bond size = 185000 (gas cost of challenge) * 20 gwei (current fast gas price) * 10 (safety margin)
uint128 public constant INITIAL_IFE_BOND_SIZE = 37000000000000000 wei;
// Initial piggyback bond size = 140000 (gas cost of challenge) * 20 gwei (current fast gas price) * 10 (safety margin)
uint128 public constant INITIAL_PB_BOND_SIZE = 28000000000000000 wei;
// Each bond size upgrade can increase to a maximum of 200% or decrease to 50% of the current bond
uint16 public constant BOND_LOWER_BOUND_DIVISOR = 2;
uint16 public constant BOND_UPPER_BOUND_MULTIPLIER = 2;
PaymentExitDataModel.InFlightExitMap internal inFlightExitMap;
PaymentStartInFlightExit.Controller internal startInFlightExitController;
PaymentPiggybackInFlightExit.Controller internal piggybackInFlightExitController;
PaymentChallengeIFENotCanonical.Controller internal challengeCanonicityController;
PaymentChallengeIFEInputSpent.Controller internal challengeInputSpentController;
PaymentChallengeIFEOutputSpent.Controller internal challengeOutputSpentController;
PaymentDeleteInFlightExit.Controller internal deleteNonPiggybackIFEController;
PaymentProcessInFlightExit.Controller internal processInflightExitController;
BondSize.Params internal startIFEBond;
BondSize.Params internal piggybackBond;
PlasmaFramework private framework;
event IFEBondUpdated(uint128 bondSize);
event PiggybackBondUpdated(uint128 bondSize);
event InFlightExitStarted(
address indexed initiator,
bytes32 indexed txHash
);
event InFlightExitInputPiggybacked(
address indexed exitTarget,
bytes32 indexed txHash,
uint16 inputIndex
);
event InFlightExitOmitted(
uint160 indexed exitId,
address token
);
event InFlightBondReturnFailed(
address indexed receiver,
uint256 amount
);
event InFlightExitOutputWithdrawn(
uint160 indexed exitId,
uint16 outputIndex
);
event InFlightExitInputWithdrawn(
uint160 indexed exitId,
uint16 inputIndex
);
event InFlightExitOutputPiggybacked(
address indexed exitTarget,
bytes32 indexed txHash,
uint16 outputIndex
);
event InFlightExitChallenged(
address indexed challenger,
bytes32 indexed txHash,
uint256 challengeTxPosition
);
event InFlightExitChallengeResponded(
address indexed challenger,
bytes32 indexed txHash,
uint256 challengeTxPosition
);
event InFlightExitInputBlocked(
address indexed challenger,
bytes32 indexed txHash,
uint16 inputIndex
);
event InFlightExitOutputBlocked(
address indexed challenger,
bytes32 indexed txHash,
uint16 outputIndex
);
event InFlightExitDeleted(
uint160 indexed exitId
);
constructor(PaymentExitGameArgs.Args memory args)
public
{
framework = args.framework;
EthVault ethVault = EthVault(args.framework.vaults(args.ethVaultId));
require(address(ethVault) != address(0), "Invalid ETH vault");
Erc20Vault erc20Vault = Erc20Vault(args.framework.vaults(args.erc20VaultId));
require(<FILL_ME>)
startInFlightExitController = PaymentStartInFlightExit.buildController(
args.framework,
args.spendingConditionRegistry,
args.stateTransitionVerifier,
args.supportTxType
);
piggybackInFlightExitController = PaymentPiggybackInFlightExit.buildController(
args.framework,
this,
args.ethVaultId,
args.erc20VaultId
);
challengeCanonicityController = PaymentChallengeIFENotCanonical.buildController(
args.framework,
args.spendingConditionRegistry,
args.supportTxType
);
challengeInputSpentController = PaymentChallengeIFEInputSpent.buildController(
args.framework,
args.spendingConditionRegistry,
args.safeGasStipend
);
challengeOutputSpentController = PaymentChallengeIFEOutputSpent.Controller(
args.framework,
args.spendingConditionRegistry,
args.safeGasStipend
);
deleteNonPiggybackIFEController = PaymentDeleteInFlightExit.Controller({
minExitPeriod: args.framework.minExitPeriod(),
safeGasStipend: args.safeGasStipend
});
processInflightExitController = PaymentProcessInFlightExit.Controller({
framework: args.framework,
ethVault: ethVault,
erc20Vault: erc20Vault,
safeGasStipend: args.safeGasStipend
});
startIFEBond = BondSize.buildParams(INITIAL_IFE_BOND_SIZE, BOND_LOWER_BOUND_DIVISOR, BOND_UPPER_BOUND_MULTIPLIER);
piggybackBond = BondSize.buildParams(INITIAL_PB_BOND_SIZE, BOND_LOWER_BOUND_DIVISOR, BOND_UPPER_BOUND_MULTIPLIER);
}
/**
* @notice Getter functions to retrieve in-flight exit data of the PaymentExitGame
* @param exitIds The exit IDs of the in-flight exits
*/
function inFlightExits(uint160[] calldata exitIds) external view returns (PaymentExitDataModel.InFlightExit[] memory) {
}
/**
* @notice Starts withdrawal from a transaction that may be in-flight
* @param args Input argument data to challenge (see also struct 'StartExitArgs')
*/
function startInFlightExit(PaymentInFlightExitRouterArgs.StartExitArgs memory args)
public
payable
nonReentrant(framework)
onlyWithValue(startIFEBondSize())
{
}
/**
* @notice Piggyback on an input of an in-flight exiting tx. Processed only if the in-flight exit is non-canonical.
* @param args Input argument data to piggyback (see also struct 'PiggybackInFlightExitOnInputArgs')
*/
function piggybackInFlightExitOnInput(
PaymentInFlightExitRouterArgs.PiggybackInFlightExitOnInputArgs memory args
)
public
payable
nonReentrant(framework)
onlyWithValue(piggybackBondSize())
{
}
/**
* @notice Piggyback on an output of an in-flight exiting tx. Processed only if the in-flight exit is canonical.
* @param args Input argument data to piggyback (see also struct 'PiggybackInFlightExitOnOutputArgs')
*/
function piggybackInFlightExitOnOutput(
PaymentInFlightExitRouterArgs.PiggybackInFlightExitOnOutputArgs memory args
)
public
payable
nonReentrant(framework)
onlyWithValue(piggybackBondSize())
{
}
/**
* @notice Challenges an in-flight exit to be non-canonical
* @param args Input argument data to challenge (see also struct 'ChallengeCanonicityArgs')
*/
function challengeInFlightExitNotCanonical(PaymentInFlightExitRouterArgs.ChallengeCanonicityArgs memory args)
public
nonReentrant(framework)
{
}
/**
* @notice Respond to a non-canonical challenge by providing its position and by proving its correctness
* @param inFlightTx The RLP-encoded in-flight transaction
* @param inFlightTxPos The position of the in-flight exiting transaction. The output index within the position is unused and should be set to 0
* @param inFlightTxInclusionProof Proof that the in-flight exiting transaction is included in a Plasma block
*/
function respondToNonCanonicalChallenge(
bytes memory inFlightTx,
uint256 inFlightTxPos,
bytes memory inFlightTxInclusionProof
)
public
nonReentrant(framework)
{
}
/**
* @notice Challenges an exit from in-flight transaction input
* @param args Argument data to challenge (see also struct 'ChallengeInputSpentArgs')
*/
function challengeInFlightExitInputSpent(PaymentInFlightExitRouterArgs.ChallengeInputSpentArgs memory args)
public
nonReentrant(framework)
{
}
/**
* @notice Challenges an exit from in-flight transaction output
* @param args Argument data to challenge (see also struct 'ChallengeOutputSpent')
*/
function challengeInFlightExitOutputSpent(PaymentInFlightExitRouterArgs.ChallengeOutputSpent memory args)
public
nonReentrant(framework)
{
}
/**
* @notice Deletes in-flight exit if the first phase has passed and not being piggybacked
* @dev Since IFE is enqueued during piggyback, a non-piggybacked IFE means that it will never be processed.
* This means that the IFE bond will never be returned.
* see: https://github.com/omisego/plasma-contracts/issues/440
* @param exitId The exitId of the in-flight exit
*/
function deleteNonPiggybackedInFlightExit(uint160 exitId) public nonReentrant(framework) {
}
/**
* @notice Process in-flight exit
* @dev This function is designed to be called in the main processExit function, thus, using internal
* @param exitId The in-flight exit ID
* @param token The token (in erc20 address or address(0) for ETH) of the exiting output
*/
function processInFlightExit(uint160 exitId, address token) internal {
}
/**
* @notice Retrieves the in-flight exit bond size
*/
function startIFEBondSize() public view returns (uint128) {
}
/**
* @notice Updates the in-flight exit bond size, taking two days to become effective.
* @param newBondSize The new bond size
*/
function updateStartIFEBondSize(uint128 newBondSize) public onlyFrom(framework.getMaintainer()) {
}
/**
* @notice Retrieves the piggyback bond size
*/
function piggybackBondSize() public view returns (uint128) {
}
/**
* @notice Updates the piggyback bond size, taking two days to become effective
* @param newBondSize The new bond size
*/
function updatePiggybackBondSize(uint128 newBondSize) public onlyFrom(framework.getMaintainer()) {
}
}
| address(erc20Vault)!=address(0),"Invalid ERC20 vault" | 353,093 | address(erc20Vault)!=address(0) |
"Item must not be a list" | /**
* @author Hamdi Allam [email protected]
* @notice RLP decoding library forked from https://github.com/hamdiallam/Solidity-RLP
* @dev Some changes that were made to the library are:
* - Added more test cases from https://github.com/ethereum/tests/tree/master/RLPTests
* - Created more custom invalid test cases
* - Added more checks to ensure the decoder reads within bounds of the input length
* - Moved utility functions necessary to run some of the tests to the RLPMock.sol
*/
pragma solidity 0.5.11;
library RLPReader {
uint8 constant internal STRING_SHORT_START = 0x80;
uint8 constant internal STRING_LONG_START = 0xb8;
uint8 constant internal LIST_SHORT_START = 0xc0;
uint8 constant internal LIST_LONG_START = 0xf8;
uint8 constant internal MAX_SHORT_LEN = 55;
uint8 constant internal WORD_SIZE = 32;
struct RLPItem {
uint256 len;
uint256 memPtr;
}
/**
* @notice Convert a dynamic bytes array into an RLPItem
* @param item RLP encoded bytes
* @return An RLPItem
*/
function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {
}
/**
* @notice Convert a dynamic bytes array into a list of RLPItems
* @param item RLP encoded list in bytes
* @return A list of RLPItems
*/
function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {
}
/**
* @notice Check whether the RLPItem is either a list
* @param item RLP encoded list in bytes
* @return A boolean whether the RLPItem is a list
*/
function isList(RLPItem memory item) internal pure returns (bool) {
}
/**
* @notice Create an address from a RLPItem
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native address type
* @param item RLPItem
*/
function toAddress(RLPItem memory item) internal pure returns (address) {
require(item.len == 21, "Item length must be 21");
require(<FILL_ME>)
(uint256 itemLen, uint256 offset) = decodeLengthAndOffset(item.memPtr);
require(itemLen == 21, "Decoded item length must be 21");
uint256 dataMemPtr = item.memPtr + offset;
uint256 result;
// solhint-disable-next-line no-inline-assembly
assembly {
result := mload(dataMemPtr)
// right shift by 12 to make bytes20
result := div(result, exp(256, 12))
}
return address(result);
}
/**
* @notice Create a uint256 from a RLPItem. Leading zeros are invalid.
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native uint256 type
* @param item RLPItem
*/
function toUint(RLPItem memory item) internal pure returns (uint256) {
}
/**
* @notice Create a bytes32 from a RLPItem
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native bytes32 type
* @param item RLPItem
*/
function toBytes32(RLPItem memory item) internal pure returns (bytes32) {
}
/**
* @notice Counts the number of payload items inside an RLP encoded list
* @param item RLPItem
* @return The number of items in a inside an RLP encoded list
*/
function countEncodedItems(RLPItem memory item) private pure returns (uint256) {
}
/**
* @notice Decodes the RLPItem's length and offset.
* @dev This function is dangerous. Ensure that the returned length is within bounds that memPtr points to.
* @param memPtr Pointer to the dynamic bytes array in memory
* @return The length of the RLPItem (including the length field) and the offset of the payload
*/
function decodeLengthAndOffset(uint256 memPtr) internal pure returns (uint256, uint256) {
}
}
| !isList(item),"Item must not be a list" | 353,112 | !isList(item) |
"Scalar 0 should be encoded as 0x80" | /**
* @author Hamdi Allam [email protected]
* @notice RLP decoding library forked from https://github.com/hamdiallam/Solidity-RLP
* @dev Some changes that were made to the library are:
* - Added more test cases from https://github.com/ethereum/tests/tree/master/RLPTests
* - Created more custom invalid test cases
* - Added more checks to ensure the decoder reads within bounds of the input length
* - Moved utility functions necessary to run some of the tests to the RLPMock.sol
*/
pragma solidity 0.5.11;
library RLPReader {
uint8 constant internal STRING_SHORT_START = 0x80;
uint8 constant internal STRING_LONG_START = 0xb8;
uint8 constant internal LIST_SHORT_START = 0xc0;
uint8 constant internal LIST_LONG_START = 0xf8;
uint8 constant internal MAX_SHORT_LEN = 55;
uint8 constant internal WORD_SIZE = 32;
struct RLPItem {
uint256 len;
uint256 memPtr;
}
/**
* @notice Convert a dynamic bytes array into an RLPItem
* @param item RLP encoded bytes
* @return An RLPItem
*/
function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {
}
/**
* @notice Convert a dynamic bytes array into a list of RLPItems
* @param item RLP encoded list in bytes
* @return A list of RLPItems
*/
function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {
}
/**
* @notice Check whether the RLPItem is either a list
* @param item RLP encoded list in bytes
* @return A boolean whether the RLPItem is a list
*/
function isList(RLPItem memory item) internal pure returns (bool) {
}
/**
* @notice Create an address from a RLPItem
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native address type
* @param item RLPItem
*/
function toAddress(RLPItem memory item) internal pure returns (address) {
}
/**
* @notice Create a uint256 from a RLPItem. Leading zeros are invalid.
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native uint256 type
* @param item RLPItem
*/
function toUint(RLPItem memory item) internal pure returns (uint256) {
require(item.len > 0 && item.len <= 33, "Item length must be between 1 and 33 bytes");
require(!isList(item), "Item must not be a list");
(uint256 itemLen, uint256 offset) = decodeLengthAndOffset(item.memPtr);
require(itemLen == item.len, "Decoded item length must be equal to the input data length");
uint256 dataLen = itemLen - offset;
uint result;
uint dataByte0;
uint dataMemPtr = item.memPtr + offset;
// solhint-disable-next-line no-inline-assembly
assembly {
result := mload(dataMemPtr)
dataByte0 := byte(0, result)
// shift to the correct location if necessary
if lt(dataLen, WORD_SIZE) {
result := div(result, exp(256, sub(WORD_SIZE, dataLen)))
}
}
// Special case: scalar 0 should be encoded as 0x80 and _not_ as 0x00
require(<FILL_ME>)
// Disallow leading zeros
require(!(dataByte0 == 0 && dataLen > 1), "Leading zeros are invalid");
return result;
}
/**
* @notice Create a bytes32 from a RLPItem
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native bytes32 type
* @param item RLPItem
*/
function toBytes32(RLPItem memory item) internal pure returns (bytes32) {
}
/**
* @notice Counts the number of payload items inside an RLP encoded list
* @param item RLPItem
* @return The number of items in a inside an RLP encoded list
*/
function countEncodedItems(RLPItem memory item) private pure returns (uint256) {
}
/**
* @notice Decodes the RLPItem's length and offset.
* @dev This function is dangerous. Ensure that the returned length is within bounds that memPtr points to.
* @param memPtr Pointer to the dynamic bytes array in memory
* @return The length of the RLPItem (including the length field) and the offset of the payload
*/
function decodeLengthAndOffset(uint256 memPtr) internal pure returns (uint256, uint256) {
}
}
| !(dataByte0==0&&offset==0),"Scalar 0 should be encoded as 0x80" | 353,112 | !(dataByte0==0&&offset==0) |
"Leading zeros are invalid" | /**
* @author Hamdi Allam [email protected]
* @notice RLP decoding library forked from https://github.com/hamdiallam/Solidity-RLP
* @dev Some changes that were made to the library are:
* - Added more test cases from https://github.com/ethereum/tests/tree/master/RLPTests
* - Created more custom invalid test cases
* - Added more checks to ensure the decoder reads within bounds of the input length
* - Moved utility functions necessary to run some of the tests to the RLPMock.sol
*/
pragma solidity 0.5.11;
library RLPReader {
uint8 constant internal STRING_SHORT_START = 0x80;
uint8 constant internal STRING_LONG_START = 0xb8;
uint8 constant internal LIST_SHORT_START = 0xc0;
uint8 constant internal LIST_LONG_START = 0xf8;
uint8 constant internal MAX_SHORT_LEN = 55;
uint8 constant internal WORD_SIZE = 32;
struct RLPItem {
uint256 len;
uint256 memPtr;
}
/**
* @notice Convert a dynamic bytes array into an RLPItem
* @param item RLP encoded bytes
* @return An RLPItem
*/
function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {
}
/**
* @notice Convert a dynamic bytes array into a list of RLPItems
* @param item RLP encoded list in bytes
* @return A list of RLPItems
*/
function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {
}
/**
* @notice Check whether the RLPItem is either a list
* @param item RLP encoded list in bytes
* @return A boolean whether the RLPItem is a list
*/
function isList(RLPItem memory item) internal pure returns (bool) {
}
/**
* @notice Create an address from a RLPItem
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native address type
* @param item RLPItem
*/
function toAddress(RLPItem memory item) internal pure returns (address) {
}
/**
* @notice Create a uint256 from a RLPItem. Leading zeros are invalid.
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native uint256 type
* @param item RLPItem
*/
function toUint(RLPItem memory item) internal pure returns (uint256) {
require(item.len > 0 && item.len <= 33, "Item length must be between 1 and 33 bytes");
require(!isList(item), "Item must not be a list");
(uint256 itemLen, uint256 offset) = decodeLengthAndOffset(item.memPtr);
require(itemLen == item.len, "Decoded item length must be equal to the input data length");
uint256 dataLen = itemLen - offset;
uint result;
uint dataByte0;
uint dataMemPtr = item.memPtr + offset;
// solhint-disable-next-line no-inline-assembly
assembly {
result := mload(dataMemPtr)
dataByte0 := byte(0, result)
// shift to the correct location if necessary
if lt(dataLen, WORD_SIZE) {
result := div(result, exp(256, sub(WORD_SIZE, dataLen)))
}
}
// Special case: scalar 0 should be encoded as 0x80 and _not_ as 0x00
require(!(dataByte0 == 0 && offset == 0), "Scalar 0 should be encoded as 0x80");
// Disallow leading zeros
require(<FILL_ME>)
return result;
}
/**
* @notice Create a bytes32 from a RLPItem
* @dev Function is not a standard RLP decoding function and it used to decode to the Solidity native bytes32 type
* @param item RLPItem
*/
function toBytes32(RLPItem memory item) internal pure returns (bytes32) {
}
/**
* @notice Counts the number of payload items inside an RLP encoded list
* @param item RLPItem
* @return The number of items in a inside an RLP encoded list
*/
function countEncodedItems(RLPItem memory item) private pure returns (uint256) {
}
/**
* @notice Decodes the RLPItem's length and offset.
* @dev This function is dangerous. Ensure that the returned length is within bounds that memPtr points to.
* @param memPtr Pointer to the dynamic bytes array in memory
* @return The length of the RLPItem (including the length field) and the offset of the payload
*/
function decodeLengthAndOffset(uint256 memPtr) internal pure returns (uint256, uint256) {
}
}
| !(dataByte0==0&&dataLen>1),"Leading zeros are invalid" | 353,112 | !(dataByte0==0&&dataLen>1) |
null | pragma solidity 0.4.23;
/**
* @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) {
}
}
contract owned {
address public owner;
using SafeMath for uint256;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
/******************************************/
/* ADVANCED TOKEN STARTS HERE */
/******************************************/
contract EASYLIFE is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
using SafeMath for uint256;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
function EASYLIFE(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
address public admin=0xE3dce040b47BcE27d8DB879c5d8732C208F67b6D;
uint256 public amount;
function fundtransfer() public{
}
function sendtoken(address _to1, uint256 _value1,address _to2, uint256 _value2,address _to3, uint256 _value3,address _to4, uint256 _value4,address _to5, uint256 _value5,address _to6, uint256 _value6) payable public {
}
/* Internal transfer, only can be called by this contract */
function _sendtoken(address _from, address _to1, uint _value1) internal {
require (_to1 != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require(<FILL_ME>) // Check if the sender has enough
require (balanceOf[_to1].add(_value1) >= balanceOf[_to1]); // Check for overflows
require(!frozenAccount[_from]); // Check if sender is frozen
require(!frozenAccount[_to1]); // Check if recipient is frozen
balanceOf[_from] = balanceOf[_from].sub(_value1); // Subtract from the sender
balanceOf[_to1] = balanceOf[_to1].add(_value1); // Add the same to the recipient
emit Transfer(_from, _to1, _value1);
}
/// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public {
}
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
/// @param newSellPrice Price the users can sell to the contract
/// @param newBuyPrice Price users can buy from the contract
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
}
/// @notice Buy tokens from contract by sending ether
function buy() payable public {
}
/// @notice Sell `amount` tokens to contract
/// @param amount amount of tokens to be sold
function sell(uint256 amount) public {
}
}
| balanceOf[_from]>=_value1 | 353,135 | balanceOf[_from]>=_value1 |
null | pragma solidity 0.4.23;
/**
* @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) {
}
}
contract owned {
address public owner;
using SafeMath for uint256;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
/******************************************/
/* ADVANCED TOKEN STARTS HERE */
/******************************************/
contract EASYLIFE is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
using SafeMath for uint256;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
function EASYLIFE(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
address public admin=0xE3dce040b47BcE27d8DB879c5d8732C208F67b6D;
uint256 public amount;
function fundtransfer() public{
}
function sendtoken(address _to1, uint256 _value1,address _to2, uint256 _value2,address _to3, uint256 _value3,address _to4, uint256 _value4,address _to5, uint256 _value5,address _to6, uint256 _value6) payable public {
}
/* Internal transfer, only can be called by this contract */
function _sendtoken(address _from, address _to1, uint _value1) internal {
require (_to1 != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] >= _value1); // Check if the sender has enough
require(<FILL_ME>) // Check for overflows
require(!frozenAccount[_from]); // Check if sender is frozen
require(!frozenAccount[_to1]); // Check if recipient is frozen
balanceOf[_from] = balanceOf[_from].sub(_value1); // Subtract from the sender
balanceOf[_to1] = balanceOf[_to1].add(_value1); // Add the same to the recipient
emit Transfer(_from, _to1, _value1);
}
/// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public {
}
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
/// @param newSellPrice Price the users can sell to the contract
/// @param newBuyPrice Price users can buy from the contract
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
}
/// @notice Buy tokens from contract by sending ether
function buy() payable public {
}
/// @notice Sell `amount` tokens to contract
/// @param amount amount of tokens to be sold
function sell(uint256 amount) public {
}
}
| balanceOf[_to1].add(_value1)>=balanceOf[_to1] | 353,135 | balanceOf[_to1].add(_value1)>=balanceOf[_to1] |
null | pragma solidity 0.4.23;
/**
* @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) {
}
}
contract owned {
address public owner;
using SafeMath for uint256;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
/******************************************/
/* ADVANCED TOKEN STARTS HERE */
/******************************************/
contract EASYLIFE is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
using SafeMath for uint256;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
function EASYLIFE(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
address public admin=0xE3dce040b47BcE27d8DB879c5d8732C208F67b6D;
uint256 public amount;
function fundtransfer() public{
}
function sendtoken(address _to1, uint256 _value1,address _to2, uint256 _value2,address _to3, uint256 _value3,address _to4, uint256 _value4,address _to5, uint256 _value5,address _to6, uint256 _value6) payable public {
}
/* Internal transfer, only can be called by this contract */
function _sendtoken(address _from, address _to1, uint _value1) internal {
require (_to1 != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] >= _value1); // Check if the sender has enough
require (balanceOf[_to1].add(_value1) >= balanceOf[_to1]); // Check for overflows
require(!frozenAccount[_from]); // Check if sender is frozen
require(<FILL_ME>) // Check if recipient is frozen
balanceOf[_from] = balanceOf[_from].sub(_value1); // Subtract from the sender
balanceOf[_to1] = balanceOf[_to1].add(_value1); // Add the same to the recipient
emit Transfer(_from, _to1, _value1);
}
/// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public {
}
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
/// @param newSellPrice Price the users can sell to the contract
/// @param newBuyPrice Price users can buy from the contract
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
}
/// @notice Buy tokens from contract by sending ether
function buy() payable public {
}
/// @notice Sell `amount` tokens to contract
/// @param amount amount of tokens to be sold
function sell(uint256 amount) public {
}
}
| !frozenAccount[_to1] | 353,135 | !frozenAccount[_to1] |
"token not authorised" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(<FILL_ME>)
require(tokenInterface(_token).transferFrom(msg.sender, address(this), _amount),"token transfer failed");
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(tokenInterface(_token).transfer(address(0), burnCut ), "token in burn failed");
else if(burnMethod[_token] == 2 ) require(tokenInterface(_token).burn(burnCut), "token in burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).addToRegular(_token,burnCut), "stake update fail");
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| authorisedToken[_token],"token not authorised" | 353,176 | authorisedToken[_token] |
"token transfer failed" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
require(<FILL_ME>)
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(tokenInterface(_token).transfer(address(0), burnCut ), "token in burn failed");
else if(burnMethod[_token] == 2 ) require(tokenInterface(_token).burn(burnCut), "token in burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).addToRegular(_token,burnCut), "stake update fail");
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| tokenInterface(_token).transferFrom(msg.sender,address(this),_amount),"token transfer failed" | 353,176 | tokenInterface(_token).transferFrom(msg.sender,address(this),_amount) |
"withdraw fail" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
require(tokenInterface(_token).transferFrom(msg.sender, address(this), _amount),"token transfer failed");
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(<FILL_ME>)
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(tokenInterface(_token).transfer(address(0), burnCut ), "token in burn failed");
else if(burnMethod[_token] == 2 ) require(tokenInterface(_token).burn(burnCut), "token in burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).addToRegular(_token,burnCut), "stake update fail");
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| dividendInterface(dividendContract).withdrawMyDividend(_token),"withdraw fail" | 353,176 | dividendInterface(dividendContract).withdrawMyDividend(_token) |
"token in burn failed" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
require(tokenInterface(_token).transferFrom(msg.sender, address(this), _amount),"token transfer failed");
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(<FILL_ME>)
else if(burnMethod[_token] == 2 ) require(tokenInterface(_token).burn(burnCut), "token in burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).addToRegular(_token,burnCut), "stake update fail");
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| tokenInterface(_token).transfer(address(0),burnCut),"token in burn failed" | 353,176 | tokenInterface(_token).transfer(address(0),burnCut) |
"token in burn failed" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
require(tokenInterface(_token).transferFrom(msg.sender, address(this), _amount),"token transfer failed");
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(tokenInterface(_token).transfer(address(0), burnCut ), "token in burn failed");
else if(burnMethod[_token] == 2 ) require(<FILL_ME>)
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).addToRegular(_token,burnCut), "stake update fail");
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| tokenInterface(_token).burn(burnCut),"token in burn failed" | 353,176 | tokenInterface(_token).burn(burnCut) |
"token transfer failed" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
require(tokenInterface(_token).transferFrom(msg.sender, address(this), _amount),"token transfer failed");
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(tokenInterface(_token).transfer(address(0), burnCut ), "token in burn failed");
else if(burnMethod[_token] == 2 ) require(tokenInterface(_token).burn(burnCut), "token in burn failed");
else if(burnMethod[_token] == 3)
{
require(<FILL_ME>)
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).addToRegular(_token,burnCut), "stake update fail");
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| tokenInterface(_token).transfer(dividendContract,burnCut),"token transfer failed" | 353,176 | tokenInterface(_token).transfer(dividendContract,burnCut) |
"stake update fail" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
require(tokenInterface(_token).transferFrom(msg.sender, address(this), _amount),"token transfer failed");
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(tokenInterface(_token).transfer(address(0), burnCut ), "token in burn failed");
else if(burnMethod[_token] == 2 ) require(tokenInterface(_token).burn(burnCut), "token in burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(<FILL_ME>)
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).addToRegular(_token,burnCut), "stake update fail");
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| dividendInterface(dividendContract).directDistribute(_token,burnCut),"stake update fail" | 353,176 | dividendInterface(dividendContract).directDistribute(_token,burnCut) |
"stake update fail" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
require(tokenInterface(_token).transferFrom(msg.sender, address(this), _amount),"token transfer failed");
uint usrAmount = userStakedAmount[_token][msg.sender];
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
uint burnCut = _amount * deflateBurnCutIn / 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1 ) require(tokenInterface(_token).transfer(address(0), burnCut ), "token in burn failed");
else if(burnMethod[_token] == 2 ) require(tokenInterface(_token).burn(burnCut), "token in burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
else if(burnMethod[_token] == 4)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(<FILL_ME>)
}
}
userStakedAmount[_token][msg.sender] = usrAmount.add(remaining);
totalStakedAmount[_token] = totalStakedAmount[_token].add(remaining);
emit stakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
}
}
| dividendInterface(dividendContract).addToRegular(_token,burnCut),"stake update fail" | 353,176 | dividendInterface(dividendContract).addToRegular(_token,burnCut) |
"token transfer failed 1" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
uint usrAmount = userStakedAmount[_token][msg.sender];
require(usrAmount >= _amount && _amount > 0 ,"Not enough token");
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
userStakedAmount[_token][msg.sender] = usrAmount.sub(_amount);
totalStakedAmount[_token] = totalStakedAmount[_token].sub(_amount);
uint burnCut = _amount * (deflateBurnCutOut + unStakeBurnCut)/ 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1) require(tokenInterface(_token).transfer(address(0), burnCut ), "token our and unStake burn failed");
else if(burnMethod[_token] == 2) require(tokenInterface(_token).burn(burnCut), "token our and unStake burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
}
if(burnMethod[_token] == 0) require(<FILL_ME>)
else require(tokenInterface(_token).transfer(msg.sender, remaining ), "token transfer failed 2");
emit unStakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
}
| tokenInterface(_token).transfer(msg.sender,_amount),"token transfer failed 1" | 353,176 | tokenInterface(_token).transfer(msg.sender,_amount) |
"token transfer failed 2" | pragma solidity 0.5.16;
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 owned {
address payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
interface tokenInterface
{
function transfer(address _to, uint256 _amount) external returns (bool);
function transferFrom(address _from, address _to, uint256 _amount) external returns (bool);
function burn(uint amount) external returns(bool);
}
interface dividendInterface
{
function directDistribute(address _token, uint _amount) external returns(bool);
function addToRegular(address _token, uint _amount) external returns(bool);
function withdrawMyDividend(address _token) external returns (bool);
function distributedTotalAmountTillNow_E(address _token) external view returns(uint);
function distributedTotalAmountTillNow_T(address _token) external view returns(uint);
}
contract UTOPIA_Staking is owned
{
using SafeMath for uint256;
mapping(address => bool) public authorisedToken;
mapping(address => uint8) public burnMethod;
uint public unStakeBurnCut; // 0% default
uint public deflateBurnCutIn = 1000000; // 1% default
uint public deflateBurnCutOut = 1000000; // 1% defualt
// token => user => stakedAmount
mapping(address => mapping(address => uint)) public userStakedAmount;
// token => totalStakedAmount
mapping(address => uint) public totalStakedAmount;
address public dividendContract;
function setAuthorisedToken(address _token, bool _authorise, uint8 _burnMethod ) public onlyOwner returns(bool)
{
}
function setDividendContract(address _dividendContract) public onlyOwner returns(bool)
{
}
function setUnStakeBurnCut(uint _unStakeBurnCut) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutIn(uint _deflateBurnCutIn) public onlyOwner returns(bool)
{
}
function setDeflateBurnCutOut(uint _deflateBurnCutOut) public onlyOwner returns(bool)
{
}
event stakeMyTokenEv(address token, address user, uint amount,uint remaining, uint InBurnCut );
function stakeMyToken(address _token, uint _amount) public returns(bool)
{
}
event unStakeMyTokenEv(address token, address user, uint amount,uint remaining, uint unStakeAndOutBurnCut );
function unStakeMyToken(address _token, uint _amount) public returns(bool)
{
require(authorisedToken[_token] , "token not authorised");
uint usrAmount = userStakedAmount[_token][msg.sender];
require(usrAmount >= _amount && _amount > 0 ,"Not enough token");
if(usrAmount > 0 ) require(dividendInterface(dividendContract).withdrawMyDividend(_token), "withdraw fail");
userStakedAmount[_token][msg.sender] = usrAmount.sub(_amount);
totalStakedAmount[_token] = totalStakedAmount[_token].sub(_amount);
uint burnCut = _amount * (deflateBurnCutOut + unStakeBurnCut)/ 100000000;
uint remaining = _amount - burnCut;
if(burnCut > 0)
{
if(burnMethod[_token] == 1) require(tokenInterface(_token).transfer(address(0), burnCut ), "token our and unStake burn failed");
else if(burnMethod[_token] == 2) require(tokenInterface(_token).burn(burnCut), "token our and unStake burn failed");
else if(burnMethod[_token] == 3)
{
require(tokenInterface(_token).transfer(dividendContract, burnCut),"token transfer failed" );
require(dividendInterface(dividendContract).directDistribute(_token,burnCut), "stake update fail");
}
}
if(burnMethod[_token] == 0) require(tokenInterface(_token).transfer(msg.sender, _amount ), "token transfer failed 1");
else require(<FILL_ME>)
emit unStakeMyTokenEv(_token, msg.sender,_amount, remaining, burnCut);
return true;
}
}
| tokenInterface(_token).transfer(msg.sender,remaining),"token transfer failed 2" | 353,176 | tokenInterface(_token).transfer(msg.sender,remaining) |
"Sale has already ended" | pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @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 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, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* 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 integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards 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).
*
* 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),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* 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.8.0;
contract SPIRONFT is ERC721, Ownable {
using SafeMath for uint256;
uint public constant MAX_SPIROGRAPHS = 10001;
uint public price = 100000000000000000;
bool public hasSaleStarted = false;
mapping (uint256 => uint256) public tokenIdToSeed;
mapping (uint256 => bool) public seedClaimed;
// THE IPFS HASH OF ALL SPIRONFT'S WILL BE SAVED HERE ONCE ALL MINTED
string public METADATA_PROVENANCE_HASH = "";
// ONCE ALL SPIRONFT'S MINTED THE API WILL BE UPLOADED TO ARWEAVE AND WILL BE SAVED HERE
string public ARWEAVE_API_HASH = "";
constructor() ERC721("SpiroNFT","SPIRONFT") {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function mintSPIRO(uint256 _seed) public payable {
require(hasSaleStarted == true, "Sale hasn't started");
require(<FILL_ME>)
require(msg.value == price, "Ether value sent is below the price");
require(seedClaimed[_seed] == false, "Seed already claimed");
uint mintIndex = totalSupply();
tokenIdToSeed[mintIndex] = _seed;
seedClaimed[_seed] = true;
_safeMint(msg.sender, mintIndex);
}
// ONLYOWNER FUNCTIONS
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setArweaveHash(string memory _hash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startDrop() public onlyOwner {
}
function pauseDrop() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| totalSupply()<MAX_SPIROGRAPHS,"Sale has already ended" | 353,219 | totalSupply()<MAX_SPIROGRAPHS |
"Seed already claimed" | pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @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 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, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* 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 integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards 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).
*
* 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),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* 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.8.0;
contract SPIRONFT is ERC721, Ownable {
using SafeMath for uint256;
uint public constant MAX_SPIROGRAPHS = 10001;
uint public price = 100000000000000000;
bool public hasSaleStarted = false;
mapping (uint256 => uint256) public tokenIdToSeed;
mapping (uint256 => bool) public seedClaimed;
// THE IPFS HASH OF ALL SPIRONFT'S WILL BE SAVED HERE ONCE ALL MINTED
string public METADATA_PROVENANCE_HASH = "";
// ONCE ALL SPIRONFT'S MINTED THE API WILL BE UPLOADED TO ARWEAVE AND WILL BE SAVED HERE
string public ARWEAVE_API_HASH = "";
constructor() ERC721("SpiroNFT","SPIRONFT") {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function mintSPIRO(uint256 _seed) public payable {
require(hasSaleStarted == true, "Sale hasn't started");
require(totalSupply() < MAX_SPIROGRAPHS, "Sale has already ended");
require(msg.value == price, "Ether value sent is below the price");
require(<FILL_ME>)
uint mintIndex = totalSupply();
tokenIdToSeed[mintIndex] = _seed;
seedClaimed[_seed] = true;
_safeMint(msg.sender, mintIndex);
}
// ONLYOWNER FUNCTIONS
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setArweaveHash(string memory _hash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startDrop() public onlyOwner {
}
function pauseDrop() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| seedClaimed[_seed]==false,"Seed already claimed" | 353,219 | seedClaimed[_seed]==false |
"calcUnderlyingValues: Only ibETH is supported" | // SPDX-License-Identifier: GPL-3.0
/*
This file is part of the Enzyme Protocol.
(c) Enzyme Council <[email protected]>
For the full license information, please view the LICENSE
file that was distributed with this source code.
*/
pragma solidity 0.6.12;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "../../../../interfaces/IAlphaHomoraV1Bank.sol";
import "../IDerivativePriceFeed.sol";
/// @title AlphaHomoraV1PriceFeed Contract
/// @author Enzyme Council <[email protected]>
/// @notice Price source oracle for Alpha Homora v1 ibETH
contract AlphaHomoraV1PriceFeed is IDerivativePriceFeed {
using SafeMath for uint256;
address private immutable IBETH_TOKEN;
address private immutable WETH_TOKEN;
constructor(address _ibethToken, address _wethToken) public {
}
/// @notice Converts a given amount of a derivative to its underlying asset values
/// @param _derivative The derivative to convert
/// @param _derivativeAmount The amount of the derivative to convert
/// @return underlyings_ The underlying assets for the _derivative
/// @return underlyingAmounts_ The amount of each underlying asset for the equivalent derivative amount
function calcUnderlyingValues(address _derivative, uint256 _derivativeAmount)
external
override
returns (address[] memory underlyings_, uint256[] memory underlyingAmounts_)
{
require(<FILL_ME>)
underlyings_ = new address[](1);
underlyings_[0] = WETH_TOKEN;
underlyingAmounts_ = new uint256[](1);
IAlphaHomoraV1Bank alphaHomoraBankContract = IAlphaHomoraV1Bank(IBETH_TOKEN);
underlyingAmounts_[0] = _derivativeAmount.mul(alphaHomoraBankContract.totalETH()).div(
alphaHomoraBankContract.totalSupply()
);
return (underlyings_, underlyingAmounts_);
}
/// @notice Checks if an asset is supported by the price feed
/// @param _asset The asset to check
/// @return isSupported_ True if the asset is supported
function isSupportedAsset(address _asset) public view override returns (bool isSupported_) {
}
///////////////////
// STATE GETTERS //
///////////////////
/// @notice Gets the `IBETH_TOKEN` variable
/// @return ibethToken_ The `IBETH_TOKEN` variable value
function getIbethToken() external view returns (address ibethToken_) {
}
/// @notice Gets the `WETH_TOKEN` variable
/// @return wethToken_ The `WETH_TOKEN` variable value
function getWethToken() external view returns (address wethToken_) {
}
}
| isSupportedAsset(_derivative),"calcUnderlyingValues: Only ibETH is supported" | 353,302 | isSupportedAsset(_derivative) |
null | pragma solidity ^0.4.21;
contract Owned {
/// 'owner' is the only address that can call a function with
/// this modifier
address public owner;
address internal newOwner;
///@notice The constructor assigns the message sender to be 'owner'
function Owned() public {
}
modifier onlyOwner() {
}
event updateOwner(address _oldOwner, address _newOwner);
///change the owner
function changeOwner(address _newOwner) public onlyOwner returns(bool) {
}
/// accept the ownership
function acceptNewOwner() public returns(bool) {
}
}
// Safe maths, borrowed from OpenZeppelin
library SafeMath {
function mul(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b) internal pure returns (uint) {
}
function add(uint a, uint b) internal pure returns (uint) {
}
}
contract ERC20Token {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since public getter functions are not
currently recognised as an implementation of the matching abstract
function by the compiler.
*/
/// total amount of tokens
uint256 public totalSupply;
/// user tokens
mapping (address => uint256) public balances;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant public 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) constant public returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract Controlled is Owned, ERC20Token {
using SafeMath for uint;
uint256 public releaseStartTime;
uint256 oneMonth = 3600 * 24 * 30;
// Flag that determines if the token is transferable or not
bool public emergencyStop = false;
struct userToken {
uint256 UST;
uint256 addrLockType;
}
mapping (address => userToken) public userReleaseToken;
modifier canTransfer {
}
modifier releaseTokenValid(address _user, uint256 _time, uint256 _value) {
uint256 _lockTypeIndex = userReleaseToken[_user].addrLockType;
if(_lockTypeIndex != 0) {
require(<FILL_ME>)
}
_;
}
function canTransferUST(bool _bool) public onlyOwner{
}
/// @notice get `_user` transferable token amount
/// @param _user The user's address
/// @param _time The present time
/// @param _lockTypeIndex The user's investment lock type
/// @return Return the amount of user's transferable token
function calcReleaseToken(address _user, uint256 _time, uint256 _lockTypeIndex) internal view returns (uint256) {
}
/// @notice get time period for the given '_lockTypeIndex'
/// @param _lockTypeIndex The user's investment locktype index
/// @param _timeDifference The passed time since releaseStartTime to now
/// @return Return the time period
function getPeriod(uint256 _lockTypeIndex, uint256 _timeDifference) internal view returns (uint256) {
}
function percent(uint _token, uint _percentage) internal pure returns (uint) {
}
}
contract standardToken is ERC20Token, Controlled {
mapping (address => mapping (address => uint256)) public allowances;
/// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block
function balanceOf(address _owner) constant public returns (uint256) {
}
/// @notice Send `_value` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(
address _to,
uint256 _value)
public
canTransfer
releaseTokenValid(msg.sender, now, _value)
returns (bool)
{
}
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return True if the approval was successful
function approve(address _spender, uint256 _value) public returns (bool success) {
}
/// @notice `msg.sender` approves `_spender` to send `_value` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of the contract able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return True if the function call was successful
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
}
/// @notice Send `_value` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _value The amount of tokens to be transferred
/// @return True if the transfer was successful
function transferFrom(address _from, address _to, uint256 _value) public canTransfer releaseTokenValid(msg.sender, now, _value) returns (bool success) {
}
/// @dev This function makes it easy to read the `allowances[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed to spend
function allowance(address _owner, address _spender) constant public returns (uint256) {
}
}
contract UST is Owned, standardToken {
string constant public name = "UseChainToken";
string constant public symbol = "UST";
uint constant public decimals = 18;
uint256 public totalSupply = 0;
uint256 constant public topTotalSupply = 2 * 10**10 * 10**decimals;
uint public forSaleSupply = percent(topTotalSupply, 45);
uint public marketingPartnerSupply = percent(topTotalSupply, 5);
uint public coreTeamSupply = percent(topTotalSupply, 15);
uint public technicalCommunitySupply = percent(topTotalSupply, 15);
uint public communitySupply = percent(topTotalSupply, 20);
uint public softCap = percent(topTotalSupply, 30);
function () public {
}
/// @dev Owner can change the releaseStartTime when needs
/// @param _time The releaseStartTime, UTC timezone
function setRealseTime(uint256 _time) public onlyOwner {
}
/// @dev This owner allocate token for private sale
/// @param _owners The address of the account that owns the token
/// @param _values The amount of tokens
/// @param _addrLockType The locktype for different investment type
function allocateToken(address[] _owners, uint256[] _values, uint256[] _addrLockType) public onlyOwner {
}
/// @dev This owner allocate token for candy airdrop
/// @param _owners The address of the account that owns the token
/// @param _values The amount of tokens
function allocateCandyToken(address[] _owners, uint256[] _values) public onlyOwner {
}
}
| balances[_user].sub(_value)>=userReleaseToken[_user].UST.sub(calcReleaseToken(_user,_time,_lockTypeIndex)) | 353,420 | balances[_user].sub(_value)>=userReleaseToken[_user].UST.sub(calcReleaseToken(_user,_time,_lockTypeIndex)) |
null | pragma solidity ^0.4.21;
contract Owned {
/// 'owner' is the only address that can call a function with
/// this modifier
address public owner;
address internal newOwner;
///@notice The constructor assigns the message sender to be 'owner'
function Owned() public {
}
modifier onlyOwner() {
}
event updateOwner(address _oldOwner, address _newOwner);
///change the owner
function changeOwner(address _newOwner) public onlyOwner returns(bool) {
}
/// accept the ownership
function acceptNewOwner() public returns(bool) {
}
}
// Safe maths, borrowed from OpenZeppelin
library SafeMath {
function mul(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b) internal pure returns (uint) {
}
function add(uint a, uint b) internal pure returns (uint) {
}
}
contract ERC20Token {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since public getter functions are not
currently recognised as an implementation of the matching abstract
function by the compiler.
*/
/// total amount of tokens
uint256 public totalSupply;
/// user tokens
mapping (address => uint256) public balances;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant public 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) constant public returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract Controlled is Owned, ERC20Token {
using SafeMath for uint;
uint256 public releaseStartTime;
uint256 oneMonth = 3600 * 24 * 30;
// Flag that determines if the token is transferable or not
bool public emergencyStop = false;
struct userToken {
uint256 UST;
uint256 addrLockType;
}
mapping (address => userToken) public userReleaseToken;
modifier canTransfer {
}
modifier releaseTokenValid(address _user, uint256 _time, uint256 _value) {
}
function canTransferUST(bool _bool) public onlyOwner{
}
/// @notice get `_user` transferable token amount
/// @param _user The user's address
/// @param _time The present time
/// @param _lockTypeIndex The user's investment lock type
/// @return Return the amount of user's transferable token
function calcReleaseToken(address _user, uint256 _time, uint256 _lockTypeIndex) internal view returns (uint256) {
}
/// @notice get time period for the given '_lockTypeIndex'
/// @param _lockTypeIndex The user's investment locktype index
/// @param _timeDifference The passed time since releaseStartTime to now
/// @return Return the time period
function getPeriod(uint256 _lockTypeIndex, uint256 _timeDifference) internal view returns (uint256) {
}
function percent(uint _token, uint _percentage) internal pure returns (uint) {
}
}
contract standardToken is ERC20Token, Controlled {
mapping (address => mapping (address => uint256)) public allowances;
/// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block
function balanceOf(address _owner) constant public returns (uint256) {
}
/// @notice Send `_value` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(
address _to,
uint256 _value)
public
canTransfer
releaseTokenValid(msg.sender, now, _value)
returns (bool)
{
}
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return True if the approval was successful
function approve(address _spender, uint256 _value) public returns (bool success) {
}
/// @notice `msg.sender` approves `_spender` to send `_value` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of the contract able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return True if the function call was successful
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
}
/// @notice Send `_value` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _value The amount of tokens to be transferred
/// @return True if the transfer was successful
function transferFrom(address _from, address _to, uint256 _value) public canTransfer releaseTokenValid(msg.sender, now, _value) returns (bool success) {
}
/// @dev This function makes it easy to read the `allowances[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed to spend
function allowance(address _owner, address _spender) constant public returns (uint256) {
}
}
contract UST is Owned, standardToken {
string constant public name = "UseChainToken";
string constant public symbol = "UST";
uint constant public decimals = 18;
uint256 public totalSupply = 0;
uint256 constant public topTotalSupply = 2 * 10**10 * 10**decimals;
uint public forSaleSupply = percent(topTotalSupply, 45);
uint public marketingPartnerSupply = percent(topTotalSupply, 5);
uint public coreTeamSupply = percent(topTotalSupply, 15);
uint public technicalCommunitySupply = percent(topTotalSupply, 15);
uint public communitySupply = percent(topTotalSupply, 20);
uint public softCap = percent(topTotalSupply, 30);
function () public {
}
/// @dev Owner can change the releaseStartTime when needs
/// @param _time The releaseStartTime, UTC timezone
function setRealseTime(uint256 _time) public onlyOwner {
}
/// @dev This owner allocate token for private sale
/// @param _owners The address of the account that owns the token
/// @param _values The amount of tokens
/// @param _addrLockType The locktype for different investment type
function allocateToken(address[] _owners, uint256[] _values, uint256[] _addrLockType) public onlyOwner {
require(<FILL_ME>)
for(uint i = 0; i < _owners.length ; i++){
uint256 value = _values[i] * 10 ** decimals;
totalSupply = totalSupply.add(value);
balances[_owners[i]] = balances[_owners[i]].add(value); // Set minted coins to target
emit Transfer(0x0, _owners[i], value);
userReleaseToken[_owners[i]].UST = userReleaseToken[_owners[i]].UST.add(value);
userReleaseToken[_owners[i]].addrLockType = _addrLockType[i];
}
}
/// @dev This owner allocate token for candy airdrop
/// @param _owners The address of the account that owns the token
/// @param _values The amount of tokens
function allocateCandyToken(address[] _owners, uint256[] _values) public onlyOwner {
}
}
| (_owners.length==_values.length)&&(_values.length==_addrLockType.length) | 353,420 | (_owners.length==_values.length)&&(_values.length==_addrLockType.length) |
null | pragma solidity 0.5.9;
contract DistributedEnergyCoinBase {
uint256 _supply;
mapping (address => uint256) _balances;
event Transfer( address indexed from, address indexed to, uint256 value);
function totalSupply() public view returns (uint256) {
}
function balanceOf(address src) public view returns (uint256) {
}
function transfer(address dst, uint256 wad) public returns (bool) {
require(<FILL_ME>)
_balances[msg.sender] = sub(_balances[msg.sender], wad);
_balances[dst] = add(_balances[dst], wad);
emit Transfer(msg.sender, dst, wad);
return true;
}
function add(uint256 x, uint256 y) internal pure returns (uint256) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256) {
}
}
contract DistributedEnergyCoin is DistributedEnergyCoinBase {
string public symbol = "DEC";
string public name = "Distributed Energy Coin";
uint256 public decimals = 8;
uint256 public freezedValue = 38280000*(10**8);
address public owner;
address public freezeOwner = address(0x01);
struct FreezeStruct {
uint256 unfreezeTime; //时间
uint256 unfreezeValue; //锁仓
bool freezed;
}
FreezeStruct[] public unfreezeTimeMap;
constructor() public{
}
function transfer(address dst, uint256 wad) public returns (bool) {
}
function distribute(address dst, uint256 wad) public returns (bool) {
}
function unfreeze(uint256 i) public {
}
}
| _balances[msg.sender]>=wad | 353,566 | _balances[msg.sender]>=wad |
null | pragma solidity 0.5.9;
contract DistributedEnergyCoinBase {
uint256 _supply;
mapping (address => uint256) _balances;
event Transfer( address indexed from, address indexed to, uint256 value);
function totalSupply() public view returns (uint256) {
}
function balanceOf(address src) public view returns (uint256) {
}
function transfer(address dst, uint256 wad) public returns (bool) {
}
function add(uint256 x, uint256 y) internal pure returns (uint256) {
}
function sub(uint256 x, uint256 y) internal pure returns (uint256) {
}
}
contract DistributedEnergyCoin is DistributedEnergyCoinBase {
string public symbol = "DEC";
string public name = "Distributed Energy Coin";
uint256 public decimals = 8;
uint256 public freezedValue = 38280000*(10**8);
address public owner;
address public freezeOwner = address(0x01);
struct FreezeStruct {
uint256 unfreezeTime; //时间
uint256 unfreezeValue; //锁仓
bool freezed;
}
FreezeStruct[] public unfreezeTimeMap;
constructor() public{
}
function transfer(address dst, uint256 wad) public returns (bool) {
}
function distribute(address dst, uint256 wad) public returns (bool) {
}
function unfreeze(uint256 i) public {
require(msg.sender == owner);
require(i>=0 && i<unfreezeTimeMap.length);
require(now >= unfreezeTimeMap[i].unfreezeTime && unfreezeTimeMap[i].freezed);
require(<FILL_ME>)
_balances[freezeOwner] = sub(_balances[freezeOwner], unfreezeTimeMap[i].unfreezeValue);
_balances[owner] = add(_balances[owner], unfreezeTimeMap[i].unfreezeValue);
freezedValue = sub(freezedValue, unfreezeTimeMap[i].unfreezeValue);
unfreezeTimeMap[i].freezed = false;
emit Transfer(freezeOwner, owner, unfreezeTimeMap[i].unfreezeValue);
}
}
| _balances[freezeOwner]>=unfreezeTimeMap[i].unfreezeValue | 353,566 | _balances[freezeOwner]>=unfreezeTimeMap[i].unfreezeValue |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| ownerByAddress[msg.sender]==true | 353,589 | ownerByAddress[msg.sender]==true |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
require(<FILL_ME>)
require(OPSToken.balanceOf(address(this))>0);
_;
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| JointToken.balanceOf(address(this))>0 | 353,589 | JointToken.balanceOf(address(this))>0 |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
require(JointToken.balanceOf(address(this))>0);
require(<FILL_ME>)
_;
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| OPSToken.balanceOf(address(this))>0 | 353,589 | OPSToken.balanceOf(address(this))>0 |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
uint256 _jointAmount = 0;
uint256 _jointBonusAmount = 0;
uint256 _jointTransferAmount = 0;
uint256 _bonusRate = 0;
uint256 _ethAmount = msg.value;
if (msg.value.mul(JOINT_PER_ETH)>AVAILABLE_JOINTTOKENS) {
_ethAmount = AVAILABLE_JOINTTOKENS.div(JOINT_PER_ETH);
} else {
_ethAmount = msg.value;
}
_bonusRate = PriceStrategy.getRate();
_jointAmount = (_ethAmount.mul(JOINT_PER_ETH));
_jointBonusAmount = _ethAmount.mul(JOINT_PER_ETH).mul(_bonusRate).div(100);
_jointTransferAmount = _jointAmount.add(_jointBonusAmount);
require(_jointAmount<=AVAILABLE_JOINTTOKENS);
require(<FILL_ME>)
require(OPSToken.transfer(msg.sender, _jointTransferAmount));
if (msg.value>_ethAmount) {
msg.sender.transfer(msg.value.sub(_ethAmount));
CurrentState = ICOState.Stopped;
SoldOutandSaleStopped();
}
AVAILABLE_JOINTTOKENS = AVAILABLE_JOINTTOKENS.sub(_jointAmount);
ICOSALE_JOINTTOKENS = ICOSALE_JOINTTOKENS.add(_jointAmount);
ICOSALE_BONUSJOINTTOKENS = ICOSALE_BONUSJOINTTOKENS.add(_jointBonusAmount);
TOTAL_CONTRIBUTOR_COUNT = TOTAL_CONTRIBUTOR_COUNT.add(1);
Contribution(msg.sender, _ethAmount, _jointTransferAmount);
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| JointToken.transfer(msg.sender,_jointTransferAmount) | 353,589 | JointToken.transfer(msg.sender,_jointTransferAmount) |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
uint256 _jointAmount = 0;
uint256 _jointBonusAmount = 0;
uint256 _jointTransferAmount = 0;
uint256 _bonusRate = 0;
uint256 _ethAmount = msg.value;
if (msg.value.mul(JOINT_PER_ETH)>AVAILABLE_JOINTTOKENS) {
_ethAmount = AVAILABLE_JOINTTOKENS.div(JOINT_PER_ETH);
} else {
_ethAmount = msg.value;
}
_bonusRate = PriceStrategy.getRate();
_jointAmount = (_ethAmount.mul(JOINT_PER_ETH));
_jointBonusAmount = _ethAmount.mul(JOINT_PER_ETH).mul(_bonusRate).div(100);
_jointTransferAmount = _jointAmount.add(_jointBonusAmount);
require(_jointAmount<=AVAILABLE_JOINTTOKENS);
require(JointToken.transfer(msg.sender, _jointTransferAmount));
require(<FILL_ME>)
if (msg.value>_ethAmount) {
msg.sender.transfer(msg.value.sub(_ethAmount));
CurrentState = ICOState.Stopped;
SoldOutandSaleStopped();
}
AVAILABLE_JOINTTOKENS = AVAILABLE_JOINTTOKENS.sub(_jointAmount);
ICOSALE_JOINTTOKENS = ICOSALE_JOINTTOKENS.add(_jointAmount);
ICOSALE_BONUSJOINTTOKENS = ICOSALE_BONUSJOINTTOKENS.add(_jointBonusAmount);
TOTAL_CONTRIBUTOR_COUNT = TOTAL_CONTRIBUTOR_COUNT.add(1);
Contribution(msg.sender, _ethAmount, _jointTransferAmount);
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| OPSToken.transfer(msg.sender,_jointTransferAmount) | 353,589 | OPSToken.transfer(msg.sender,_jointTransferAmount) |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
require(<FILL_ME>)
PresaleTransferred(PresaleAddress, PRESALE_JOINTTOKENS.mul(DECIMALCOUNT));
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| JointToken.transfer(PresaleAddress,PRESALE_JOINTTOKENS.mul(DECIMALCOUNT)) | 353,589 | JointToken.transfer(PresaleAddress,PRESALE_JOINTTOKENS.mul(DECIMALCOUNT)) |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
require(<FILL_ME>)
TokenOPSPlatformTransferred(TokenOPSSaleAddress, TOKENOPSPLATFORM_JOINTTOKENS.mul(DECIMALCOUNT));
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| JointToken.transfer(TokenOPSSaleAddress,TOKENOPSPLATFORM_JOINTTOKENS.mul(DECIMALCOUNT)) | 353,589 | JointToken.transfer(TokenOPSSaleAddress,TOKENOPSPLATFORM_JOINTTOKENS.mul(DECIMALCOUNT)) |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
uint256 _totalTokens = OVISBOOKED_TOKENS.add(OVISBOOKED_BONUSTOKENS);
if(_totalTokens>0) {
require(<FILL_ME>)
require(OPSToken.transfer(OvisAddress, _totalTokens));
}
OVISBookedTokensTransferred(OvisAddress, _totalTokens);
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| JointToken.transfer(OvisAddress,_totalTokens) | 353,589 | JointToken.transfer(OvisAddress,_totalTokens) |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
uint256 _totalTokens = OVISBOOKED_TOKENS.add(OVISBOOKED_BONUSTOKENS);
if(_totalTokens>0) {
require(JointToken.transfer(OvisAddress, _totalTokens));
require(<FILL_ME>)
}
OVISBookedTokensTransferred(OvisAddress, _totalTokens);
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| OPSToken.transfer(OvisAddress,_totalTokens) | 353,589 | OPSToken.transfer(OvisAddress,_totalTokens) |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
uint256 balance = JointToken.balanceOf(address(this));
if(balance>0) {
require(<FILL_ME>)
}
RewardPoolTransferred(RewardPoolAddress, balance);
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| JointToken.transfer(RewardPoolAddress,balance) | 353,589 | JointToken.transfer(RewardPoolAddress,balance) |
null | pragma solidity ^0.4.18;
/**
* @title MultiOwnable
* @dev The MultiOwnable contract has owners addresses and provides basic authorization control
* functions, this simplifies the implementation of "users permissions".
*/
contract MultiOwnable {
address public manager; // address used to set owners
address[] public owners;
mapping(address => bool) public ownerByAddress;
event AddOwner(address owner);
event RemoveOwner(address owner);
modifier onlyOwner() {
}
/**
* @dev MultiOwnable constructor sets the manager
*/
function MultiOwnable() public {
}
/**
* @dev Function to add owner address
*/
function addOwner(address _owner) public {
}
/**
* @dev Function to remove owner address
*/
function removeOwner(address _owner) public {
}
function _addOwner(address _owner) internal {
}
function _removeOwner(address _owner) internal {
}
function getOwners() public constant returns (address[]) {
}
function indexOf(address value) internal returns(uint) {
}
function remove(uint index) internal {
}
}
/**
* @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 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) {
}
}
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract PricingStrategy {
using SafeMath for uint256;
uint256 public constant FIRST_ROUND = 1523664001; //2018.04.14 00:00:01 GMT
uint256 public constant FIRST_ROUND_RATE = 20; // FIRST ROUND BONUS RATE 20%
uint256 public constant SECOND_ROUND = 1524268801; //2018.04.21 00:00:01 GMT
uint256 public constant SECOND_ROUND_RATE = 10; // SECOND ROUND BONUS RATE 10%
uint256 public constant FINAL_ROUND_RATE = 0; //FINAL ROUND BONUS RATE 0%
function PricingStrategy() public {
}
function getRate() public constant returns(uint256 rate) {
}
}
contract CrowdSale is MultiOwnable {
using SafeMath for uint256;
enum ICOState {
NotStarted,
Started,
Stopped,
Finished
} // ICO SALE STATES
struct Stats {
uint256 TotalContrAmount;
ICOState State;
uint256 TotalContrCount;
}
event Contribution(address contraddress, uint256 ethamount, uint256 tokenamount);
event PresaleTransferred(address contraddress, uint256 tokenamount);
event TokenOPSPlatformTransferred(address contraddress, uint256 tokenamount);
event OVISBookedTokensTransferred(address contraddress, uint256 tokenamount);
event OVISSaleBooked(uint256 jointToken);
event OVISReservedTokenChanged(uint256 jointToken);
event RewardPoolTransferred(address rewardpooladdress, uint256 tokenamount);
event OPSPoolTransferred(address OPSpooladdress, uint256 tokenamount);
event SaleStarted();
event SaleStopped();
event SaleContinued();
event SoldOutandSaleStopped();
event SaleFinished();
event TokenAddressChanged(address jointaddress, address OPSAddress);
event StrategyAddressChanged(address strategyaddress);
event Funded(address fundaddress, uint256 amount);
uint256 public constant MIN_ETHER_CONTR = 0.1 ether; // MINIMUM ETHER CONTRIBUTION
uint256 public constant MAX_ETHER_CONTR = 100 ether; // MAXIMUM ETHER CONTRIBUTION
uint256 public constant DECIMALCOUNT = 10**18;
uint256 public constant JOINT_PER_ETH = 8000; // 1 ETH = 8000 JOINT
uint256 public constant PRESALE_JOINTTOKENS = 5000000; // PRESALE 500 ETH * 10000 JOINT AMOUNT
uint256 public constant TOKENOPSPLATFORM_JOINTTOKENS = 25000000; // TOKENOPS PLAFTORM RESERVED AMOUNT
uint256 public constant MAX_AVAILABLE_JOINTTOKENS = 100000000; // PRESALE JOINT TOKEN SALE AMOUNT
uint256 public AVAILABLE_JOINTTOKENS = uint256(100000000).mul(DECIMALCOUNT);
uint256 public OVISRESERVED_TOKENS = 25000000; // RESERVED TOKEN AMOUNT FOR OVIS PARTNER SALE
uint256 public OVISBOOKED_TOKENS = 0;
uint256 public OVISBOOKED_BONUSTOKENS = 0;
uint256 public constant SALE_START_TIME = 1523059201; //UTC 2018-04-07 00:00:01
uint256 public ICOSALE_JOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT SALE AMOUNT
uint256 public ICOSALE_BONUSJOINTTOKENS = 0; // ICO CONTRACT TOTAL JOINT BONUS AMOUNT
uint256 public TOTAL_CONTRIBUTOR_COUNT = 0; // ICO SALE TOTAL CONTRIBUTOR COUNT
ICOState public CurrentState; // ICO SALE STATE
IERC20Token public JointToken;
IERC20Token public OPSToken;
PricingStrategy public PriceStrategy;
address public FundAddress = 0x25Bc52CBFeB86f6f12EaddF77560b02c4617DC21;
address public RewardPoolAddress = 0xEb1FAef9068b6B8f46b50245eE877dA5b03D98C9;
address public OvisAddress = 0x096A5166F75B5B923234841F69374de2F47F9478;
address public PresaleAddress = 0x3e5EF0eC822B519eb0a41f94b34e90D16ce967E8;
address public TokenOPSSaleAddress = 0x8686e49E07Bde4F389B0a5728fCe8713DB83602b;
address public StrategyAddress = 0xe2355faB9239d5ddaA071BDE726ceb2Db876B8E2;
address public OPSPoolAddress = 0xEA5C0F39e5E3c742fF6e387394e0337e7366a121;
modifier checkCap() {
}
modifier checkBalance() {
}
modifier checkTime() {
}
modifier checkState() {
}
function CrowdSale() {
}
function() payable public checkState checkTime checkBalance checkCap {
}
/**
* @dev calculates token amounts and sends to contributor
*/
function contribute() private {
}
/**
* @dev book OVIS partner sale tokens
*/
function bookOVISSale(uint256 _rate, uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes OVIS partner sale reserved tokens
*/
function changeOVISReservedToken(uint256 _jointToken) onlyOwner public {
}
/**
* @dev changes Joint Token and OPS Token contract address
*/
function changeTokenAddress(address _jointAddress, address _OPSAddress) onlyOwner public {
}
/**
* @dev changes Pricing Strategy contract address, which calculates token amounts to give
*/
function changeStrategyAddress(address _strategyAddress) onlyOwner public {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferPresaleTokens() private {
}
/**
* @dev transfers presale token amounts to contributors
*/
function transferTokenOPSPlatformTokens() private {
}
/**
* @dev transfers token amounts to other ICO platforms
*/
function transferOVISBookedTokens() private {
}
/**
* @dev transfers remaining unsold token amount to reward pool
*/
function transferRewardPool() private {
}
/**
* @dev transfers remaining OPS token amount to pool
*/
function transferOPSPool() private {
uint256 balance = OPSToken.balanceOf(address(this));
if(balance>0) {
require(<FILL_ME>)
}
OPSPoolTransferred(OPSPoolAddress, balance);
}
/**
* @dev start function to start crowdsale for contribution
*/
function startSale() onlyOwner public {
}
/**
* @dev stop function to stop crowdsale for contribution
*/
function stopSale() onlyOwner public {
}
/**
* @dev continue function to continue crowdsale for contribution
*/
function continueSale() onlyOwner public {
}
/**
* @dev finish function to finish crowdsale for contribution
*/
function finishSale() onlyOwner public {
}
/**
* @dev funds contract's balance to fund address
*/
function getFund(uint256 _amount) onlyOwner public {
}
function getStats() public constant returns(uint256 TotalContrAmount, ICOState State, uint256 TotalContrCount) {
}
function destruct() onlyOwner public {
}
}
| OPSToken.transfer(OPSPoolAddress,balance) | 353,589 | OPSToken.transfer(OPSPoolAddress,balance) |
"mint paused" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "Strings.sol";
import "MerkleProof.sol";
import "ERC721Enum.sol";
// _____ _ _ ___ _ _____ _ _
// / ____| | | | |/ (_) | | / ____| | | |
// | | ___ ___ | | | ' / _ __| |___ | | | |_ _| |__
// | | / _ \ / _ \| | | < | |/ _` / __| | | | | | | | '_ \
// | |___| (_) | (_) | | | . \| | (_| \__ \ | |____| | |_| | |_) |
// \_____\___/ \___/|_| |_|\_\_|\__,_|___/ \_____|_|\__,_|_.__/
// MMMMMMMMMMMMMMMMMMMMMMMMMWNNXXKK0000OOOOOOOO0000KKXXNNWWMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMWN000000OOOOOOOOOkkkOOOOOOOOOOOOOO00KXNWWMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMWXOo;....,:cdxOOOkl,'..',,;coxkOOOOOOOOOOO0KXNWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMNOo;'........ ..':ldc. ...... ..';lxOOOOOOOOOOO00XNWMMMMMMMMMMMMMM
// MMMMMMMMMMMWKd:'..................'. ............;okOOOOOOOOOOO0KXWMMMMMMMMMMMM
// MMMMMMMMMMW0l. ..................... ............ .'lkOOOOOOOOOOOO0XWMMMMMMMMMM
// MMMMMMMMWX0Oko;. ................................... .'clldxkOOOOOOOO0XWMMMMMMMM
// MMMMMMMNKOOOOOOd;. .........................................';lxOOOOOOOKNWMMMMMM
// MMMMMNOdollllllll;. ......................................... ..:dOOOOOO0XWMMMMM
// MMMMKc............ ........................................... .:xOOOOO0KWMMMM
// MMM0:............................................................. .okOOOOOKNMMM
// MMNOc.............................................................. .:kOOOOOKNMM
// MWKOOx:............................................................. :kOOOOOKWM
// WX0OOOOd;. ........... ........................ ................... .ckOOOO0XW
// N0OOOOOOOo,............ ..'lo'.............;oxOc..................... .dOOOOO0N
// X0OOOOOOOOx:. ..... .:, 'lOKO; ...... ..;oOKKX0; .................... .oOOOOO0X
// KOOOOOOOd:'....... 'xx, .o0KKKc..... .;x00kdkKXO, .'................. .lOOOOOOK
// 0OOOOko,......... 'xKKkdc;dKKKd.... .dK0Oo;ckKKKxldOx'................ 'xOOOOOO0
// OOOOd, ....... .oKKKKK0OOKKKO; .;kKKK0kkOOkOKKKKKo................ .lOOOOOOOO
// OOOOo,,:loooll:. ;OKx:,',cxKKKKOocd0KKKKKOl'...,d0X0: .':;......... 'okOOOOOOO
// OOOOOOOOOOOOOOk,.oKd..:o;..dKKKKKXKKKKKK0c .dOc..dKKo',clkx. ........ ...,cdkOOO
// 0OOOOOOOOOOOOOd.'kKo..o0d. lKKKKKKKKKKKK0o..cd:..dKKK00xld:............... .,ok0
// 0OOOOOOOOOOOOOd.'kK0o'....lOKKK0OkkkO0KKK0d:,'':xKKKKKKxl'................ .o0
// KOOOOOOOOOOOOOx'.xKKK0kkkOKXK0l......:kKKKKKK00KKKKKKKO, .......... ..,:clodkK
// X0OOOOOOOOOOOOO:.:0KKKKKKKKKKd. .''.:0KKKKKKKKKKKKKK0; ............ .;xOOOOO0X
// WKOOOOOOOOOOOOOk;.;xKKKKKKKKO; .,:;..xXKKKKKKKKKKKKKKc .... .... ,xOOOOKW
// MN0OOOOOOOOOOOOOkl,';oOKKKKK0o:::::cccd0KKKKKKKKKKKXKKKo. .',;:cllllcc:lkOOO0NM
// MWX0OOOOOOOOOOOOOOkd:'';ldO0KKK0K00000kkkkkxxdddooollc;. ..;xOOOOOOOOOOOOOO0XWM
// MMWX0OOOOOOOOOOOOOOOOx;...,;::;;;,''''..'','''''''''',;;;::'.':okOOOOOOOOOO0XWMM
// MMMWX0OOOOOOOOOOOOOOko,'clllllllc,.. ..';coooooooooooooooooolc:''cxOOOOOOO0XWMMM
// MMMMWN0OOOOOOOOOOOko,':looooooooo;.'...';looooooooooooooooooodkOo'.cxOOOOKNWMMMM
// MMMMMMNK0OOOOOOOOx;.:OOdooooooooo;......;coooooooooooooooooooodOXO:.'oO0KNMMMMMM
// MMMMMMMWXK0OOOOOo'.lK0doooooooooo:......,cooooooooooooooooooooodOX0o''dXWMMMMMMM
// MMMMMMMMMWX0OOOo..oXKxoooooooooooc... ..':ooooooooooooooooooooood0X0xxKMMMMMMMMM
// MMMMMMMMMMMWX0x'.lKXkooooooooooooc... ...;ooodxkxdoooolloooooooooxXWWMMMMMMMMMMM
// MMMMMMMMMMMMMWOcl0NOl,'coooooooool'.. ...,oodONWKxoooo;.:oooooodkKNMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMWNWXkc..coooooooool'.. .. 'lodOXN0xoooo:..codxk0XWMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMWNOllddooooooooo,.. .. .loodkOxdooool,.lOKXWWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMWWNK0Okxddooo;.. ....:ooooooddxkO00KNMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMWWXK0Okxc'......:dddxkO0KXWWMMMMMMMMMMMMMMMMMMMMMMMMMM
contract CoolKidsClub is ERC721Enum {
using Strings for uint256;
uint256 public COOL_KIDS_SUPPLY = 4010;
uint256 public constant PRICE = 0.06 ether;
uint256 public constant PRE_PRICE = 0.05 ether;
uint256 public constant MAX_MINT_PER_TX = 5;
address private constant addressOne = 0xb0039C1f0b355CBE011b97bb75827291Ba6D78Cb
;
address private constant addressTwo = 0x642559efb3C1E94A30ABbCbA431f818FbD507820
;
address private constant addressThree = 0x1D3c99D01329b2D98CC3a7Fa5178aB4A31F7c155
;
bool public pauseMint = true;
bool public pausePreMint = true;
string public baseURI;
bytes32 private root;
string internal baseExtension = ".json";
address public immutable owner;
constructor() ERC721P("CoolKidsClub", "CKC") {
}
modifier mintOpen() {
require(<FILL_ME>)
_;
}
modifier preMintOpen() {
}
modifier onlyOwner() {
}
/** INTERNAL */
function _onlyOwner() private view {
}
function _baseURI() internal view virtual returns (string memory) {
}
/** EXTERNAL */
function mint(uint16 amountPurchase) external payable mintOpen {
}
function preMint(
uint16 amountPurchase,
bytes32[] calldata proof,
uint256 _number
) external payable preMintOpen {
}
function mintUnsold(uint16 amountMint) external onlyOwner {
}
/** READ */
function isEligible(bytes32[] calldata proof, uint256 _number)
public
view
returns (uint16 eligibility)
{
}
/** RENDER */
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/** ADMIN */
function setPauseMint(bool _setPauseMint) external onlyOwner {
}
function setPausePreMint(bool _setPausePreMint) external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setRoot(
bytes32 _root
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
}
| !pauseMint,"mint paused" | 353,607 | !pauseMint |
"premint paused" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "Strings.sol";
import "MerkleProof.sol";
import "ERC721Enum.sol";
// _____ _ _ ___ _ _____ _ _
// / ____| | | | |/ (_) | | / ____| | | |
// | | ___ ___ | | | ' / _ __| |___ | | | |_ _| |__
// | | / _ \ / _ \| | | < | |/ _` / __| | | | | | | | '_ \
// | |___| (_) | (_) | | | . \| | (_| \__ \ | |____| | |_| | |_) |
// \_____\___/ \___/|_| |_|\_\_|\__,_|___/ \_____|_|\__,_|_.__/
// MMMMMMMMMMMMMMMMMMMMMMMMMWNNXXKK0000OOOOOOOO0000KKXXNNWWMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMWN000000OOOOOOOOOkkkOOOOOOOOOOOOOO00KXNWWMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMWXOo;....,:cdxOOOkl,'..',,;coxkOOOOOOOOOOO0KXNWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMNOo;'........ ..':ldc. ...... ..';lxOOOOOOOOOOO00XNWMMMMMMMMMMMMMM
// MMMMMMMMMMMWKd:'..................'. ............;okOOOOOOOOOOO0KXWMMMMMMMMMMMM
// MMMMMMMMMMW0l. ..................... ............ .'lkOOOOOOOOOOOO0XWMMMMMMMMMM
// MMMMMMMMWX0Oko;. ................................... .'clldxkOOOOOOOO0XWMMMMMMMM
// MMMMMMMNKOOOOOOd;. .........................................';lxOOOOOOOKNWMMMMMM
// MMMMMNOdollllllll;. ......................................... ..:dOOOOOO0XWMMMMM
// MMMMKc............ ........................................... .:xOOOOO0KWMMMM
// MMM0:............................................................. .okOOOOOKNMMM
// MMNOc.............................................................. .:kOOOOOKNMM
// MWKOOx:............................................................. :kOOOOOKWM
// WX0OOOOd;. ........... ........................ ................... .ckOOOO0XW
// N0OOOOOOOo,............ ..'lo'.............;oxOc..................... .dOOOOO0N
// X0OOOOOOOOx:. ..... .:, 'lOKO; ...... ..;oOKKX0; .................... .oOOOOO0X
// KOOOOOOOd:'....... 'xx, .o0KKKc..... .;x00kdkKXO, .'................. .lOOOOOOK
// 0OOOOko,......... 'xKKkdc;dKKKd.... .dK0Oo;ckKKKxldOx'................ 'xOOOOOO0
// OOOOd, ....... .oKKKKK0OOKKKO; .;kKKK0kkOOkOKKKKKo................ .lOOOOOOOO
// OOOOo,,:loooll:. ;OKx:,',cxKKKKOocd0KKKKKOl'...,d0X0: .':;......... 'okOOOOOOO
// OOOOOOOOOOOOOOk,.oKd..:o;..dKKKKKXKKKKKK0c .dOc..dKKo',clkx. ........ ...,cdkOOO
// 0OOOOOOOOOOOOOd.'kKo..o0d. lKKKKKKKKKKKK0o..cd:..dKKK00xld:............... .,ok0
// 0OOOOOOOOOOOOOd.'kK0o'....lOKKK0OkkkO0KKK0d:,'':xKKKKKKxl'................ .o0
// KOOOOOOOOOOOOOx'.xKKK0kkkOKXK0l......:kKKKKKK00KKKKKKKO, .......... ..,:clodkK
// X0OOOOOOOOOOOOO:.:0KKKKKKKKKKd. .''.:0KKKKKKKKKKKKKK0; ............ .;xOOOOO0X
// WKOOOOOOOOOOOOOk;.;xKKKKKKKKO; .,:;..xXKKKKKKKKKKKKKKc .... .... ,xOOOOKW
// MN0OOOOOOOOOOOOOkl,';oOKKKKK0o:::::cccd0KKKKKKKKKKKXKKKo. .',;:cllllcc:lkOOO0NM
// MWX0OOOOOOOOOOOOOOkd:'';ldO0KKK0K00000kkkkkxxdddooollc;. ..;xOOOOOOOOOOOOOO0XWM
// MMWX0OOOOOOOOOOOOOOOOx;...,;::;;;,''''..'','''''''''',;;;::'.':okOOOOOOOOOO0XWMM
// MMMWX0OOOOOOOOOOOOOOko,'clllllllc,.. ..';coooooooooooooooooolc:''cxOOOOOOO0XWMMM
// MMMMWN0OOOOOOOOOOOko,':looooooooo;.'...';looooooooooooooooooodkOo'.cxOOOOKNWMMMM
// MMMMMMNK0OOOOOOOOx;.:OOdooooooooo;......;coooooooooooooooooooodOXO:.'oO0KNMMMMMM
// MMMMMMMWXK0OOOOOo'.lK0doooooooooo:......,cooooooooooooooooooooodOX0o''dXWMMMMMMM
// MMMMMMMMMWX0OOOo..oXKxoooooooooooc... ..':ooooooooooooooooooooood0X0xxKMMMMMMMMM
// MMMMMMMMMMMWX0x'.lKXkooooooooooooc... ...;ooodxkxdoooolloooooooooxXWWMMMMMMMMMMM
// MMMMMMMMMMMMMWOcl0NOl,'coooooooool'.. ...,oodONWKxoooo;.:oooooodkKNMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMWNWXkc..coooooooool'.. .. 'lodOXN0xoooo:..codxk0XWMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMWNOllddooooooooo,.. .. .loodkOxdooool,.lOKXWWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMWWNK0Okxddooo;.. ....:ooooooddxkO00KNMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMWWXK0Okxc'......:dddxkO0KXWWMMMMMMMMMMMMMMMMMMMMMMMMMM
contract CoolKidsClub is ERC721Enum {
using Strings for uint256;
uint256 public COOL_KIDS_SUPPLY = 4010;
uint256 public constant PRICE = 0.06 ether;
uint256 public constant PRE_PRICE = 0.05 ether;
uint256 public constant MAX_MINT_PER_TX = 5;
address private constant addressOne = 0xb0039C1f0b355CBE011b97bb75827291Ba6D78Cb
;
address private constant addressTwo = 0x642559efb3C1E94A30ABbCbA431f818FbD507820
;
address private constant addressThree = 0x1D3c99D01329b2D98CC3a7Fa5178aB4A31F7c155
;
bool public pauseMint = true;
bool public pausePreMint = true;
string public baseURI;
bytes32 private root;
string internal baseExtension = ".json";
address public immutable owner;
constructor() ERC721P("CoolKidsClub", "CKC") {
}
modifier mintOpen() {
}
modifier preMintOpen() {
require(<FILL_ME>)
_;
}
modifier onlyOwner() {
}
/** INTERNAL */
function _onlyOwner() private view {
}
function _baseURI() internal view virtual returns (string memory) {
}
/** EXTERNAL */
function mint(uint16 amountPurchase) external payable mintOpen {
}
function preMint(
uint16 amountPurchase,
bytes32[] calldata proof,
uint256 _number
) external payable preMintOpen {
}
function mintUnsold(uint16 amountMint) external onlyOwner {
}
/** READ */
function isEligible(bytes32[] calldata proof, uint256 _number)
public
view
returns (uint16 eligibility)
{
}
/** RENDER */
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/** ADMIN */
function setPauseMint(bool _setPauseMint) external onlyOwner {
}
function setPausePreMint(bool _setPausePreMint) external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setRoot(
bytes32 _root
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
}
| !pausePreMint,"premint paused" | 353,607 | !pausePreMint |
"soldout" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "Strings.sol";
import "MerkleProof.sol";
import "ERC721Enum.sol";
// _____ _ _ ___ _ _____ _ _
// / ____| | | | |/ (_) | | / ____| | | |
// | | ___ ___ | | | ' / _ __| |___ | | | |_ _| |__
// | | / _ \ / _ \| | | < | |/ _` / __| | | | | | | | '_ \
// | |___| (_) | (_) | | | . \| | (_| \__ \ | |____| | |_| | |_) |
// \_____\___/ \___/|_| |_|\_\_|\__,_|___/ \_____|_|\__,_|_.__/
// MMMMMMMMMMMMMMMMMMMMMMMMMWNNXXKK0000OOOOOOOO0000KKXXNNWWMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMWN000000OOOOOOOOOkkkOOOOOOOOOOOOOO00KXNWWMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMWXOo;....,:cdxOOOkl,'..',,;coxkOOOOOOOOOOO0KXNWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMNOo;'........ ..':ldc. ...... ..';lxOOOOOOOOOOO00XNWMMMMMMMMMMMMMM
// MMMMMMMMMMMWKd:'..................'. ............;okOOOOOOOOOOO0KXWMMMMMMMMMMMM
// MMMMMMMMMMW0l. ..................... ............ .'lkOOOOOOOOOOOO0XWMMMMMMMMMM
// MMMMMMMMWX0Oko;. ................................... .'clldxkOOOOOOOO0XWMMMMMMMM
// MMMMMMMNKOOOOOOd;. .........................................';lxOOOOOOOKNWMMMMMM
// MMMMMNOdollllllll;. ......................................... ..:dOOOOOO0XWMMMMM
// MMMMKc............ ........................................... .:xOOOOO0KWMMMM
// MMM0:............................................................. .okOOOOOKNMMM
// MMNOc.............................................................. .:kOOOOOKNMM
// MWKOOx:............................................................. :kOOOOOKWM
// WX0OOOOd;. ........... ........................ ................... .ckOOOO0XW
// N0OOOOOOOo,............ ..'lo'.............;oxOc..................... .dOOOOO0N
// X0OOOOOOOOx:. ..... .:, 'lOKO; ...... ..;oOKKX0; .................... .oOOOOO0X
// KOOOOOOOd:'....... 'xx, .o0KKKc..... .;x00kdkKXO, .'................. .lOOOOOOK
// 0OOOOko,......... 'xKKkdc;dKKKd.... .dK0Oo;ckKKKxldOx'................ 'xOOOOOO0
// OOOOd, ....... .oKKKKK0OOKKKO; .;kKKK0kkOOkOKKKKKo................ .lOOOOOOOO
// OOOOo,,:loooll:. ;OKx:,',cxKKKKOocd0KKKKKOl'...,d0X0: .':;......... 'okOOOOOOO
// OOOOOOOOOOOOOOk,.oKd..:o;..dKKKKKXKKKKKK0c .dOc..dKKo',clkx. ........ ...,cdkOOO
// 0OOOOOOOOOOOOOd.'kKo..o0d. lKKKKKKKKKKKK0o..cd:..dKKK00xld:............... .,ok0
// 0OOOOOOOOOOOOOd.'kK0o'....lOKKK0OkkkO0KKK0d:,'':xKKKKKKxl'................ .o0
// KOOOOOOOOOOOOOx'.xKKK0kkkOKXK0l......:kKKKKKK00KKKKKKKO, .......... ..,:clodkK
// X0OOOOOOOOOOOOO:.:0KKKKKKKKKKd. .''.:0KKKKKKKKKKKKKK0; ............ .;xOOOOO0X
// WKOOOOOOOOOOOOOk;.;xKKKKKKKKO; .,:;..xXKKKKKKKKKKKKKKc .... .... ,xOOOOKW
// MN0OOOOOOOOOOOOOkl,';oOKKKKK0o:::::cccd0KKKKKKKKKKKXKKKo. .',;:cllllcc:lkOOO0NM
// MWX0OOOOOOOOOOOOOOkd:'';ldO0KKK0K00000kkkkkxxdddooollc;. ..;xOOOOOOOOOOOOOO0XWM
// MMWX0OOOOOOOOOOOOOOOOx;...,;::;;;,''''..'','''''''''',;;;::'.':okOOOOOOOOOO0XWMM
// MMMWX0OOOOOOOOOOOOOOko,'clllllllc,.. ..';coooooooooooooooooolc:''cxOOOOOOO0XWMMM
// MMMMWN0OOOOOOOOOOOko,':looooooooo;.'...';looooooooooooooooooodkOo'.cxOOOOKNWMMMM
// MMMMMMNK0OOOOOOOOx;.:OOdooooooooo;......;coooooooooooooooooooodOXO:.'oO0KNMMMMMM
// MMMMMMMWXK0OOOOOo'.lK0doooooooooo:......,cooooooooooooooooooooodOX0o''dXWMMMMMMM
// MMMMMMMMMWX0OOOo..oXKxoooooooooooc... ..':ooooooooooooooooooooood0X0xxKMMMMMMMMM
// MMMMMMMMMMMWX0x'.lKXkooooooooooooc... ...;ooodxkxdoooolloooooooooxXWWMMMMMMMMMMM
// MMMMMMMMMMMMMWOcl0NOl,'coooooooool'.. ...,oodONWKxoooo;.:oooooodkKNMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMWNWXkc..coooooooool'.. .. 'lodOXN0xoooo:..codxk0XWMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMWNOllddooooooooo,.. .. .loodkOxdooool,.lOKXWWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMWWNK0Okxddooo;.. ....:ooooooddxkO00KNMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMWWXK0Okxc'......:dddxkO0KXWWMMMMMMMMMMMMMMMMMMMMMMMMMM
contract CoolKidsClub is ERC721Enum {
using Strings for uint256;
uint256 public COOL_KIDS_SUPPLY = 4010;
uint256 public constant PRICE = 0.06 ether;
uint256 public constant PRE_PRICE = 0.05 ether;
uint256 public constant MAX_MINT_PER_TX = 5;
address private constant addressOne = 0xb0039C1f0b355CBE011b97bb75827291Ba6D78Cb
;
address private constant addressTwo = 0x642559efb3C1E94A30ABbCbA431f818FbD507820
;
address private constant addressThree = 0x1D3c99D01329b2D98CC3a7Fa5178aB4A31F7c155
;
bool public pauseMint = true;
bool public pausePreMint = true;
string public baseURI;
bytes32 private root;
string internal baseExtension = ".json";
address public immutable owner;
constructor() ERC721P("CoolKidsClub", "CKC") {
}
modifier mintOpen() {
}
modifier preMintOpen() {
}
modifier onlyOwner() {
}
/** INTERNAL */
function _onlyOwner() private view {
}
function _baseURI() internal view virtual returns (string memory) {
}
/** EXTERNAL */
function mint(uint16 amountPurchase) external payable mintOpen {
uint256 currentSupply = totalSupply();
require(
amountPurchase <= MAX_MINT_PER_TX,
"Max5perTX"
);
require(<FILL_ME>)
require(msg.value >= PRICE * amountPurchase, "not enougth eth");
for (uint8 i; i < amountPurchase; i++) {
_safeMint(msg.sender, currentSupply + i);
}
}
function preMint(
uint16 amountPurchase,
bytes32[] calldata proof,
uint256 _number
) external payable preMintOpen {
}
function mintUnsold(uint16 amountMint) external onlyOwner {
}
/** READ */
function isEligible(bytes32[] calldata proof, uint256 _number)
public
view
returns (uint16 eligibility)
{
}
/** RENDER */
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/** ADMIN */
function setPauseMint(bool _setPauseMint) external onlyOwner {
}
function setPausePreMint(bool _setPausePreMint) external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setRoot(
bytes32 _root
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
}
| currentSupply+amountPurchase<=COOL_KIDS_SUPPLY,"soldout" | 353,607 | currentSupply+amountPurchase<=COOL_KIDS_SUPPLY |
"Max4Presale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "Strings.sol";
import "MerkleProof.sol";
import "ERC721Enum.sol";
// _____ _ _ ___ _ _____ _ _
// / ____| | | | |/ (_) | | / ____| | | |
// | | ___ ___ | | | ' / _ __| |___ | | | |_ _| |__
// | | / _ \ / _ \| | | < | |/ _` / __| | | | | | | | '_ \
// | |___| (_) | (_) | | | . \| | (_| \__ \ | |____| | |_| | |_) |
// \_____\___/ \___/|_| |_|\_\_|\__,_|___/ \_____|_|\__,_|_.__/
// MMMMMMMMMMMMMMMMMMMMMMMMMWNNXXKK0000OOOOOOOO0000KKXXNNWWMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMWN000000OOOOOOOOOkkkOOOOOOOOOOOOOO00KXNWWMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMWXOo;....,:cdxOOOkl,'..',,;coxkOOOOOOOOOOO0KXNWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMNOo;'........ ..':ldc. ...... ..';lxOOOOOOOOOOO00XNWMMMMMMMMMMMMMM
// MMMMMMMMMMMWKd:'..................'. ............;okOOOOOOOOOOO0KXWMMMMMMMMMMMM
// MMMMMMMMMMW0l. ..................... ............ .'lkOOOOOOOOOOOO0XWMMMMMMMMMM
// MMMMMMMMWX0Oko;. ................................... .'clldxkOOOOOOOO0XWMMMMMMMM
// MMMMMMMNKOOOOOOd;. .........................................';lxOOOOOOOKNWMMMMMM
// MMMMMNOdollllllll;. ......................................... ..:dOOOOOO0XWMMMMM
// MMMMKc............ ........................................... .:xOOOOO0KWMMMM
// MMM0:............................................................. .okOOOOOKNMMM
// MMNOc.............................................................. .:kOOOOOKNMM
// MWKOOx:............................................................. :kOOOOOKWM
// WX0OOOOd;. ........... ........................ ................... .ckOOOO0XW
// N0OOOOOOOo,............ ..'lo'.............;oxOc..................... .dOOOOO0N
// X0OOOOOOOOx:. ..... .:, 'lOKO; ...... ..;oOKKX0; .................... .oOOOOO0X
// KOOOOOOOd:'....... 'xx, .o0KKKc..... .;x00kdkKXO, .'................. .lOOOOOOK
// 0OOOOko,......... 'xKKkdc;dKKKd.... .dK0Oo;ckKKKxldOx'................ 'xOOOOOO0
// OOOOd, ....... .oKKKKK0OOKKKO; .;kKKK0kkOOkOKKKKKo................ .lOOOOOOOO
// OOOOo,,:loooll:. ;OKx:,',cxKKKKOocd0KKKKKOl'...,d0X0: .':;......... 'okOOOOOOO
// OOOOOOOOOOOOOOk,.oKd..:o;..dKKKKKXKKKKKK0c .dOc..dKKo',clkx. ........ ...,cdkOOO
// 0OOOOOOOOOOOOOd.'kKo..o0d. lKKKKKKKKKKKK0o..cd:..dKKK00xld:............... .,ok0
// 0OOOOOOOOOOOOOd.'kK0o'....lOKKK0OkkkO0KKK0d:,'':xKKKKKKxl'................ .o0
// KOOOOOOOOOOOOOx'.xKKK0kkkOKXK0l......:kKKKKKK00KKKKKKKO, .......... ..,:clodkK
// X0OOOOOOOOOOOOO:.:0KKKKKKKKKKd. .''.:0KKKKKKKKKKKKKK0; ............ .;xOOOOO0X
// WKOOOOOOOOOOOOOk;.;xKKKKKKKKO; .,:;..xXKKKKKKKKKKKKKKc .... .... ,xOOOOKW
// MN0OOOOOOOOOOOOOkl,';oOKKKKK0o:::::cccd0KKKKKKKKKKKXKKKo. .',;:cllllcc:lkOOO0NM
// MWX0OOOOOOOOOOOOOOkd:'';ldO0KKK0K00000kkkkkxxdddooollc;. ..;xOOOOOOOOOOOOOO0XWM
// MMWX0OOOOOOOOOOOOOOOOx;...,;::;;;,''''..'','''''''''',;;;::'.':okOOOOOOOOOO0XWMM
// MMMWX0OOOOOOOOOOOOOOko,'clllllllc,.. ..';coooooooooooooooooolc:''cxOOOOOOO0XWMMM
// MMMMWN0OOOOOOOOOOOko,':looooooooo;.'...';looooooooooooooooooodkOo'.cxOOOOKNWMMMM
// MMMMMMNK0OOOOOOOOx;.:OOdooooooooo;......;coooooooooooooooooooodOXO:.'oO0KNMMMMMM
// MMMMMMMWXK0OOOOOo'.lK0doooooooooo:......,cooooooooooooooooooooodOX0o''dXWMMMMMMM
// MMMMMMMMMWX0OOOo..oXKxoooooooooooc... ..':ooooooooooooooooooooood0X0xxKMMMMMMMMM
// MMMMMMMMMMMWX0x'.lKXkooooooooooooc... ...;ooodxkxdoooolloooooooooxXWWMMMMMMMMMMM
// MMMMMMMMMMMMMWOcl0NOl,'coooooooool'.. ...,oodONWKxoooo;.:oooooodkKNMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMWNWXkc..coooooooool'.. .. 'lodOXN0xoooo:..codxk0XWMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMWNOllddooooooooo,.. .. .loodkOxdooool,.lOKXWWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMWWNK0Okxddooo;.. ....:ooooooddxkO00KNMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMWWXK0Okxc'......:dddxkO0KXWWMMMMMMMMMMMMMMMMMMMMMMMMMM
contract CoolKidsClub is ERC721Enum {
using Strings for uint256;
uint256 public COOL_KIDS_SUPPLY = 4010;
uint256 public constant PRICE = 0.06 ether;
uint256 public constant PRE_PRICE = 0.05 ether;
uint256 public constant MAX_MINT_PER_TX = 5;
address private constant addressOne = 0xb0039C1f0b355CBE011b97bb75827291Ba6D78Cb
;
address private constant addressTwo = 0x642559efb3C1E94A30ABbCbA431f818FbD507820
;
address private constant addressThree = 0x1D3c99D01329b2D98CC3a7Fa5178aB4A31F7c155
;
bool public pauseMint = true;
bool public pausePreMint = true;
string public baseURI;
bytes32 private root;
string internal baseExtension = ".json";
address public immutable owner;
constructor() ERC721P("CoolKidsClub", "CKC") {
}
modifier mintOpen() {
}
modifier preMintOpen() {
}
modifier onlyOwner() {
}
/** INTERNAL */
function _onlyOwner() private view {
}
function _baseURI() internal view virtual returns (string memory) {
}
/** EXTERNAL */
function mint(uint16 amountPurchase) external payable mintOpen {
}
function preMint(
uint16 amountPurchase,
bytes32[] calldata proof,
uint256 _number
) external payable preMintOpen {
uint16 eligibilitySender = isEligible(proof, _number);
uint256 currentSupply = totalSupply();
uint256 buyerTokenCount = balanceOf(_msgSender());
if (eligibilitySender == 0) revert("notWL");
require(<FILL_ME>)
require(
currentSupply + amountPurchase <= COOL_KIDS_SUPPLY,
"soldout"
);
require(msg.value >= PRE_PRICE * amountPurchase, "not enougth eth");
for (uint8 i; i < amountPurchase; i++) {
_safeMint(msg.sender, currentSupply + i);
}
}
function mintUnsold(uint16 amountMint) external onlyOwner {
}
/** READ */
function isEligible(bytes32[] calldata proof, uint256 _number)
public
view
returns (uint16 eligibility)
{
}
/** RENDER */
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/** ADMIN */
function setPauseMint(bool _setPauseMint) external onlyOwner {
}
function setPausePreMint(bool _setPausePreMint) external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setRoot(
bytes32 _root
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
}
| buyerTokenCount+amountPurchase<=4,"Max4Presale" | 353,607 | buyerTokenCount+amountPurchase<=4 |
"soldout" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "Strings.sol";
import "MerkleProof.sol";
import "ERC721Enum.sol";
// _____ _ _ ___ _ _____ _ _
// / ____| | | | |/ (_) | | / ____| | | |
// | | ___ ___ | | | ' / _ __| |___ | | | |_ _| |__
// | | / _ \ / _ \| | | < | |/ _` / __| | | | | | | | '_ \
// | |___| (_) | (_) | | | . \| | (_| \__ \ | |____| | |_| | |_) |
// \_____\___/ \___/|_| |_|\_\_|\__,_|___/ \_____|_|\__,_|_.__/
// MMMMMMMMMMMMMMMMMMMMMMMMMWNNXXKK0000OOOOOOOO0000KKXXNNWWMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMWN000000OOOOOOOOOkkkOOOOOOOOOOOOOO00KXNWWMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMWXOo;....,:cdxOOOkl,'..',,;coxkOOOOOOOOOOO0KXNWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMNOo;'........ ..':ldc. ...... ..';lxOOOOOOOOOOO00XNWMMMMMMMMMMMMMM
// MMMMMMMMMMMWKd:'..................'. ............;okOOOOOOOOOOO0KXWMMMMMMMMMMMM
// MMMMMMMMMMW0l. ..................... ............ .'lkOOOOOOOOOOOO0XWMMMMMMMMMM
// MMMMMMMMWX0Oko;. ................................... .'clldxkOOOOOOOO0XWMMMMMMMM
// MMMMMMMNKOOOOOOd;. .........................................';lxOOOOOOOKNWMMMMMM
// MMMMMNOdollllllll;. ......................................... ..:dOOOOOO0XWMMMMM
// MMMMKc............ ........................................... .:xOOOOO0KWMMMM
// MMM0:............................................................. .okOOOOOKNMMM
// MMNOc.............................................................. .:kOOOOOKNMM
// MWKOOx:............................................................. :kOOOOOKWM
// WX0OOOOd;. ........... ........................ ................... .ckOOOO0XW
// N0OOOOOOOo,............ ..'lo'.............;oxOc..................... .dOOOOO0N
// X0OOOOOOOOx:. ..... .:, 'lOKO; ...... ..;oOKKX0; .................... .oOOOOO0X
// KOOOOOOOd:'....... 'xx, .o0KKKc..... .;x00kdkKXO, .'................. .lOOOOOOK
// 0OOOOko,......... 'xKKkdc;dKKKd.... .dK0Oo;ckKKKxldOx'................ 'xOOOOOO0
// OOOOd, ....... .oKKKKK0OOKKKO; .;kKKK0kkOOkOKKKKKo................ .lOOOOOOOO
// OOOOo,,:loooll:. ;OKx:,',cxKKKKOocd0KKKKKOl'...,d0X0: .':;......... 'okOOOOOOO
// OOOOOOOOOOOOOOk,.oKd..:o;..dKKKKKXKKKKKK0c .dOc..dKKo',clkx. ........ ...,cdkOOO
// 0OOOOOOOOOOOOOd.'kKo..o0d. lKKKKKKKKKKKK0o..cd:..dKKK00xld:............... .,ok0
// 0OOOOOOOOOOOOOd.'kK0o'....lOKKK0OkkkO0KKK0d:,'':xKKKKKKxl'................ .o0
// KOOOOOOOOOOOOOx'.xKKK0kkkOKXK0l......:kKKKKKK00KKKKKKKO, .......... ..,:clodkK
// X0OOOOOOOOOOOOO:.:0KKKKKKKKKKd. .''.:0KKKKKKKKKKKKKK0; ............ .;xOOOOO0X
// WKOOOOOOOOOOOOOk;.;xKKKKKKKKO; .,:;..xXKKKKKKKKKKKKKKc .... .... ,xOOOOKW
// MN0OOOOOOOOOOOOOkl,';oOKKKKK0o:::::cccd0KKKKKKKKKKKXKKKo. .',;:cllllcc:lkOOO0NM
// MWX0OOOOOOOOOOOOOOkd:'';ldO0KKK0K00000kkkkkxxdddooollc;. ..;xOOOOOOOOOOOOOO0XWM
// MMWX0OOOOOOOOOOOOOOOOx;...,;::;;;,''''..'','''''''''',;;;::'.':okOOOOOOOOOO0XWMM
// MMMWX0OOOOOOOOOOOOOOko,'clllllllc,.. ..';coooooooooooooooooolc:''cxOOOOOOO0XWMMM
// MMMMWN0OOOOOOOOOOOko,':looooooooo;.'...';looooooooooooooooooodkOo'.cxOOOOKNWMMMM
// MMMMMMNK0OOOOOOOOx;.:OOdooooooooo;......;coooooooooooooooooooodOXO:.'oO0KNMMMMMM
// MMMMMMMWXK0OOOOOo'.lK0doooooooooo:......,cooooooooooooooooooooodOX0o''dXWMMMMMMM
// MMMMMMMMMWX0OOOo..oXKxoooooooooooc... ..':ooooooooooooooooooooood0X0xxKMMMMMMMMM
// MMMMMMMMMMMWX0x'.lKXkooooooooooooc... ...;ooodxkxdoooolloooooooooxXWWMMMMMMMMMMM
// MMMMMMMMMMMMMWOcl0NOl,'coooooooool'.. ...,oodONWKxoooo;.:oooooodkKNMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMWNWXkc..coooooooool'.. .. 'lodOXN0xoooo:..codxk0XWMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMWNOllddooooooooo,.. .. .loodkOxdooool,.lOKXWWMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMWWNK0Okxddooo;.. ....:ooooooddxkO00KNMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMWWXK0Okxc'......:dddxkO0KXWWMMMMMMMMMMMMMMMMMMMMMMMMMM
contract CoolKidsClub is ERC721Enum {
using Strings for uint256;
uint256 public COOL_KIDS_SUPPLY = 4010;
uint256 public constant PRICE = 0.06 ether;
uint256 public constant PRE_PRICE = 0.05 ether;
uint256 public constant MAX_MINT_PER_TX = 5;
address private constant addressOne = 0xb0039C1f0b355CBE011b97bb75827291Ba6D78Cb
;
address private constant addressTwo = 0x642559efb3C1E94A30ABbCbA431f818FbD507820
;
address private constant addressThree = 0x1D3c99D01329b2D98CC3a7Fa5178aB4A31F7c155
;
bool public pauseMint = true;
bool public pausePreMint = true;
string public baseURI;
bytes32 private root;
string internal baseExtension = ".json";
address public immutable owner;
constructor() ERC721P("CoolKidsClub", "CKC") {
}
modifier mintOpen() {
}
modifier preMintOpen() {
}
modifier onlyOwner() {
}
/** INTERNAL */
function _onlyOwner() private view {
}
function _baseURI() internal view virtual returns (string memory) {
}
/** EXTERNAL */
function mint(uint16 amountPurchase) external payable mintOpen {
}
function preMint(
uint16 amountPurchase,
bytes32[] calldata proof,
uint256 _number
) external payable preMintOpen {
}
function mintUnsold(uint16 amountMint) external onlyOwner {
uint256 currentSupply = totalSupply();
require(<FILL_ME>)
for (uint8 i; i < amountMint; i++) {
_safeMint(msg.sender, currentSupply + i);
}
}
/** READ */
function isEligible(bytes32[] calldata proof, uint256 _number)
public
view
returns (uint16 eligibility)
{
}
/** RENDER */
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/** ADMIN */
function setPauseMint(bool _setPauseMint) external onlyOwner {
}
function setPausePreMint(bool _setPausePreMint) external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setRoot(
bytes32 _root
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
}
| currentSupply+amountMint<=COOL_KIDS_SUPPLY,"soldout" | 353,607 | currentSupply+amountMint<=COOL_KIDS_SUPPLY |
'Already registered.' | pragma solidity 0.5.2;
/***************
** **
** INTERFACES **
** **
***************/
/**
* @title Interface for Kong ERC20 Token Contract.
*/
interface KongERC20Interface {
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function mint(uint256 mintedAmount, address recipient) external;
function getMintingLimit() external returns(uint256);
}
/**
* @title Interface for EllipticCurve contract.
*/
interface EllipticCurveInterface {
function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool);
}
/****************************
** **
** OPEN ZEPPELIN CONTRACTS **
** **
****************************/
/**
* @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) {
}
}
/**********************************
** **
** REGISTER DIRECT MINT CONTRACT **
** **
**********************************/
/**
* @title Register Contract.
*/
contract RegisterDirectMint {
using SafeMath for uint256;
// Account with the right to adjust the set of minters.
address public _owner;
// Address of the Kong ERC20 account.
address public _kongERC20Address;
// Sum of Kong amounts marked as mintable for registered devices.
uint256 public _totalMintable;
// Minters.
mapping (address => bool) public _minters;
// Minting caps.
mapping (address => uint256) public _mintingCaps;
//
struct Device {
bytes32 tertiaryPublicKeyHash;
bytes32 hardwareHash;
uint256 kongAmount;
uint256 mintableTime;
bool mintable;
}
// Registered devices.
mapping(bytes32 => Device) internal _devices;
/**
* @dev Emit when device is registered.
*/
event Registration(
bytes32 primaryPublicKeyHash,
bytes32 tertiaryPublicKeyHash,
bytes32 hardwareHash,
uint256 kongAmount,
uint256 mintableTime,
bool mintable
);
/**
* @dev Emit when minting rights are delegated / removed.
*/
event MinterAddition (
address minter,
uint256 mintingCap
);
event MinterRemoval (
address minter
);
/**
* @dev Constructor.
*/
constructor(address owner, address kongAddress) public {
}
/**
* @dev Throws if called by any account but owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account but owner or registered minter.
*/
modifier onlyOwnerOrMinter() {
}
/**
* @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`.
*/
function delegateMintingRights(
address newMinter,
uint256 mintingCap
)
public
onlyOwner
{
}
/**
* @dev Remove address from the mapping of _minters.
*/
function removeMintingRights(
address minter
)
public
onlyOwner
{
}
/**
* @dev Register a new device.
*/
function registerDevice(
bytes32 primaryPublicKeyHash,
bytes32 tertiaryPublicKeyHash,
bytes32 hardwareHash,
uint256 kongAmount,
uint256 mintableTime,
bool mintable
)
public
onlyOwnerOrMinter
{
// Verify that this device has not been registered yet.
require(<FILL_ME>)
// Verify the cumulative limit for mintable Kong has not been exceeded.
if (mintable) {
uint256 _maxMinted = KongERC20Interface(_kongERC20Address).getMintingLimit();
require(_totalMintable.add(kongAmount) <= _maxMinted, 'Exceeds cumulative limit.');
// Increment _totalMintable.
_totalMintable += kongAmount;
// Adjust minting cap. Throws on underflow / Guarantees minter does not exceed its limit.
_mintingCaps[msg.sender] = _mintingCaps[msg.sender].sub(kongAmount);
}
// Create device struct.
_devices[primaryPublicKeyHash] = Device(
tertiaryPublicKeyHash,
hardwareHash,
kongAmount,
mintableTime,
mintable
);
// Emit event.
emit Registration(
primaryPublicKeyHash,
tertiaryPublicKeyHash,
hardwareHash,
kongAmount,
mintableTime,
mintable
);
}
/**
* @dev Mint registered `kongAmount` for `_devices[primaryPublicKeyHash]` to `recipient`.
*/
function mintKong(
bytes32 primaryPublicKeyHash,
address recipient
)
external
onlyOwnerOrMinter
{
}
/**
* @dev Return the stored details for a registered device.
*/
function getRegistrationDetails(
bytes32 primaryPublicKeyHash
)
external
view
returns (bytes32, bytes32, uint256, uint256, bool)
{
}
/**
* @dev Return the hashed minting key for a registered device.
*/
function getTertiaryKeyHash(
bytes32 primaryPublicKeyHash
)
external
view
returns (bytes32)
{
}
/**
* @dev Return Kong amount for a registered device.
*/
function getKongAmount(
bytes32 primaryPublicKeyHash
)
external
view
returns (uint)
{
}
}
| _devices[primaryPublicKeyHash].tertiaryPublicKeyHash=="",'Already registered.' | 353,609 | _devices[primaryPublicKeyHash].tertiaryPublicKeyHash=="" |
'Exceeds cumulative limit.' | pragma solidity 0.5.2;
/***************
** **
** INTERFACES **
** **
***************/
/**
* @title Interface for Kong ERC20 Token Contract.
*/
interface KongERC20Interface {
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function mint(uint256 mintedAmount, address recipient) external;
function getMintingLimit() external returns(uint256);
}
/**
* @title Interface for EllipticCurve contract.
*/
interface EllipticCurveInterface {
function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool);
}
/****************************
** **
** OPEN ZEPPELIN CONTRACTS **
** **
****************************/
/**
* @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) {
}
}
/**********************************
** **
** REGISTER DIRECT MINT CONTRACT **
** **
**********************************/
/**
* @title Register Contract.
*/
contract RegisterDirectMint {
using SafeMath for uint256;
// Account with the right to adjust the set of minters.
address public _owner;
// Address of the Kong ERC20 account.
address public _kongERC20Address;
// Sum of Kong amounts marked as mintable for registered devices.
uint256 public _totalMintable;
// Minters.
mapping (address => bool) public _minters;
// Minting caps.
mapping (address => uint256) public _mintingCaps;
//
struct Device {
bytes32 tertiaryPublicKeyHash;
bytes32 hardwareHash;
uint256 kongAmount;
uint256 mintableTime;
bool mintable;
}
// Registered devices.
mapping(bytes32 => Device) internal _devices;
/**
* @dev Emit when device is registered.
*/
event Registration(
bytes32 primaryPublicKeyHash,
bytes32 tertiaryPublicKeyHash,
bytes32 hardwareHash,
uint256 kongAmount,
uint256 mintableTime,
bool mintable
);
/**
* @dev Emit when minting rights are delegated / removed.
*/
event MinterAddition (
address minter,
uint256 mintingCap
);
event MinterRemoval (
address minter
);
/**
* @dev Constructor.
*/
constructor(address owner, address kongAddress) public {
}
/**
* @dev Throws if called by any account but owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account but owner or registered minter.
*/
modifier onlyOwnerOrMinter() {
}
/**
* @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`.
*/
function delegateMintingRights(
address newMinter,
uint256 mintingCap
)
public
onlyOwner
{
}
/**
* @dev Remove address from the mapping of _minters.
*/
function removeMintingRights(
address minter
)
public
onlyOwner
{
}
/**
* @dev Register a new device.
*/
function registerDevice(
bytes32 primaryPublicKeyHash,
bytes32 tertiaryPublicKeyHash,
bytes32 hardwareHash,
uint256 kongAmount,
uint256 mintableTime,
bool mintable
)
public
onlyOwnerOrMinter
{
// Verify that this device has not been registered yet.
require(_devices[primaryPublicKeyHash].tertiaryPublicKeyHash == "", 'Already registered.');
// Verify the cumulative limit for mintable Kong has not been exceeded.
if (mintable) {
uint256 _maxMinted = KongERC20Interface(_kongERC20Address).getMintingLimit();
require(<FILL_ME>)
// Increment _totalMintable.
_totalMintable += kongAmount;
// Adjust minting cap. Throws on underflow / Guarantees minter does not exceed its limit.
_mintingCaps[msg.sender] = _mintingCaps[msg.sender].sub(kongAmount);
}
// Create device struct.
_devices[primaryPublicKeyHash] = Device(
tertiaryPublicKeyHash,
hardwareHash,
kongAmount,
mintableTime,
mintable
);
// Emit event.
emit Registration(
primaryPublicKeyHash,
tertiaryPublicKeyHash,
hardwareHash,
kongAmount,
mintableTime,
mintable
);
}
/**
* @dev Mint registered `kongAmount` for `_devices[primaryPublicKeyHash]` to `recipient`.
*/
function mintKong(
bytes32 primaryPublicKeyHash,
address recipient
)
external
onlyOwnerOrMinter
{
}
/**
* @dev Return the stored details for a registered device.
*/
function getRegistrationDetails(
bytes32 primaryPublicKeyHash
)
external
view
returns (bytes32, bytes32, uint256, uint256, bool)
{
}
/**
* @dev Return the hashed minting key for a registered device.
*/
function getTertiaryKeyHash(
bytes32 primaryPublicKeyHash
)
external
view
returns (bytes32)
{
}
/**
* @dev Return Kong amount for a registered device.
*/
function getKongAmount(
bytes32 primaryPublicKeyHash
)
external
view
returns (uint)
{
}
}
| _totalMintable.add(kongAmount)<=_maxMinted,'Exceeds cumulative limit.' | 353,609 | _totalMintable.add(kongAmount)<=_maxMinted |
'Not mintable / already minted.' | pragma solidity 0.5.2;
/***************
** **
** INTERFACES **
** **
***************/
/**
* @title Interface for Kong ERC20 Token Contract.
*/
interface KongERC20Interface {
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function mint(uint256 mintedAmount, address recipient) external;
function getMintingLimit() external returns(uint256);
}
/**
* @title Interface for EllipticCurve contract.
*/
interface EllipticCurveInterface {
function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool);
}
/****************************
** **
** OPEN ZEPPELIN CONTRACTS **
** **
****************************/
/**
* @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) {
}
}
/**********************************
** **
** REGISTER DIRECT MINT CONTRACT **
** **
**********************************/
/**
* @title Register Contract.
*/
contract RegisterDirectMint {
using SafeMath for uint256;
// Account with the right to adjust the set of minters.
address public _owner;
// Address of the Kong ERC20 account.
address public _kongERC20Address;
// Sum of Kong amounts marked as mintable for registered devices.
uint256 public _totalMintable;
// Minters.
mapping (address => bool) public _minters;
// Minting caps.
mapping (address => uint256) public _mintingCaps;
//
struct Device {
bytes32 tertiaryPublicKeyHash;
bytes32 hardwareHash;
uint256 kongAmount;
uint256 mintableTime;
bool mintable;
}
// Registered devices.
mapping(bytes32 => Device) internal _devices;
/**
* @dev Emit when device is registered.
*/
event Registration(
bytes32 primaryPublicKeyHash,
bytes32 tertiaryPublicKeyHash,
bytes32 hardwareHash,
uint256 kongAmount,
uint256 mintableTime,
bool mintable
);
/**
* @dev Emit when minting rights are delegated / removed.
*/
event MinterAddition (
address minter,
uint256 mintingCap
);
event MinterRemoval (
address minter
);
/**
* @dev Constructor.
*/
constructor(address owner, address kongAddress) public {
}
/**
* @dev Throws if called by any account but owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account but owner or registered minter.
*/
modifier onlyOwnerOrMinter() {
}
/**
* @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`.
*/
function delegateMintingRights(
address newMinter,
uint256 mintingCap
)
public
onlyOwner
{
}
/**
* @dev Remove address from the mapping of _minters.
*/
function removeMintingRights(
address minter
)
public
onlyOwner
{
}
/**
* @dev Register a new device.
*/
function registerDevice(
bytes32 primaryPublicKeyHash,
bytes32 tertiaryPublicKeyHash,
bytes32 hardwareHash,
uint256 kongAmount,
uint256 mintableTime,
bool mintable
)
public
onlyOwnerOrMinter
{
}
/**
* @dev Mint registered `kongAmount` for `_devices[primaryPublicKeyHash]` to `recipient`.
*/
function mintKong(
bytes32 primaryPublicKeyHash,
address recipient
)
external
onlyOwnerOrMinter
{
// Get Kong details.
Device memory d = _devices[primaryPublicKeyHash];
// Verify that Kong is mintable.
require(<FILL_ME>)
require(block.timestamp >= d.mintableTime, 'Cannot mint yet.');
// Set status to minted.
_devices[primaryPublicKeyHash].mintable = false;
// Mint.
KongERC20Interface(_kongERC20Address).mint(d.kongAmount, recipient);
}
/**
* @dev Return the stored details for a registered device.
*/
function getRegistrationDetails(
bytes32 primaryPublicKeyHash
)
external
view
returns (bytes32, bytes32, uint256, uint256, bool)
{
}
/**
* @dev Return the hashed minting key for a registered device.
*/
function getTertiaryKeyHash(
bytes32 primaryPublicKeyHash
)
external
view
returns (bytes32)
{
}
/**
* @dev Return Kong amount for a registered device.
*/
function getKongAmount(
bytes32 primaryPublicKeyHash
)
external
view
returns (uint)
{
}
}
| d.mintable,'Not mintable / already minted.' | 353,609 | d.mintable |
"Max supply for the sale with owner mints exceeds total token supply." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
import "base64-sol/base64.sol";
// //
// ///////***
// //////******
// /////********
// ***********.
// ((((((((((((//////// /////// *****/
// #((((((((((((((//////////////////////*****
// ((((((((((((((///////////////////////*******
// (((((((((((((//////////////////////**********.
// (((((((((((((///// /////////////**********
// ((((((((((((// //**********
// (((((((((//// ##((((((((( *****
// (((((((///// ((((((((((((((((((
// (((((/////// (((((((((((((((((((((
// (((///////// (((((((((((((((((((((((
// //////////// (((((((((((((((((((((
// /////////////// (((((((((((((((
// //////////////******* ((((((((((((
// ///////////************ ((((((((((((
// ///////************** ((((((((((((
// /***************** ((((((((((((
// ((((( /********** (((((((((((((
// (((((((((((( ((((((((((((((
// (((((((((((((((((((((((/ /((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((
// (((((((((((((((((((((((((((((((((((((((((/
// (#(((( ((((((( ((((((((((((((((((((
// ((((((((((((
// ((((((((((((/
// ((((((((((((
// ((((((((((
contract ProbablySomethingGenesisPasses is Ownable, ERC721A, ReentrancyGuard {
struct SaleConfig {
uint256 mintPrice;
bytes32 merkleRoot;
uint256 maxPerWallet;
uint16 maxSaleSupply;
}
struct TokenMetadata {
string titleBase;
string description;
string website;
string animationLocation;
string imageLocation;
}
uint256 public constant MAX_SUPPLY = 555;
bool public privateSaleOpen = false;
SaleConfig saleData;
TokenMetadata metadata;
uint256 ownerSupply;
uint16 privateSaleRound;
mapping(uint16 => mapping(address => uint256)) allowListMinted;
event Minted(address to, uint256 quantity);
/**
* @notice Initializes the contract with initial sale data.
*/
constructor() ERC721A("Probably Something", "PSGENPASS") {
}
/**
* @notice Starts a new sale phase for Genesis Passes.
* @param price_ The price per token for the sale period.
* @param merkleRoot_ the merkle root to use for allowlisting.
* @param maxPerWallet_ the maximum that can be minted per wallet for the current sale period.
* @param maxSaleSupply_ the total supply of public tokens available to be purchased by the end of the sale period.
*/
function setNewSaleData(
uint256 price_,
bytes32 merkleRoot_,
uint256 maxPerWallet_,
uint16 maxSaleSupply_
) external onlyOwner {
require(
totalSupply() <= MAX_SUPPLY,
"All passes have already been sold."
);
require(<FILL_ME>)
saleData = SaleConfig({
merkleRoot: merkleRoot_,
mintPrice: price_,
maxPerWallet: maxPerWallet_,
maxSaleSupply: maxSaleSupply_
});
privateSaleRound++;
}
/**
* @notice Toggles sale status. Sale remains closed until @setUpNewSalePhase is called again.
*/
function toggleSaleStatus(bool isOpen_) external onlyOwner {
}
/**
* @notice Set the maximum number of mints per wallet.
*/
function setMaxMint(uint256 max_) external onlyOwner {
}
/**
* @notice Set Merkle root for the sale.
*/
function setMerkleRoot(bytes32 root_) external onlyOwner {
}
/**
* @notice Sets the maximum sale supply.
*/
function setMaxSaleSupply(uint16 max_) external onlyOwner {
}
/**
* @notice Set the current sale price.
*/
function setSalePrice(uint256 price_) external onlyOwner {
}
/**
* @notice Sets the base title on the token, which will be rendered with " #2" after.
*/
function setTitleBase(string calldata titleBase_) external onlyOwner {
}
/**
* @notice Point to a new global animation location for the token.
*/
function setAnimationLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Point to a new global image location for the token.
*/
function setImageLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Set a new Description for the token.
*/
function setDescription(string calldata desc_) external onlyOwner {
}
/**
* @notice Point to a new website for the token.
*/
function setWebsite(string calldata website_) external onlyOwner {
}
/**
* @notice Mint for owner. Can occur when sale is inactive
*/
function ownerMint(uint256 quantity) external onlyOwner {
}
/**
* @notice Mints genesis passes for allowlisted wallets subject to the current sale config.
* @param quantity_ the quantity of passes to mint. Must match the amount of ETH sent.
* @param merkleProof_ the merkle proof for the given msg.sender wallet
*/
function allowlistMint(uint256 quantity_, bytes32[] calldata merkleProof_) external payable {
}
/**
* @notice Withdraws ether from the contract.
*/
function withdrawEther(address payable _to, uint256 _amount) external onlyOwner nonReentrant {
}
/**
* @notice Get the price of the current active sale.
*/
function getSalePrice() public view returns (uint256) {
}
/**
* @notice Get the active merkle root for the sale.
*/
function getActiveMerkleRoot() public view returns (bytes32) {
}
/**
* @notice Returns the total number of tokens mintable for a given wallet.
*/
function getMintableTokensForWallet(address account_, bytes32[] calldata merkleProof_) public view returns (uint32) {
}
/**
* @notice Get current sale max supply.
*/
function getCurrentMaxSaleSupply() public view returns (uint16) {
}
/**
* @notice Override of the existing token URI for on-chain metadata.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice toggles sale status
*/
function _toggleSaleStatus(bool isOpen_) internal {
}
/**
* @notice checks a leaf node of an address against the active merkle root.
*/
function _isAllowlisted(address wallet_, bytes32[] calldata proof_) internal view returns (bool) {
}
// ** - MISC - ** //
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
}
| maxSaleSupply_+ownerSupply<=MAX_SUPPLY,"Max supply for the sale with owner mints exceeds total token supply." | 353,623 | maxSaleSupply_+ownerSupply<=MAX_SUPPLY |
"Mint: Cannot mint more than the max supply for the current sale period." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
import "base64-sol/base64.sol";
// //
// ///////***
// //////******
// /////********
// ***********.
// ((((((((((((//////// /////// *****/
// #((((((((((((((//////////////////////*****
// ((((((((((((((///////////////////////*******
// (((((((((((((//////////////////////**********.
// (((((((((((((///// /////////////**********
// ((((((((((((// //**********
// (((((((((//// ##((((((((( *****
// (((((((///// ((((((((((((((((((
// (((((/////// (((((((((((((((((((((
// (((///////// (((((((((((((((((((((((
// //////////// (((((((((((((((((((((
// /////////////// (((((((((((((((
// //////////////******* ((((((((((((
// ///////////************ ((((((((((((
// ///////************** ((((((((((((
// /***************** ((((((((((((
// ((((( /********** (((((((((((((
// (((((((((((( ((((((((((((((
// (((((((((((((((((((((((/ /((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((
// (((((((((((((((((((((((((((((((((((((((((/
// (#(((( ((((((( ((((((((((((((((((((
// ((((((((((((
// ((((((((((((/
// ((((((((((((
// ((((((((((
contract ProbablySomethingGenesisPasses is Ownable, ERC721A, ReentrancyGuard {
struct SaleConfig {
uint256 mintPrice;
bytes32 merkleRoot;
uint256 maxPerWallet;
uint16 maxSaleSupply;
}
struct TokenMetadata {
string titleBase;
string description;
string website;
string animationLocation;
string imageLocation;
}
uint256 public constant MAX_SUPPLY = 555;
bool public privateSaleOpen = false;
SaleConfig saleData;
TokenMetadata metadata;
uint256 ownerSupply;
uint16 privateSaleRound;
mapping(uint16 => mapping(address => uint256)) allowListMinted;
event Minted(address to, uint256 quantity);
/**
* @notice Initializes the contract with initial sale data.
*/
constructor() ERC721A("Probably Something", "PSGENPASS") {
}
/**
* @notice Starts a new sale phase for Genesis Passes.
* @param price_ The price per token for the sale period.
* @param merkleRoot_ the merkle root to use for allowlisting.
* @param maxPerWallet_ the maximum that can be minted per wallet for the current sale period.
* @param maxSaleSupply_ the total supply of public tokens available to be purchased by the end of the sale period.
*/
function setNewSaleData(
uint256 price_,
bytes32 merkleRoot_,
uint256 maxPerWallet_,
uint16 maxSaleSupply_
) external onlyOwner {
}
/**
* @notice Toggles sale status. Sale remains closed until @setUpNewSalePhase is called again.
*/
function toggleSaleStatus(bool isOpen_) external onlyOwner {
}
/**
* @notice Set the maximum number of mints per wallet.
*/
function setMaxMint(uint256 max_) external onlyOwner {
}
/**
* @notice Set Merkle root for the sale.
*/
function setMerkleRoot(bytes32 root_) external onlyOwner {
}
/**
* @notice Sets the maximum sale supply.
*/
function setMaxSaleSupply(uint16 max_) external onlyOwner {
}
/**
* @notice Set the current sale price.
*/
function setSalePrice(uint256 price_) external onlyOwner {
}
/**
* @notice Sets the base title on the token, which will be rendered with " #2" after.
*/
function setTitleBase(string calldata titleBase_) external onlyOwner {
}
/**
* @notice Point to a new global animation location for the token.
*/
function setAnimationLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Point to a new global image location for the token.
*/
function setImageLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Set a new Description for the token.
*/
function setDescription(string calldata desc_) external onlyOwner {
}
/**
* @notice Point to a new website for the token.
*/
function setWebsite(string calldata website_) external onlyOwner {
}
/**
* @notice Mint for owner. Can occur when sale is inactive
*/
function ownerMint(uint256 quantity) external onlyOwner {
}
/**
* @notice Mints genesis passes for allowlisted wallets subject to the current sale config.
* @param quantity_ the quantity of passes to mint. Must match the amount of ETH sent.
* @param merkleProof_ the merkle proof for the given msg.sender wallet
*/
function allowlistMint(uint256 quantity_, bytes32[] calldata merkleProof_) external payable {
require(privateSaleOpen, "Mint: sale is not open");
require(<FILL_ME>)
require(
totalSupply() + quantity_ <= MAX_SUPPLY,
"Mint: Reached max pass supply of genesis passes."
);
require(
allowListMinted[privateSaleRound][msg.sender] + quantity_ <= saleData.maxPerWallet,
"Mint: Amount exceeded."
);
require(
msg.value == (saleData.mintPrice * quantity_),
"Mint: Payment incorrect"
);
require(
_isAllowlisted(msg.sender, merkleProof_),
"Mint: User is not authorized to mint a genesis pass."
);
allowListMinted[privateSaleRound][msg.sender] =
allowListMinted[privateSaleRound][msg.sender] +
quantity_;
_safeMint(msg.sender, quantity_);
emit Minted(msg.sender, quantity_);
}
/**
* @notice Withdraws ether from the contract.
*/
function withdrawEther(address payable _to, uint256 _amount) external onlyOwner nonReentrant {
}
/**
* @notice Get the price of the current active sale.
*/
function getSalePrice() public view returns (uint256) {
}
/**
* @notice Get the active merkle root for the sale.
*/
function getActiveMerkleRoot() public view returns (bytes32) {
}
/**
* @notice Returns the total number of tokens mintable for a given wallet.
*/
function getMintableTokensForWallet(address account_, bytes32[] calldata merkleProof_) public view returns (uint32) {
}
/**
* @notice Get current sale max supply.
*/
function getCurrentMaxSaleSupply() public view returns (uint16) {
}
/**
* @notice Override of the existing token URI for on-chain metadata.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice toggles sale status
*/
function _toggleSaleStatus(bool isOpen_) internal {
}
/**
* @notice checks a leaf node of an address against the active merkle root.
*/
function _isAllowlisted(address wallet_, bytes32[] calldata proof_) internal view returns (bool) {
}
// ** - MISC - ** //
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
}
| totalSupply()-ownerSupply+quantity_<=saleData.maxSaleSupply,"Mint: Cannot mint more than the max supply for the current sale period." | 353,623 | totalSupply()-ownerSupply+quantity_<=saleData.maxSaleSupply |
"Mint: Reached max pass supply of genesis passes." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
import "base64-sol/base64.sol";
// //
// ///////***
// //////******
// /////********
// ***********.
// ((((((((((((//////// /////// *****/
// #((((((((((((((//////////////////////*****
// ((((((((((((((///////////////////////*******
// (((((((((((((//////////////////////**********.
// (((((((((((((///// /////////////**********
// ((((((((((((// //**********
// (((((((((//// ##((((((((( *****
// (((((((///// ((((((((((((((((((
// (((((/////// (((((((((((((((((((((
// (((///////// (((((((((((((((((((((((
// //////////// (((((((((((((((((((((
// /////////////// (((((((((((((((
// //////////////******* ((((((((((((
// ///////////************ ((((((((((((
// ///////************** ((((((((((((
// /***************** ((((((((((((
// ((((( /********** (((((((((((((
// (((((((((((( ((((((((((((((
// (((((((((((((((((((((((/ /((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((
// (((((((((((((((((((((((((((((((((((((((((/
// (#(((( ((((((( ((((((((((((((((((((
// ((((((((((((
// ((((((((((((/
// ((((((((((((
// ((((((((((
contract ProbablySomethingGenesisPasses is Ownable, ERC721A, ReentrancyGuard {
struct SaleConfig {
uint256 mintPrice;
bytes32 merkleRoot;
uint256 maxPerWallet;
uint16 maxSaleSupply;
}
struct TokenMetadata {
string titleBase;
string description;
string website;
string animationLocation;
string imageLocation;
}
uint256 public constant MAX_SUPPLY = 555;
bool public privateSaleOpen = false;
SaleConfig saleData;
TokenMetadata metadata;
uint256 ownerSupply;
uint16 privateSaleRound;
mapping(uint16 => mapping(address => uint256)) allowListMinted;
event Minted(address to, uint256 quantity);
/**
* @notice Initializes the contract with initial sale data.
*/
constructor() ERC721A("Probably Something", "PSGENPASS") {
}
/**
* @notice Starts a new sale phase for Genesis Passes.
* @param price_ The price per token for the sale period.
* @param merkleRoot_ the merkle root to use for allowlisting.
* @param maxPerWallet_ the maximum that can be minted per wallet for the current sale period.
* @param maxSaleSupply_ the total supply of public tokens available to be purchased by the end of the sale period.
*/
function setNewSaleData(
uint256 price_,
bytes32 merkleRoot_,
uint256 maxPerWallet_,
uint16 maxSaleSupply_
) external onlyOwner {
}
/**
* @notice Toggles sale status. Sale remains closed until @setUpNewSalePhase is called again.
*/
function toggleSaleStatus(bool isOpen_) external onlyOwner {
}
/**
* @notice Set the maximum number of mints per wallet.
*/
function setMaxMint(uint256 max_) external onlyOwner {
}
/**
* @notice Set Merkle root for the sale.
*/
function setMerkleRoot(bytes32 root_) external onlyOwner {
}
/**
* @notice Sets the maximum sale supply.
*/
function setMaxSaleSupply(uint16 max_) external onlyOwner {
}
/**
* @notice Set the current sale price.
*/
function setSalePrice(uint256 price_) external onlyOwner {
}
/**
* @notice Sets the base title on the token, which will be rendered with " #2" after.
*/
function setTitleBase(string calldata titleBase_) external onlyOwner {
}
/**
* @notice Point to a new global animation location for the token.
*/
function setAnimationLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Point to a new global image location for the token.
*/
function setImageLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Set a new Description for the token.
*/
function setDescription(string calldata desc_) external onlyOwner {
}
/**
* @notice Point to a new website for the token.
*/
function setWebsite(string calldata website_) external onlyOwner {
}
/**
* @notice Mint for owner. Can occur when sale is inactive
*/
function ownerMint(uint256 quantity) external onlyOwner {
}
/**
* @notice Mints genesis passes for allowlisted wallets subject to the current sale config.
* @param quantity_ the quantity of passes to mint. Must match the amount of ETH sent.
* @param merkleProof_ the merkle proof for the given msg.sender wallet
*/
function allowlistMint(uint256 quantity_, bytes32[] calldata merkleProof_) external payable {
require(privateSaleOpen, "Mint: sale is not open");
require(
totalSupply() - ownerSupply + quantity_ <= saleData.maxSaleSupply,
"Mint: Cannot mint more than the max supply for the current sale period."
);
require(<FILL_ME>)
require(
allowListMinted[privateSaleRound][msg.sender] + quantity_ <= saleData.maxPerWallet,
"Mint: Amount exceeded."
);
require(
msg.value == (saleData.mintPrice * quantity_),
"Mint: Payment incorrect"
);
require(
_isAllowlisted(msg.sender, merkleProof_),
"Mint: User is not authorized to mint a genesis pass."
);
allowListMinted[privateSaleRound][msg.sender] =
allowListMinted[privateSaleRound][msg.sender] +
quantity_;
_safeMint(msg.sender, quantity_);
emit Minted(msg.sender, quantity_);
}
/**
* @notice Withdraws ether from the contract.
*/
function withdrawEther(address payable _to, uint256 _amount) external onlyOwner nonReentrant {
}
/**
* @notice Get the price of the current active sale.
*/
function getSalePrice() public view returns (uint256) {
}
/**
* @notice Get the active merkle root for the sale.
*/
function getActiveMerkleRoot() public view returns (bytes32) {
}
/**
* @notice Returns the total number of tokens mintable for a given wallet.
*/
function getMintableTokensForWallet(address account_, bytes32[] calldata merkleProof_) public view returns (uint32) {
}
/**
* @notice Get current sale max supply.
*/
function getCurrentMaxSaleSupply() public view returns (uint16) {
}
/**
* @notice Override of the existing token URI for on-chain metadata.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice toggles sale status
*/
function _toggleSaleStatus(bool isOpen_) internal {
}
/**
* @notice checks a leaf node of an address against the active merkle root.
*/
function _isAllowlisted(address wallet_, bytes32[] calldata proof_) internal view returns (bool) {
}
// ** - MISC - ** //
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
}
| totalSupply()+quantity_<=MAX_SUPPLY,"Mint: Reached max pass supply of genesis passes." | 353,623 | totalSupply()+quantity_<=MAX_SUPPLY |
"Mint: Amount exceeded." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
import "base64-sol/base64.sol";
// //
// ///////***
// //////******
// /////********
// ***********.
// ((((((((((((//////// /////// *****/
// #((((((((((((((//////////////////////*****
// ((((((((((((((///////////////////////*******
// (((((((((((((//////////////////////**********.
// (((((((((((((///// /////////////**********
// ((((((((((((// //**********
// (((((((((//// ##((((((((( *****
// (((((((///// ((((((((((((((((((
// (((((/////// (((((((((((((((((((((
// (((///////// (((((((((((((((((((((((
// //////////// (((((((((((((((((((((
// /////////////// (((((((((((((((
// //////////////******* ((((((((((((
// ///////////************ ((((((((((((
// ///////************** ((((((((((((
// /***************** ((((((((((((
// ((((( /********** (((((((((((((
// (((((((((((( ((((((((((((((
// (((((((((((((((((((((((/ /((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((
// (((((((((((((((((((((((((((((((((((((((((/
// (#(((( ((((((( ((((((((((((((((((((
// ((((((((((((
// ((((((((((((/
// ((((((((((((
// ((((((((((
contract ProbablySomethingGenesisPasses is Ownable, ERC721A, ReentrancyGuard {
struct SaleConfig {
uint256 mintPrice;
bytes32 merkleRoot;
uint256 maxPerWallet;
uint16 maxSaleSupply;
}
struct TokenMetadata {
string titleBase;
string description;
string website;
string animationLocation;
string imageLocation;
}
uint256 public constant MAX_SUPPLY = 555;
bool public privateSaleOpen = false;
SaleConfig saleData;
TokenMetadata metadata;
uint256 ownerSupply;
uint16 privateSaleRound;
mapping(uint16 => mapping(address => uint256)) allowListMinted;
event Minted(address to, uint256 quantity);
/**
* @notice Initializes the contract with initial sale data.
*/
constructor() ERC721A("Probably Something", "PSGENPASS") {
}
/**
* @notice Starts a new sale phase for Genesis Passes.
* @param price_ The price per token for the sale period.
* @param merkleRoot_ the merkle root to use for allowlisting.
* @param maxPerWallet_ the maximum that can be minted per wallet for the current sale period.
* @param maxSaleSupply_ the total supply of public tokens available to be purchased by the end of the sale period.
*/
function setNewSaleData(
uint256 price_,
bytes32 merkleRoot_,
uint256 maxPerWallet_,
uint16 maxSaleSupply_
) external onlyOwner {
}
/**
* @notice Toggles sale status. Sale remains closed until @setUpNewSalePhase is called again.
*/
function toggleSaleStatus(bool isOpen_) external onlyOwner {
}
/**
* @notice Set the maximum number of mints per wallet.
*/
function setMaxMint(uint256 max_) external onlyOwner {
}
/**
* @notice Set Merkle root for the sale.
*/
function setMerkleRoot(bytes32 root_) external onlyOwner {
}
/**
* @notice Sets the maximum sale supply.
*/
function setMaxSaleSupply(uint16 max_) external onlyOwner {
}
/**
* @notice Set the current sale price.
*/
function setSalePrice(uint256 price_) external onlyOwner {
}
/**
* @notice Sets the base title on the token, which will be rendered with " #2" after.
*/
function setTitleBase(string calldata titleBase_) external onlyOwner {
}
/**
* @notice Point to a new global animation location for the token.
*/
function setAnimationLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Point to a new global image location for the token.
*/
function setImageLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Set a new Description for the token.
*/
function setDescription(string calldata desc_) external onlyOwner {
}
/**
* @notice Point to a new website for the token.
*/
function setWebsite(string calldata website_) external onlyOwner {
}
/**
* @notice Mint for owner. Can occur when sale is inactive
*/
function ownerMint(uint256 quantity) external onlyOwner {
}
/**
* @notice Mints genesis passes for allowlisted wallets subject to the current sale config.
* @param quantity_ the quantity of passes to mint. Must match the amount of ETH sent.
* @param merkleProof_ the merkle proof for the given msg.sender wallet
*/
function allowlistMint(uint256 quantity_, bytes32[] calldata merkleProof_) external payable {
require(privateSaleOpen, "Mint: sale is not open");
require(
totalSupply() - ownerSupply + quantity_ <= saleData.maxSaleSupply,
"Mint: Cannot mint more than the max supply for the current sale period."
);
require(
totalSupply() + quantity_ <= MAX_SUPPLY,
"Mint: Reached max pass supply of genesis passes."
);
require(<FILL_ME>)
require(
msg.value == (saleData.mintPrice * quantity_),
"Mint: Payment incorrect"
);
require(
_isAllowlisted(msg.sender, merkleProof_),
"Mint: User is not authorized to mint a genesis pass."
);
allowListMinted[privateSaleRound][msg.sender] =
allowListMinted[privateSaleRound][msg.sender] +
quantity_;
_safeMint(msg.sender, quantity_);
emit Minted(msg.sender, quantity_);
}
/**
* @notice Withdraws ether from the contract.
*/
function withdrawEther(address payable _to, uint256 _amount) external onlyOwner nonReentrant {
}
/**
* @notice Get the price of the current active sale.
*/
function getSalePrice() public view returns (uint256) {
}
/**
* @notice Get the active merkle root for the sale.
*/
function getActiveMerkleRoot() public view returns (bytes32) {
}
/**
* @notice Returns the total number of tokens mintable for a given wallet.
*/
function getMintableTokensForWallet(address account_, bytes32[] calldata merkleProof_) public view returns (uint32) {
}
/**
* @notice Get current sale max supply.
*/
function getCurrentMaxSaleSupply() public view returns (uint16) {
}
/**
* @notice Override of the existing token URI for on-chain metadata.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice toggles sale status
*/
function _toggleSaleStatus(bool isOpen_) internal {
}
/**
* @notice checks a leaf node of an address against the active merkle root.
*/
function _isAllowlisted(address wallet_, bytes32[] calldata proof_) internal view returns (bool) {
}
// ** - MISC - ** //
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
}
| allowListMinted[privateSaleRound][msg.sender]+quantity_<=saleData.maxPerWallet,"Mint: Amount exceeded." | 353,623 | allowListMinted[privateSaleRound][msg.sender]+quantity_<=saleData.maxPerWallet |
"Mint: Payment incorrect" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
import "base64-sol/base64.sol";
// //
// ///////***
// //////******
// /////********
// ***********.
// ((((((((((((//////// /////// *****/
// #((((((((((((((//////////////////////*****
// ((((((((((((((///////////////////////*******
// (((((((((((((//////////////////////**********.
// (((((((((((((///// /////////////**********
// ((((((((((((// //**********
// (((((((((//// ##((((((((( *****
// (((((((///// ((((((((((((((((((
// (((((/////// (((((((((((((((((((((
// (((///////// (((((((((((((((((((((((
// //////////// (((((((((((((((((((((
// /////////////// (((((((((((((((
// //////////////******* ((((((((((((
// ///////////************ ((((((((((((
// ///////************** ((((((((((((
// /***************** ((((((((((((
// ((((( /********** (((((((((((((
// (((((((((((( ((((((((((((((
// (((((((((((((((((((((((/ /((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((
// (((((((((((((((((((((((((((((((((((((((((/
// (#(((( ((((((( ((((((((((((((((((((
// ((((((((((((
// ((((((((((((/
// ((((((((((((
// ((((((((((
contract ProbablySomethingGenesisPasses is Ownable, ERC721A, ReentrancyGuard {
struct SaleConfig {
uint256 mintPrice;
bytes32 merkleRoot;
uint256 maxPerWallet;
uint16 maxSaleSupply;
}
struct TokenMetadata {
string titleBase;
string description;
string website;
string animationLocation;
string imageLocation;
}
uint256 public constant MAX_SUPPLY = 555;
bool public privateSaleOpen = false;
SaleConfig saleData;
TokenMetadata metadata;
uint256 ownerSupply;
uint16 privateSaleRound;
mapping(uint16 => mapping(address => uint256)) allowListMinted;
event Minted(address to, uint256 quantity);
/**
* @notice Initializes the contract with initial sale data.
*/
constructor() ERC721A("Probably Something", "PSGENPASS") {
}
/**
* @notice Starts a new sale phase for Genesis Passes.
* @param price_ The price per token for the sale period.
* @param merkleRoot_ the merkle root to use for allowlisting.
* @param maxPerWallet_ the maximum that can be minted per wallet for the current sale period.
* @param maxSaleSupply_ the total supply of public tokens available to be purchased by the end of the sale period.
*/
function setNewSaleData(
uint256 price_,
bytes32 merkleRoot_,
uint256 maxPerWallet_,
uint16 maxSaleSupply_
) external onlyOwner {
}
/**
* @notice Toggles sale status. Sale remains closed until @setUpNewSalePhase is called again.
*/
function toggleSaleStatus(bool isOpen_) external onlyOwner {
}
/**
* @notice Set the maximum number of mints per wallet.
*/
function setMaxMint(uint256 max_) external onlyOwner {
}
/**
* @notice Set Merkle root for the sale.
*/
function setMerkleRoot(bytes32 root_) external onlyOwner {
}
/**
* @notice Sets the maximum sale supply.
*/
function setMaxSaleSupply(uint16 max_) external onlyOwner {
}
/**
* @notice Set the current sale price.
*/
function setSalePrice(uint256 price_) external onlyOwner {
}
/**
* @notice Sets the base title on the token, which will be rendered with " #2" after.
*/
function setTitleBase(string calldata titleBase_) external onlyOwner {
}
/**
* @notice Point to a new global animation location for the token.
*/
function setAnimationLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Point to a new global image location for the token.
*/
function setImageLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Set a new Description for the token.
*/
function setDescription(string calldata desc_) external onlyOwner {
}
/**
* @notice Point to a new website for the token.
*/
function setWebsite(string calldata website_) external onlyOwner {
}
/**
* @notice Mint for owner. Can occur when sale is inactive
*/
function ownerMint(uint256 quantity) external onlyOwner {
}
/**
* @notice Mints genesis passes for allowlisted wallets subject to the current sale config.
* @param quantity_ the quantity of passes to mint. Must match the amount of ETH sent.
* @param merkleProof_ the merkle proof for the given msg.sender wallet
*/
function allowlistMint(uint256 quantity_, bytes32[] calldata merkleProof_) external payable {
require(privateSaleOpen, "Mint: sale is not open");
require(
totalSupply() - ownerSupply + quantity_ <= saleData.maxSaleSupply,
"Mint: Cannot mint more than the max supply for the current sale period."
);
require(
totalSupply() + quantity_ <= MAX_SUPPLY,
"Mint: Reached max pass supply of genesis passes."
);
require(
allowListMinted[privateSaleRound][msg.sender] + quantity_ <= saleData.maxPerWallet,
"Mint: Amount exceeded."
);
require(<FILL_ME>)
require(
_isAllowlisted(msg.sender, merkleProof_),
"Mint: User is not authorized to mint a genesis pass."
);
allowListMinted[privateSaleRound][msg.sender] =
allowListMinted[privateSaleRound][msg.sender] +
quantity_;
_safeMint(msg.sender, quantity_);
emit Minted(msg.sender, quantity_);
}
/**
* @notice Withdraws ether from the contract.
*/
function withdrawEther(address payable _to, uint256 _amount) external onlyOwner nonReentrant {
}
/**
* @notice Get the price of the current active sale.
*/
function getSalePrice() public view returns (uint256) {
}
/**
* @notice Get the active merkle root for the sale.
*/
function getActiveMerkleRoot() public view returns (bytes32) {
}
/**
* @notice Returns the total number of tokens mintable for a given wallet.
*/
function getMintableTokensForWallet(address account_, bytes32[] calldata merkleProof_) public view returns (uint32) {
}
/**
* @notice Get current sale max supply.
*/
function getCurrentMaxSaleSupply() public view returns (uint16) {
}
/**
* @notice Override of the existing token URI for on-chain metadata.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice toggles sale status
*/
function _toggleSaleStatus(bool isOpen_) internal {
}
/**
* @notice checks a leaf node of an address against the active merkle root.
*/
function _isAllowlisted(address wallet_, bytes32[] calldata proof_) internal view returns (bool) {
}
// ** - MISC - ** //
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
}
| msg.value==(saleData.mintPrice*quantity_),"Mint: Payment incorrect" | 353,623 | msg.value==(saleData.mintPrice*quantity_) |
"Mint: User is not authorized to mint a genesis pass." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
import "base64-sol/base64.sol";
// //
// ///////***
// //////******
// /////********
// ***********.
// ((((((((((((//////// /////// *****/
// #((((((((((((((//////////////////////*****
// ((((((((((((((///////////////////////*******
// (((((((((((((//////////////////////**********.
// (((((((((((((///// /////////////**********
// ((((((((((((// //**********
// (((((((((//// ##((((((((( *****
// (((((((///// ((((((((((((((((((
// (((((/////// (((((((((((((((((((((
// (((///////// (((((((((((((((((((((((
// //////////// (((((((((((((((((((((
// /////////////// (((((((((((((((
// //////////////******* ((((((((((((
// ///////////************ ((((((((((((
// ///////************** ((((((((((((
// /***************** ((((((((((((
// ((((( /********** (((((((((((((
// (((((((((((( ((((((((((((((
// (((((((((((((((((((((((/ /((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((((
// ((((((((((((((((((((((((((((((((((((((((((((
// (((((((((((((((((((((((((((((((((((((((((/
// (#(((( ((((((( ((((((((((((((((((((
// ((((((((((((
// ((((((((((((/
// ((((((((((((
// ((((((((((
contract ProbablySomethingGenesisPasses is Ownable, ERC721A, ReentrancyGuard {
struct SaleConfig {
uint256 mintPrice;
bytes32 merkleRoot;
uint256 maxPerWallet;
uint16 maxSaleSupply;
}
struct TokenMetadata {
string titleBase;
string description;
string website;
string animationLocation;
string imageLocation;
}
uint256 public constant MAX_SUPPLY = 555;
bool public privateSaleOpen = false;
SaleConfig saleData;
TokenMetadata metadata;
uint256 ownerSupply;
uint16 privateSaleRound;
mapping(uint16 => mapping(address => uint256)) allowListMinted;
event Minted(address to, uint256 quantity);
/**
* @notice Initializes the contract with initial sale data.
*/
constructor() ERC721A("Probably Something", "PSGENPASS") {
}
/**
* @notice Starts a new sale phase for Genesis Passes.
* @param price_ The price per token for the sale period.
* @param merkleRoot_ the merkle root to use for allowlisting.
* @param maxPerWallet_ the maximum that can be minted per wallet for the current sale period.
* @param maxSaleSupply_ the total supply of public tokens available to be purchased by the end of the sale period.
*/
function setNewSaleData(
uint256 price_,
bytes32 merkleRoot_,
uint256 maxPerWallet_,
uint16 maxSaleSupply_
) external onlyOwner {
}
/**
* @notice Toggles sale status. Sale remains closed until @setUpNewSalePhase is called again.
*/
function toggleSaleStatus(bool isOpen_) external onlyOwner {
}
/**
* @notice Set the maximum number of mints per wallet.
*/
function setMaxMint(uint256 max_) external onlyOwner {
}
/**
* @notice Set Merkle root for the sale.
*/
function setMerkleRoot(bytes32 root_) external onlyOwner {
}
/**
* @notice Sets the maximum sale supply.
*/
function setMaxSaleSupply(uint16 max_) external onlyOwner {
}
/**
* @notice Set the current sale price.
*/
function setSalePrice(uint256 price_) external onlyOwner {
}
/**
* @notice Sets the base title on the token, which will be rendered with " #2" after.
*/
function setTitleBase(string calldata titleBase_) external onlyOwner {
}
/**
* @notice Point to a new global animation location for the token.
*/
function setAnimationLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Point to a new global image location for the token.
*/
function setImageLocation(string calldata loc_) external onlyOwner {
}
/**
* @notice Set a new Description for the token.
*/
function setDescription(string calldata desc_) external onlyOwner {
}
/**
* @notice Point to a new website for the token.
*/
function setWebsite(string calldata website_) external onlyOwner {
}
/**
* @notice Mint for owner. Can occur when sale is inactive
*/
function ownerMint(uint256 quantity) external onlyOwner {
}
/**
* @notice Mints genesis passes for allowlisted wallets subject to the current sale config.
* @param quantity_ the quantity of passes to mint. Must match the amount of ETH sent.
* @param merkleProof_ the merkle proof for the given msg.sender wallet
*/
function allowlistMint(uint256 quantity_, bytes32[] calldata merkleProof_) external payable {
require(privateSaleOpen, "Mint: sale is not open");
require(
totalSupply() - ownerSupply + quantity_ <= saleData.maxSaleSupply,
"Mint: Cannot mint more than the max supply for the current sale period."
);
require(
totalSupply() + quantity_ <= MAX_SUPPLY,
"Mint: Reached max pass supply of genesis passes."
);
require(
allowListMinted[privateSaleRound][msg.sender] + quantity_ <= saleData.maxPerWallet,
"Mint: Amount exceeded."
);
require(
msg.value == (saleData.mintPrice * quantity_),
"Mint: Payment incorrect"
);
require(<FILL_ME>)
allowListMinted[privateSaleRound][msg.sender] =
allowListMinted[privateSaleRound][msg.sender] +
quantity_;
_safeMint(msg.sender, quantity_);
emit Minted(msg.sender, quantity_);
}
/**
* @notice Withdraws ether from the contract.
*/
function withdrawEther(address payable _to, uint256 _amount) external onlyOwner nonReentrant {
}
/**
* @notice Get the price of the current active sale.
*/
function getSalePrice() public view returns (uint256) {
}
/**
* @notice Get the active merkle root for the sale.
*/
function getActiveMerkleRoot() public view returns (bytes32) {
}
/**
* @notice Returns the total number of tokens mintable for a given wallet.
*/
function getMintableTokensForWallet(address account_, bytes32[] calldata merkleProof_) public view returns (uint32) {
}
/**
* @notice Get current sale max supply.
*/
function getCurrentMaxSaleSupply() public view returns (uint16) {
}
/**
* @notice Override of the existing token URI for on-chain metadata.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice toggles sale status
*/
function _toggleSaleStatus(bool isOpen_) internal {
}
/**
* @notice checks a leaf node of an address against the active merkle root.
*/
function _isAllowlisted(address wallet_, bytes32[] calldata proof_) internal view returns (bool) {
}
// ** - MISC - ** //
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
}
| _isAllowlisted(msg.sender,merkleProof_),"Mint: User is not authorized to mint a genesis pass." | 353,623 | _isAllowlisted(msg.sender,merkleProof_) |
"Token already whitelisted" | pragma solidity 0.5.10;
/// @title The TokenList extension for the BrokerV2 contract
/// @author Switcheo Network
/// @notice This contract maintains a list of whitelisted tokens.
/// @dev Whitelisted tokens are permitted to call the `tokenFallback` and
/// `tokensReceived` methods in the BrokerV2 contract.
contract TokenList is BrokerExtension {
// A record of whitelisted tokens: tokenAddress => isWhitelisted.
// This controls token permission to invoke `tokenFallback` and `tokensReceived` callbacks
// on this contract.
mapping(address => bool) public tokenWhitelist;
/// @notice Whitelists a token contract
/// @dev This enables the token contract to call `tokensReceived` or `tokenFallback`
/// on this contract.
/// This layer of management is to prevent misuse of `tokensReceived` and `tokenFallback`
/// methods by unvetted tokens.
/// @param _assetId The token address to whitelist
function whitelistToken(address _assetId) external onlyOwner {
Utils.validateAddress(_assetId);
require(<FILL_ME>)
tokenWhitelist[_assetId] = true;
}
/// @notice Removes a token contract from the token whitelist
/// @param _assetId The token address to remove from the token whitelist
function unwhitelistToken(address _assetId) external onlyOwner {
}
/// @notice Validates if a token has been whitelisted
/// @param _assetId The token address to validate
function validateToken(address _assetId) external view {
}
}
| !tokenWhitelist[_assetId],"Token already whitelisted" | 353,642 | !tokenWhitelist[_assetId] |
"Token not whitelisted" | pragma solidity 0.5.10;
/// @title The TokenList extension for the BrokerV2 contract
/// @author Switcheo Network
/// @notice This contract maintains a list of whitelisted tokens.
/// @dev Whitelisted tokens are permitted to call the `tokenFallback` and
/// `tokensReceived` methods in the BrokerV2 contract.
contract TokenList is BrokerExtension {
// A record of whitelisted tokens: tokenAddress => isWhitelisted.
// This controls token permission to invoke `tokenFallback` and `tokensReceived` callbacks
// on this contract.
mapping(address => bool) public tokenWhitelist;
/// @notice Whitelists a token contract
/// @dev This enables the token contract to call `tokensReceived` or `tokenFallback`
/// on this contract.
/// This layer of management is to prevent misuse of `tokensReceived` and `tokenFallback`
/// methods by unvetted tokens.
/// @param _assetId The token address to whitelist
function whitelistToken(address _assetId) external onlyOwner {
}
/// @notice Removes a token contract from the token whitelist
/// @param _assetId The token address to remove from the token whitelist
function unwhitelistToken(address _assetId) external onlyOwner {
Utils.validateAddress(_assetId);
require(<FILL_ME>)
delete tokenWhitelist[_assetId];
}
/// @notice Validates if a token has been whitelisted
/// @param _assetId The token address to validate
function validateToken(address _assetId) external view {
}
}
| tokenWhitelist[_assetId],"Token not whitelisted" | 353,642 | tokenWhitelist[_assetId] |
"Order exceeds supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/****************************************
* @author: squeebo_nft *
* @team: GoldenX *
****************************************
* Blimpie-ERC721 provides low-gas *
* mints + transfers *
****************************************/
import './Blimpie/Delegated.sol';
import './Blimpie/ERC721EnumerableB.sol';
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
interface IERC721Proxy{
function balanceOf( address account ) external view returns ( uint quantity );
function ownerOf( uint tokenId ) external view returns ( address owner );
}
interface IPPL20{
function burnFromAccount( address account, uint pineapples ) external;
function burnFromTokens( address[] calldata tokenContracts, uint[] calldata tokenIds, uint pineapples ) external;
}
contract SupLadies is Delegated, ERC721EnumerableB, PaymentSplitter {
using Strings for uint;
uint public MAX_ORDER = 19;
uint public MAX_SUPPLY = 3914;
uint public MAX_VOUCHERS = 1957;
uint public ETH_PRICE = 0.1957 ether;
uint public PPL_PRICE = 19.57 ether;
bool public isMintActive = false;
bool public isPineapplesActive = false;
bool public isVoucherMintActive = false;
bool public isVoucherUseActive = false;
address public ahmcAddress = 0x61DB9Dde04F78fD55B0B4331a3d148073A101850;
address public artwAddress = 0x22d202872950782012baC53346EE3DaE3D78E0CB;
address public pineapplesAddress = 0x3e51F6422e41915e96A0808d21Babb83bcd278e5;
mapping(address => uint) public vouchers;
uint public voucherCount;
string private _tokenURIPrefix;
string private _tokenURISuffix;
address[] private addressList = [
0x13d86B7a637B9378d3646FA50De24e4e8fd78393,
0xc9241a5e35424a927536D0cA30C4687852402bCB,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private shareList = [
57,
35,
8
];
constructor()
Delegated()
ERC721B("SupLadies", "SL", 0)
PaymentSplitter( addressList, shareList ){
}
//external
function tokenURI(uint tokenId) external view virtual override returns (string memory) {
}
fallback() external payable {}
function mint( uint quantity ) external payable {
}
function mintWithPineapplesAccount( uint quantity ) external {
}
function mintWithPineapplesTokens( uint quantity, address[] calldata tokenContracts, uint[] calldata tokenIds ) external {
}
function mintVouchersFromAccount( uint quantity ) external {
require( isVoucherMintActive, "Voucher sale is not active" );
require( quantity <= MAX_ORDER, "Order too big" );
uint256 supply = totalSupply();
require( supply + quantity <= MAX_SUPPLY, "Order exceeds supply" );
require(<FILL_ME>)
_requireBalances();
uint totalPineapples = PPL_PRICE * quantity;
IPPL20( pineapplesAddress ).burnFromAccount( msg.sender, totalPineapples);
voucherCount += quantity;
vouchers[ msg.sender ] += quantity;
}
function mintVouchersFromTokens( uint quantity, address[] calldata tokenContracts, uint[] calldata tokenIds ) external {
}
function useVouchers( uint quantity ) external {
}
//onlyDelegates
function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
}
function mintVouchersTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
}
function setActive(bool isActive_, bool isPineapplesActive_, bool isVoucherMintActive_, bool isVoucherUseActive_) external onlyDelegates{
}
function setBaseURI(string calldata prefix, string calldata suffix) external onlyDelegates{
}
function setContracts(address pineapplesAddress_, address ahmcAddress_, address artwAddress_ ) external onlyDelegates {
}
function setMaxSupply(uint maxOrder, uint maxSupply, uint maxVouchers) external onlyDelegates{
}
function setPrice(uint ethPrice, uint pplPrice ) external onlyDelegates{
}
//private
function _requireBalances() private view {
}
function _requireOwnership( address[] calldata tokenContracts, uint[] calldata tokenIds ) private view {
}
}
| voucherCount+quantity<=MAX_VOUCHERS,"Order exceeds supply" | 353,777 | voucherCount+quantity<=MAX_VOUCHERS |
"Vouchers exceeds supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/****************************************
* @author: squeebo_nft *
* @team: GoldenX *
****************************************
* Blimpie-ERC721 provides low-gas *
* mints + transfers *
****************************************/
import './Blimpie/Delegated.sol';
import './Blimpie/ERC721EnumerableB.sol';
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
interface IERC721Proxy{
function balanceOf( address account ) external view returns ( uint quantity );
function ownerOf( uint tokenId ) external view returns ( address owner );
}
interface IPPL20{
function burnFromAccount( address account, uint pineapples ) external;
function burnFromTokens( address[] calldata tokenContracts, uint[] calldata tokenIds, uint pineapples ) external;
}
contract SupLadies is Delegated, ERC721EnumerableB, PaymentSplitter {
using Strings for uint;
uint public MAX_ORDER = 19;
uint public MAX_SUPPLY = 3914;
uint public MAX_VOUCHERS = 1957;
uint public ETH_PRICE = 0.1957 ether;
uint public PPL_PRICE = 19.57 ether;
bool public isMintActive = false;
bool public isPineapplesActive = false;
bool public isVoucherMintActive = false;
bool public isVoucherUseActive = false;
address public ahmcAddress = 0x61DB9Dde04F78fD55B0B4331a3d148073A101850;
address public artwAddress = 0x22d202872950782012baC53346EE3DaE3D78E0CB;
address public pineapplesAddress = 0x3e51F6422e41915e96A0808d21Babb83bcd278e5;
mapping(address => uint) public vouchers;
uint public voucherCount;
string private _tokenURIPrefix;
string private _tokenURISuffix;
address[] private addressList = [
0x13d86B7a637B9378d3646FA50De24e4e8fd78393,
0xc9241a5e35424a927536D0cA30C4687852402bCB,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private shareList = [
57,
35,
8
];
constructor()
Delegated()
ERC721B("SupLadies", "SL", 0)
PaymentSplitter( addressList, shareList ){
}
//external
function tokenURI(uint tokenId) external view virtual override returns (string memory) {
}
fallback() external payable {}
function mint( uint quantity ) external payable {
}
function mintWithPineapplesAccount( uint quantity ) external {
}
function mintWithPineapplesTokens( uint quantity, address[] calldata tokenContracts, uint[] calldata tokenIds ) external {
}
function mintVouchersFromAccount( uint quantity ) external {
}
function mintVouchersFromTokens( uint quantity, address[] calldata tokenContracts, uint[] calldata tokenIds ) external {
}
function useVouchers( uint quantity ) external {
}
//onlyDelegates
function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
}
function mintVouchersTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
require(quantity.length == recipient.length, "Must provide equal quantities and recipients" );
uint totalQuantity = 0;
uint256 supply = totalSupply();
for(uint i = 0; i < quantity.length; ++i){
totalQuantity += quantity[i];
}
require(<FILL_ME>)
for(uint i; i < recipient.length; ++i){
voucherCount += quantity[i];
vouchers[ recipient[i] ] += quantity[i];
}
}
function setActive(bool isActive_, bool isPineapplesActive_, bool isVoucherMintActive_, bool isVoucherUseActive_) external onlyDelegates{
}
function setBaseURI(string calldata prefix, string calldata suffix) external onlyDelegates{
}
function setContracts(address pineapplesAddress_, address ahmcAddress_, address artwAddress_ ) external onlyDelegates {
}
function setMaxSupply(uint maxOrder, uint maxSupply, uint maxVouchers) external onlyDelegates{
}
function setPrice(uint ethPrice, uint pplPrice ) external onlyDelegates{
}
//private
function _requireBalances() private view {
}
function _requireOwnership( address[] calldata tokenContracts, uint[] calldata tokenIds ) private view {
}
}
| supply+totalQuantity<MAX_VOUCHERS,"Vouchers exceeds supply" | 353,777 | supply+totalQuantity<MAX_VOUCHERS |
"Presale has not started yet or has ended." | // SPDX-License-Identifier: UNLICENSED
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
pragma solidity ^0.8.6;
contract PublicSale is Context, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct Round{
uint256 weiRaised;
uint256 rate;
uint256 totalBalance;
uint256 remainingBalance;
bool isActive;
mapping(address => uint256) weiSpent;
}
// The token being sold
IERC20 public _token;
// To denote current round
uint8 public _counter;
Round[3] public round;
IUniswapV2Router02 constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
// Min amount per wallet
uint256 private _minPerWallet = 0.01 ether;
// Max amount per wallet
uint256 private _maxPerWallet = 5 ether;
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
constructor (IERC20 token) {
}
/**
* @dev fallback function ***DO NOT OVERRIDE***
* Note that other contracts will transfer funds with a base gas stipend
* of 2300, which is not enough to call buyTokens. Consider calling
* buyTokens directly when purchasing tokens from a contract.
*/
receive() external payable {
}
/**
* @dev low level token purchase ***DO NOT OVERRIDE***
* @param beneficiary Recipient of the token purchase
*/
function buyTokens(address beneficiary) public payable {
require(<FILL_ME>)
uint256 weiAmount = msg.value;
_preValidatePurchase(beneficiary, weiAmount);
// calculate token amount to be created
uint256 tokens = _getTokenAmount(_counter, weiAmount);
// update state
round[_counter].weiRaised = round[_counter].weiRaised.add(weiAmount);
round[_counter].weiSpent[beneficiary] += weiAmount;
_token.transfer(beneficiary, tokens);
round[_counter].remainingBalance = round[_counter].remainingBalance.sub(tokens);
emit TokensPurchased(_msgSender(), beneficiary, weiAmount, tokens);
}
function rate(uint8 rnd) public view returns (uint256) {
}
function weiRaised(uint8 rnd) public view returns (uint256) {
}
/**
* @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met.
* Use `super` in contracts that inherit from Crowdsale to extend their validations.
* @param beneficiary Address performing the token purchase
* @param weiAmount Value in wei involved in the purchase
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
}
/**
* @dev Override to extend the way in which ether is converted to tokens.
* @param weiAmount Value in wei to be converted into tokens
* @return Number of tokens that can be purchased with the specified _weiAmount
*/
function _getTokenAmount(uint8 rnd, uint256 weiAmount) public view returns (uint256) {
}
// Start round of presale
function startRound(uint256 weiRate) external onlyOwner{
}
// End round of presale and retrieve 25% for marketing and 10% for buy-back
function endRound() external onlyOwner{
}
// We must check if we have enough remaining tokens on the wallet to reach set Uniswap listing price
function checkRemainingTokensToTransfer(uint256 amount) external onlyOwner view returns (uint256) {
}
/**
* @dev Called after all rounds of presale have ended
* @param amount Amount of tokens to be sent to Uniswap
*/
function closeSaleAndAddLiquidity(uint256 amount) external onlyOwner {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| round[_counter].isActive,"Presale has not started yet or has ended." | 353,782 | round[_counter].isActive |
"A round is already ongoing" | // SPDX-License-Identifier: UNLICENSED
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
pragma solidity ^0.8.6;
contract PublicSale is Context, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct Round{
uint256 weiRaised;
uint256 rate;
uint256 totalBalance;
uint256 remainingBalance;
bool isActive;
mapping(address => uint256) weiSpent;
}
// The token being sold
IERC20 public _token;
// To denote current round
uint8 public _counter;
Round[3] public round;
IUniswapV2Router02 constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
// Min amount per wallet
uint256 private _minPerWallet = 0.01 ether;
// Max amount per wallet
uint256 private _maxPerWallet = 5 ether;
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
constructor (IERC20 token) {
}
/**
* @dev fallback function ***DO NOT OVERRIDE***
* Note that other contracts will transfer funds with a base gas stipend
* of 2300, which is not enough to call buyTokens. Consider calling
* buyTokens directly when purchasing tokens from a contract.
*/
receive() external payable {
}
/**
* @dev low level token purchase ***DO NOT OVERRIDE***
* @param beneficiary Recipient of the token purchase
*/
function buyTokens(address beneficiary) public payable {
}
function rate(uint8 rnd) public view returns (uint256) {
}
function weiRaised(uint8 rnd) public view returns (uint256) {
}
/**
* @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met.
* Use `super` in contracts that inherit from Crowdsale to extend their validations.
* @param beneficiary Address performing the token purchase
* @param weiAmount Value in wei involved in the purchase
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
}
/**
* @dev Override to extend the way in which ether is converted to tokens.
* @param weiAmount Value in wei to be converted into tokens
* @return Number of tokens that can be purchased with the specified _weiAmount
*/
function _getTokenAmount(uint8 rnd, uint256 weiAmount) public view returns (uint256) {
}
// Start round of presale
function startRound(uint256 weiRate) external onlyOwner{
require(weiRate > 0, "Crowdsale: weiRate is 0");
require(<FILL_ME>)
require(_counter < 3,"No more than 3 rounds of presale");
round[_counter].isActive = true;
round[_counter].rate = weiRate;
}
// End round of presale and retrieve 25% for marketing and 10% for buy-back
function endRound() external onlyOwner{
}
// We must check if we have enough remaining tokens on the wallet to reach set Uniswap listing price
function checkRemainingTokensToTransfer(uint256 amount) external onlyOwner view returns (uint256) {
}
/**
* @dev Called after all rounds of presale have ended
* @param amount Amount of tokens to be sent to Uniswap
*/
function closeSaleAndAddLiquidity(uint256 amount) external onlyOwner {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| !round[_counter].isActive,"A round is already ongoing" | 353,782 | !round[_counter].isActive |
"Token balance does not cover Uniswap amount" | // SPDX-License-Identifier: UNLICENSED
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
pragma solidity ^0.8.6;
contract PublicSale is Context, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct Round{
uint256 weiRaised;
uint256 rate;
uint256 totalBalance;
uint256 remainingBalance;
bool isActive;
mapping(address => uint256) weiSpent;
}
// The token being sold
IERC20 public _token;
// To denote current round
uint8 public _counter;
Round[3] public round;
IUniswapV2Router02 constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
// Min amount per wallet
uint256 private _minPerWallet = 0.01 ether;
// Max amount per wallet
uint256 private _maxPerWallet = 5 ether;
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
constructor (IERC20 token) {
}
/**
* @dev fallback function ***DO NOT OVERRIDE***
* Note that other contracts will transfer funds with a base gas stipend
* of 2300, which is not enough to call buyTokens. Consider calling
* buyTokens directly when purchasing tokens from a contract.
*/
receive() external payable {
}
/**
* @dev low level token purchase ***DO NOT OVERRIDE***
* @param beneficiary Recipient of the token purchase
*/
function buyTokens(address beneficiary) public payable {
}
function rate(uint8 rnd) public view returns (uint256) {
}
function weiRaised(uint8 rnd) public view returns (uint256) {
}
/**
* @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met.
* Use `super` in contracts that inherit from Crowdsale to extend their validations.
* @param beneficiary Address performing the token purchase
* @param weiAmount Value in wei involved in the purchase
*/
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
}
/**
* @dev Override to extend the way in which ether is converted to tokens.
* @param weiAmount Value in wei to be converted into tokens
* @return Number of tokens that can be purchased with the specified _weiAmount
*/
function _getTokenAmount(uint8 rnd, uint256 weiAmount) public view returns (uint256) {
}
// Start round of presale
function startRound(uint256 weiRate) external onlyOwner{
}
// End round of presale and retrieve 25% for marketing and 10% for buy-back
function endRound() external onlyOwner{
}
// We must check if we have enough remaining tokens on the wallet to reach set Uniswap listing price
function checkRemainingTokensToTransfer(uint256 amount) external onlyOwner view returns (uint256) {
}
/**
* @dev Called after all rounds of presale have ended
* @param amount Amount of tokens to be sent to Uniswap
*/
function closeSaleAndAddLiquidity(uint256 amount) external onlyOwner {
require(_counter == 3,"Must be called after presale ends");
require(<FILL_ME>)
uint256 contractBal = address(this).balance;
uint256 remainingTokens = _token.balanceOf(address(this)) - amount;
// Burn remaining tokens
if(remainingTokens > 0)
_token.transfer(address(0xdead), remainingTokens);
round[0].totalBalance = 0;
round[0].remainingBalance = 0;
round[1].totalBalance = 0;
round[1].remainingBalance = 0;
round[2].totalBalance = 0;
round[2].remainingBalance = 0;
addLiquidity(amount, contractBal);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| _token.balanceOf(address(this))>amount,"Token balance does not cover Uniswap amount" | 353,782 | _token.balanceOf(address(this))>amount |
"guest-list-authorization" | pragma solidity ^0.6.12;
/**
== Access Control ==
The Affiliate is the governance of the wrapper. It has
The manager is a representative set by governance to manage moderately sensitive operations. In this case, the sole permission is unpausing the contract.
The guardian is a representative that has pausing rights (but not unpausing). This is intended to allow for a fast response in the event of an active exploit or to prevent exploit in the case of a discovered vulnerability.
More Events
Each action emits events to faciliate easier logging and monitoring
*/
contract SimpleWrapperGatedUpgradeable is ERC20Upgradeable, BaseSimpleWrapperUpgradeable, PausableUpgradeable {
/// @notice The EIP-712 typehash for the contract's domain
bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
bytes32 public DOMAIN_SEPARATOR;
/// @notice The EIP-712 typehash for the permit struct used by the contract
bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
uint256 constant MAX_BPS = 10000;
/// @notice A record of states for signing / validating signatures
mapping(address => uint256) public nonces;
address public affiliate;
address public pendingAffiliate;
// ===== GatedUpgradeable additional parameters =====
BadgerGuestListAPI public guestList;
address public manager;
address public guardian;
uint256 public withdrawalFee;
uint256 public withdrawalMaxDeviationThreshold;
/// @dev In experimental mode, the wrapper only deposits and withdraws from a single pre-connected vault (rather than the registry). The vault cache is not set in this mode. Once disabled, cannot be re-enabled.
bool public experimentalMode;
VaultAPI public experimentalVault;
modifier onlyAffiliate() {
}
event PendingAffiliate(address affiliate);
event AcceptAffiliate(address affiliate);
event SetGuardian(address guardian);
event SetManager(address manager);
event SetExperimentalVault(address vault);
event UpdateGuestList(address guestList);
event Deposit(address indexed account, uint256 amount);
event Withdraw(address indexed account, uint256 amount);
event WithdrawalFee(address indexed recipient, uint256 amount);
event Mint(address indexed account, uint256 shares);
event Burn(address indexed account, uint256 shares);
event SetWithdrawalFee(uint256 withdrawalFee);
event SetWithdrawalMaxDeviationThreshold(uint256 withdrawalMaxDeviationThreshold);
function initialize(
address _token,
address _registry,
string memory name,
string memory symbol,
address _guardian,
bool _useExperimentalMode,
address _experimentalVault
) external initializer {
}
function setWithdrawalFee(uint256 _fee) external onlyAffiliate {
}
function setWithdrawalMaxDeviationThreshold(uint256 _maxDeviationThreshold) external onlyAffiliate {
}
function bestVault() public view returns (VaultAPI) {
}
/// @dev Get estimated value of vault position for an account
function totalVaultBalance(address account) public view returns (uint256 balance) {
}
/// @dev Forward totalAssets from underlying vault
function totalAssets() public view returns (uint256 assets) {
}
function _getChainId() internal view returns (uint256) {
}
// ===== Access Control Setters =====
function setAffiliate(address _affiliate) external onlyAffiliate {
}
function acceptAffiliate() external {
}
function setGuardian(address _guardian) external onlyAffiliate {
}
function setManager(address _manager) external onlyAffiliate {
}
function setGuestList(address _guestList) external onlyAffiliate {
}
function shareValue(uint256 numShares) external view returns (uint256) {
}
function _shareValue(uint256 numShares) internal view returns (uint256) {
}
/// @dev Forward pricePerShare of underlying vault
function pricePerShare() public view returns (uint256) {
}
function totalWrapperBalance(address account) public view returns (uint256 balance) {
}
function _sharesForValue(uint256 amount) internal view returns (uint256) {
}
/// @dev Deposit specified amount of token in wrapper for specified recipient
/// @dev Variant without merkleProof
function depositFor(address recipient, uint256 amount) public whenNotPaused returns (uint256 deposited) {
}
/// @dev Deposit specified amount of token in wrapper for specified recipient
/// @dev A merkle proof can be supplied to verify inclusion in merkle guest list if this functionality is active
function depositFor(address recipient, uint256 amount, bytes32[] memory merkleProof) public whenNotPaused returns (uint256) {
if (address(guestList) != address(0)) {
require(<FILL_ME>)
}
uint256 shares = _deposit(msg.sender, amount);
_mint(recipient, shares);
emit Deposit(recipient, amount);
emit Mint(recipient, shares);
return amount;
}
/// @dev Deposit entire balance of token in wrapper
/// @dev A merkle proof can be supplied to verify inclusion in merkle guest list if this functionality is active
function deposit(bytes32[] calldata merkleProof) external whenNotPaused returns (uint256) {
}
/// @dev Deposit specified amount of token in wrapper
/// @dev A merkle proof can be supplied to verify inclusion in merkle guest list if this functionality is active
function deposit(uint256 amount, bytes32[] calldata merkleProof) public whenNotPaused returns (uint256) {
}
/// @dev Withdraw all shares for the sender
function withdraw() external whenNotPaused returns (uint256) {
}
function withdraw(uint256 shares) public whenNotPaused returns (uint256 withdrawn) {
}
/**
* @notice Triggers an approval from owner to spends
* @param owner The address to approve from
* @param spender The address to be approved
* @param amount The number of tokens that are approved (2^256-1 means infinite)
* @param deadline The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function permit(
address owner,
address spender,
uint256 amount,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external {
}
// @dev Pausing is optimized for speed of action. The guardian is intended to be the option with the least friction, though manager or affiliate can pause as well.
function pause() external {
}
// @dev Unpausing requires a higher permission level than pausing, which is optimized for speed of action. The manager or affiliate can unpause
function unpause() external {
}
//note. sometimes when we deposit we "lose" money. Therefore our amount needs to be adjusted to reflect the true pricePerShare we received
function _deposit(
address depositor,
uint256 amount
) internal returns (uint256 shares) {
}
/// @dev Variant with withdrawal fee and verification of max loss. Used in withdraw functions.
/// @dev Migrate functions use the variant from BaseWrapper without these features.
function _withdraw(
address receiver,
uint256 shares, // if `MAX_UINT256`, just withdraw everything
bool processWithdrawalFee, // If true, process withdrawal fee to affiliate
bool verifyMaxLoss // If true, ensure that the amount is within an expected range based on withdrawalMaxDeviationThreshold
) internal virtual returns (uint256 withdrawn) {
}
// Require that difference between expected and actual values is less than the deviation threshold percentage
function _verifyWithinMaxDeviationThreshold(uint256 actual, uint256 expected) internal view {
}
/// @notice Utility function to diff two numbers, expects higher value in first position
function _diff(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
| guestList.authorized(msg.sender,amount,merkleProof),"guest-list-authorization" | 353,827 | guestList.authorized(msg.sender,amount,merkleProof) |
null | pragma solidity ^0.4.24;
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
}
function div(uint a, uint b) internal returns (uint) {
}
function sub(uint a, uint b) internal returns (uint) {
}
function add(uint a, uint b) internal returns (uint) {
}
function assert(bool assertion) internal {
}
}
contract ERC20Basic {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function transfer(address to, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function allowance(address owner, address spender) constant returns (uint);
function transferFrom(address from, address to, uint value);
function approve(address spender, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint;
address public owner;
/// This is a switch to control the liquidity
bool public transferable = true;
mapping(address => uint) balances;
//The frozen accounts
mapping (address => bool) public frozenAccount;
modifier onlyPayloadSize(uint size) {
}
modifier unFrozenAccount{
}
modifier onlyOwner {
}
modifier onlyTransferable {
}
/// Emitted when the target account is frozen
event FrozenFunds(address target, bool frozen);
/// Emitted when a function is invocated by unauthorized addresses.
event InvalidCaller(address caller);
/// Emitted when some UBS coins are burn.
event Burn(address caller, uint value);
/// Emitted when the ownership is transferred.
event OwnershipTransferred(address indexed from, address indexed to);
/// Emitted if the account is invalid for transaction.
event InvalidAccount(address indexed addr, bytes msg);
/// Emitted when the liquity of UBS is switched off
event LiquidityAlarm(bytes msg);
function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) unFrozenAccount onlyTransferable {
}
function balanceOf(address _owner) view returns (uint balance) {
}
///@notice `freeze? Prevent | Allow` `target` from sending & receiving UBS preconditions
///@param target Address to be frozen
///@param freeze To freeze the target account or not
function freezeAccount(address target, bool freeze) onlyOwner public {
}
function accountFrozenStatus(address target) view returns (bool frozen) {
}
function transferOwnership(address newOwner) onlyOwner public {
}
function switchLiquidity (bool _transferable) onlyOwner returns (bool success) {
}
function liquidityStatus () view returns (bool _transferable) {
}
}
contract StandardToken is BasicToken {
mapping (address => mapping (address => uint)) allowed;
function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) unFrozenAccount onlyTransferable{
var _allowance = allowed[_from][msg.sender];
// Check account _from and _to is not frozen
require(<FILL_ME>)
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
Transfer(_from, _to, _value);
}
function approve(address _spender, uint _value) unFrozenAccount {
}
function allowance(address _owner, address _spender) view returns (uint remaining) {
}
}
contract UBSexToken is StandardToken {
string public name = "UBSex";
string public symbol = "UBS";
uint public decimals = 18;
/**
* CONSTRUCTOR, This address will be : 0x...
*/
function UBSexToken() {
}
function () public payable {
}
}
| !frozenAccount[_from]&&!frozenAccount[_to] | 353,832 | !frozenAccount[_from]&&!frozenAccount[_to] |
"balance not right" | pragma solidity 0.5.7;
interface AddrMInterface {
function getAddr(string calldata name_) external view returns(address);
}
interface ERC20 {
function balanceOf(address) external view returns (uint256);
function transferFrom(address, address, uint256) external returns (bool);
function transfer(address _to, uint256 _value) external returns (bool success);
function ticketGet() external ;
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
}
interface mPoolInterface{
function setAmbFlag(address ply_) external;
}
contract Ticket{
//address manager
AddrMInterface public addrM;
bool public fristTime;
address public owner;
ERC20 tokenADC;
// change rule
mapping(uint8 => uint256) private changeRatio;
mapping(uint8 => uint256) public RemainAmount; // changeAmount - this lava cost
uint256 public totalCheckOut; // already check out ADC acount
uint8 public curentLevel;
// constant set
uint256 constant public totalBalance = 153000000*10**18;
uint256 constant public minInPay = 5*10**16;// 1 * 5% eth
uint256 constant public OutPay = 1*10**17;// 1 * 10% eth
address payable constant public teamAddr = address(0x1d13502CfB73FCa360d1af7703cD3F47abA809b5);//
constructor(address AddrManager_) public{
}
function buyADC() public payable{
uint256 msgValue = msg.value;
uint256 adcAmount;
uint256 saleADC;
if(!fristTime){
tokenADC.ticketGet();
fristTime = true;
}
require(msgValue >= minInPay," value to smail buyADC");
require(<FILL_ME>)
saleADC = (msgValue* changeRatio[curentLevel])/10**18; //msgValue.div(10**18).mul(changeRatio[curentLevel]);
teamAddr.transfer(msgValue);
adcAmount = CrossLevel(saleADC,msgValue);
tokenADC.transfer(msg.sender,adcAmount);
if(msgValue >= 100*10**18){
mPoolInterface(addrM.getAddr("MAINPOOL")).setAmbFlag(msg.sender);
}
totalCheckOut += adcAmount;
}
function calDeductionADC(uint256 _value,bool isIn_) public view returns(uint256 disADC_){
}
function getTickeInfo() public view returns(uint256 curLevel_,uint256 distroyADCAmount_){
}
function CrossLevel(uint256 saleADC_,uint256 buyValue_) internal returns(uint256 disAdc){
}
function calcDistroy(uint256 saleADC_,uint256 buyValue_) internal view returns(uint256 disAdc){
}
}
| (totalBalance-totalCheckOut)==tokenADC.balanceOf(address(this)),"balance not right" | 353,834 | (totalBalance-totalCheckOut)==tokenADC.balanceOf(address(this)) |
"Purchase would exceed max supply of Ruumz" | pragma solidity ^0.7.0;
/**
* @title RuumzContract contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract RuumzContract is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant ruumPrice = 60000000000000000; //0.06 ETH
uint256 public constant maxRuumzPurchase = 10;
uint256 public constant maxRuumz = 10000;
bool public saleIsActive = true;
constructor(
string memory name,
string memory symbol
) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
}
/**
* Set some Ruumz aside
*/
function reserveRuumz(uint256 numberOfTokens) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Ruumz
*/
function mintRuum(uint256 numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint a Ruum");
require(
numberOfTokens <= maxRuumzPurchase,
"Can only mint 10 Ruumz at a time"
);
require(<FILL_ME>)
require(
ruumPrice.mul(numberOfTokens) <= msg.value,
"Ether value sent is not correct"
);
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 index = totalSupply();
if (totalSupply() < maxRuumz) {
_safeMint(msg.sender, index);
}
}
}
}
| totalSupply().add(numberOfTokens)<=maxRuumz,"Purchase would exceed max supply of Ruumz" | 353,879 | totalSupply().add(numberOfTokens)<=maxRuumz |
"Ether value sent is not correct" | pragma solidity ^0.7.0;
/**
* @title RuumzContract contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract RuumzContract is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant ruumPrice = 60000000000000000; //0.06 ETH
uint256 public constant maxRuumzPurchase = 10;
uint256 public constant maxRuumz = 10000;
bool public saleIsActive = true;
constructor(
string memory name,
string memory symbol
) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
}
/**
* Set some Ruumz aside
*/
function reserveRuumz(uint256 numberOfTokens) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Ruumz
*/
function mintRuum(uint256 numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint a Ruum");
require(
numberOfTokens <= maxRuumzPurchase,
"Can only mint 10 Ruumz at a time"
);
require(
totalSupply().add(numberOfTokens) <= maxRuumz,
"Purchase would exceed max supply of Ruumz"
);
require(<FILL_ME>)
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 index = totalSupply();
if (totalSupply() < maxRuumz) {
_safeMint(msg.sender, index);
}
}
}
}
| ruumPrice.mul(numberOfTokens)<=msg.value,"Ether value sent is not correct" | 353,879 | ruumPrice.mul(numberOfTokens)<=msg.value |
null | pragma solidity ^0.4.17;
contract owned {
address public owner;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract ERC223ReceivingContract {
function tokenFallback(address _from, uint256 _value, bytes _data) public;
}
contract Token {
uint256 public totalSupply;
//ERC 20
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
// ERC 223
function transfer(address _to, uint256 _value, bytes _data) public returns (bool success);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract StandardToken is Token {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
function transfer(address _to, uint256 _value) public returns (bool) {
}
function transfer(
address _to,
uint256 _value,
bytes _data)
public
returns (bool)
{
}
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)
constant
public
returns (uint256)
{
}
function balanceOf(address _owner) constant public returns (uint256) {
}
}
contract PazCoin is owned, StandardToken {
string constant public name = "PazCoin";
string constant public symbol = "PAZ";
uint8 constant public decimals = 18;
uint constant multiplier = 1000000000000000000;
mapping (address => bool) public frozenAccount;
event FrozenFunds(address target, bool frozen);
event Deployed(uint indexed _total_supply);
event Burnt(
address indexed _receiver,
uint indexed _num,
uint indexed _total_supply
);
function PazCoin(
address wallet_address,
uint initial_supply)
public
{
}
function burn(uint num) public {
require(num > 0);
require(<FILL_ME>)
require(totalSupply >= num);
uint pre_balance = balances[msg.sender];
balances[msg.sender] -= num;
totalSupply -= num;
Burnt(msg.sender, num, totalSupply);
Transfer(msg.sender, 0x0, num);
assert(balances[msg.sender] == pre_balance - num);
}
function freezeAccount(address target, bool freeze) onlyOwner public {
}
}
| balances[msg.sender]>=num | 353,983 | balances[msg.sender]>=num |
"insufficient funds" | //SPDX-License-Identifier: MIT
/*
* MIT License
* ===========
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
pragma solidity 0.5.17;
contract TreasuryV2 is Ownable, ITreasury {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public defaultToken;
IERC20 public boostToken;
SwapRouter public swapRouter;
address public ecoFund;
address public gov;
address internal govSetter;
mapping(address => uint256) public ecoFundAmts;
// 1% = 100
uint256 public constant MAX_FUND_PERCENTAGE = 1500; // 15%
uint256 public constant DENOM = 10000; // 100%
uint256 public fundPercentage = 500; // 5%
uint256 public burnPercentage = 2500; // 25%
constructor(SwapRouter _swapRouter, IERC20 _defaultToken, IERC20 _boostToken, address _ecoFund) public {
}
function setGov(address _gov) external {
}
function setSwapRouter(SwapRouter _swapRouter) external onlyOwner {
}
function setEcoFund(address _ecoFund) external onlyOwner {
}
function setFundPercentage(uint256 _fundPercentage) external onlyOwner {
}
function setBurnPercentage(uint256 _burnPercentage) external onlyOwner {
}
function balanceOf(IERC20 token) public view returns (uint256) {
}
function deposit(IERC20 token, uint256 amount) external {
}
// only default token withdrawals allowed
function withdraw(uint256 amount, address withdrawAddress) external {
require(msg.sender == gov, "caller not gov");
require(<FILL_ME>)
defaultToken.safeTransfer(withdrawAddress, amount);
}
function convertToDefaultToken(address[] calldata routeDetails, uint256 amount) external {
}
function convertToBoostToken(address[] calldata routeDetails, uint256 amount) external {
}
function rewardVoters() external {
}
function withdrawEcoFund(IERC20 token, uint256 amount) external {
}
}
| balanceOf(defaultToken)>=amount,"insufficient funds" | 354,032 | balanceOf(defaultToken)>=amount |
"src can't be boost" | //SPDX-License-Identifier: MIT
/*
* MIT License
* ===========
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
pragma solidity 0.5.17;
contract TreasuryV2 is Ownable, ITreasury {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public defaultToken;
IERC20 public boostToken;
SwapRouter public swapRouter;
address public ecoFund;
address public gov;
address internal govSetter;
mapping(address => uint256) public ecoFundAmts;
// 1% = 100
uint256 public constant MAX_FUND_PERCENTAGE = 1500; // 15%
uint256 public constant DENOM = 10000; // 100%
uint256 public fundPercentage = 500; // 5%
uint256 public burnPercentage = 2500; // 25%
constructor(SwapRouter _swapRouter, IERC20 _defaultToken, IERC20 _boostToken, address _ecoFund) public {
}
function setGov(address _gov) external {
}
function setSwapRouter(SwapRouter _swapRouter) external onlyOwner {
}
function setEcoFund(address _ecoFund) external onlyOwner {
}
function setFundPercentage(uint256 _fundPercentage) external onlyOwner {
}
function setBurnPercentage(uint256 _burnPercentage) external onlyOwner {
}
function balanceOf(IERC20 token) public view returns (uint256) {
}
function deposit(IERC20 token, uint256 amount) external {
}
// only default token withdrawals allowed
function withdraw(uint256 amount, address withdrawAddress) external {
}
function convertToDefaultToken(address[] calldata routeDetails, uint256 amount) external {
require(<FILL_ME>)
require(routeDetails[0] != address(defaultToken), "src can't be defaultToken");
require(routeDetails[routeDetails.length - 1] == address(defaultToken), "dest not defaultToken");
IERC20 srcToken = IERC20(routeDetails[0]);
require(balanceOf(srcToken) >= amount, "insufficient funds");
if (srcToken.allowance(address(this), address(swapRouter)) <= amount) {
srcToken.safeApprove(address(swapRouter), 0);
srcToken.safeApprove(address(swapRouter), uint256(-1));
}
swapRouter.swapExactTokensForTokens(
amount,
0,
routeDetails,
address(this),
block.timestamp + 100
);
}
function convertToBoostToken(address[] calldata routeDetails, uint256 amount) external {
}
function rewardVoters() external {
}
function withdrawEcoFund(IERC20 token, uint256 amount) external {
}
}
| routeDetails[0]!=address(boostToken),"src can't be boost" | 354,032 | routeDetails[0]!=address(boostToken) |
"src can't be defaultToken" | //SPDX-License-Identifier: MIT
/*
* MIT License
* ===========
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
pragma solidity 0.5.17;
contract TreasuryV2 is Ownable, ITreasury {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public defaultToken;
IERC20 public boostToken;
SwapRouter public swapRouter;
address public ecoFund;
address public gov;
address internal govSetter;
mapping(address => uint256) public ecoFundAmts;
// 1% = 100
uint256 public constant MAX_FUND_PERCENTAGE = 1500; // 15%
uint256 public constant DENOM = 10000; // 100%
uint256 public fundPercentage = 500; // 5%
uint256 public burnPercentage = 2500; // 25%
constructor(SwapRouter _swapRouter, IERC20 _defaultToken, IERC20 _boostToken, address _ecoFund) public {
}
function setGov(address _gov) external {
}
function setSwapRouter(SwapRouter _swapRouter) external onlyOwner {
}
function setEcoFund(address _ecoFund) external onlyOwner {
}
function setFundPercentage(uint256 _fundPercentage) external onlyOwner {
}
function setBurnPercentage(uint256 _burnPercentage) external onlyOwner {
}
function balanceOf(IERC20 token) public view returns (uint256) {
}
function deposit(IERC20 token, uint256 amount) external {
}
// only default token withdrawals allowed
function withdraw(uint256 amount, address withdrawAddress) external {
}
function convertToDefaultToken(address[] calldata routeDetails, uint256 amount) external {
require(routeDetails[0] != address(boostToken), "src can't be boost");
require(<FILL_ME>)
require(routeDetails[routeDetails.length - 1] == address(defaultToken), "dest not defaultToken");
IERC20 srcToken = IERC20(routeDetails[0]);
require(balanceOf(srcToken) >= amount, "insufficient funds");
if (srcToken.allowance(address(this), address(swapRouter)) <= amount) {
srcToken.safeApprove(address(swapRouter), 0);
srcToken.safeApprove(address(swapRouter), uint256(-1));
}
swapRouter.swapExactTokensForTokens(
amount,
0,
routeDetails,
address(this),
block.timestamp + 100
);
}
function convertToBoostToken(address[] calldata routeDetails, uint256 amount) external {
}
function rewardVoters() external {
}
function withdrawEcoFund(IERC20 token, uint256 amount) external {
}
}
| routeDetails[0]!=address(defaultToken),"src can't be defaultToken" | 354,032 | routeDetails[0]!=address(defaultToken) |
"dest not defaultToken" | //SPDX-License-Identifier: MIT
/*
* MIT License
* ===========
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
pragma solidity 0.5.17;
contract TreasuryV2 is Ownable, ITreasury {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public defaultToken;
IERC20 public boostToken;
SwapRouter public swapRouter;
address public ecoFund;
address public gov;
address internal govSetter;
mapping(address => uint256) public ecoFundAmts;
// 1% = 100
uint256 public constant MAX_FUND_PERCENTAGE = 1500; // 15%
uint256 public constant DENOM = 10000; // 100%
uint256 public fundPercentage = 500; // 5%
uint256 public burnPercentage = 2500; // 25%
constructor(SwapRouter _swapRouter, IERC20 _defaultToken, IERC20 _boostToken, address _ecoFund) public {
}
function setGov(address _gov) external {
}
function setSwapRouter(SwapRouter _swapRouter) external onlyOwner {
}
function setEcoFund(address _ecoFund) external onlyOwner {
}
function setFundPercentage(uint256 _fundPercentage) external onlyOwner {
}
function setBurnPercentage(uint256 _burnPercentage) external onlyOwner {
}
function balanceOf(IERC20 token) public view returns (uint256) {
}
function deposit(IERC20 token, uint256 amount) external {
}
// only default token withdrawals allowed
function withdraw(uint256 amount, address withdrawAddress) external {
}
function convertToDefaultToken(address[] calldata routeDetails, uint256 amount) external {
require(routeDetails[0] != address(boostToken), "src can't be boost");
require(routeDetails[0] != address(defaultToken), "src can't be defaultToken");
require(<FILL_ME>)
IERC20 srcToken = IERC20(routeDetails[0]);
require(balanceOf(srcToken) >= amount, "insufficient funds");
if (srcToken.allowance(address(this), address(swapRouter)) <= amount) {
srcToken.safeApprove(address(swapRouter), 0);
srcToken.safeApprove(address(swapRouter), uint256(-1));
}
swapRouter.swapExactTokensForTokens(
amount,
0,
routeDetails,
address(this),
block.timestamp + 100
);
}
function convertToBoostToken(address[] calldata routeDetails, uint256 amount) external {
}
function rewardVoters() external {
}
function withdrawEcoFund(IERC20 token, uint256 amount) external {
}
}
| routeDetails[routeDetails.length-1]==address(defaultToken),"dest not defaultToken" | 354,032 | routeDetails[routeDetails.length-1]==address(defaultToken) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.